Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to prepare virtual participants without immediately joining the call #8546

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

SystemKeeper
Copy link
Contributor

Currently Talkbuchet offers the method addVirtualParticipant() and addVirtualParticipants(NUMBER). Those methods directly start a virtual participant, therefore joining the call sequentially. This is fine if you want to use Talkbuchet for testing with multiple participants in a call, but is not sufficient if you want to let an arbitrary number of participants join/leave at the same time (e.g. to test performance of layout calculations being done when multiple participants join/leave at once).

This PR extends Talkbuchet.py with the following methods:
prepareVirtualParticipant()
prepareVirtualParticipants(NUMBER)
startVirtualParticipants()
startVirtualParticipantsParallel()
stopVirtualParticipants()
stopVirtualParticipantsParallel()

while still keeping the previous functionality of addVirtualParticipant() / addVirtualParticipants(NUMBER).

Basically the prepare* methods spin up the virtual participant, but does not join any call. You can prepare as many participants as you want (or your machine is able to handle) and then let them join "at once". Using startVirtualParticipants() will start each virtual participant in sequence, waiting for the previous one to finish its start. This is still faster than using addVirtualParticipant*, because every virtual participant is already up, but still not enough to simulate a parallel join/leave. For this you can use startVirtualParticipantsParallel(), which calls the start of each virtual participant in its own thread.

Example:

# Run Talkbuchet (using ARM image here)
./talkbuchet-run.sh --selenium-image "seleniarm/standalone-firefox:latest"

# Run in Talkbuchet
switchToVirtualParticipantMode()
setCredentials("test", "token")
setTarget("https://localhost")
setToken("roomToken")
setMedia(True, True)
prepareVirtualParticipants(10)
startVirtualParticipantsParallel()

Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

Sorry for the delay and thanks! :-)

I have slightly adjusted the documentation. If you agree with the changes feel free to squash and merge :-)

… call

Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
@SystemKeeper SystemKeeper force-pushed the feature/noid/talkbuchet-parallel-join branch from c581ff4 to c102008 Compare October 27, 2023 21:00
@SystemKeeper SystemKeeper merged commit 789b44c into master Oct 27, 2023
35 checks passed
@SystemKeeper SystemKeeper deleted the feature/noid/talkbuchet-parallel-join branch October 27, 2023 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review enhancement feature: signaling 📶 Internal and external signaling backends feature: WebRTC 🚡 WebRTC connection between browsers and/or mobile clients
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants