Provide a way to connect a role (or role set) to a concurrent connection
See original GitHub issueWhat is your Scenario?
We have a complex multi-tenant SaaS product. And we test our product using a server. We need to make sure that every concurrent browser test is working in a separate tenant (separate Role making sure it’s not used twice in the same time) to avoid errors.
What are you suggesting?
Maybe provide a current thread/browser index through t.testRun.browserConnection.index
?
Or update t.testRun.browserConnection.id
that it would start with {index}_
prefix?
Basically we need an ability to select Role1, Role2, ..., RoleX
based on some condition provided from the test runned, making sure it’s not overlaps
What alternatives have you considered?
No response
Additional context
Checked this one https://github.com/DevExpress/testcafe/issues/5356
Playwright has workerInfo.workerIndex
https://playwright.dev/docs/next/test-fixtures#worker-scoped-fixtures
Issue Analytics
- State:
- Created 9 months ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
Hmmm. If I get correct and you’re saying that ids will be permanent for all threads during all tests then it definitely could work. Thank you.
You can use the following code to map browser connection ids to the indices: