lundi 20 juillet 2020

Is there a way to tell one browser instance from another when running concurrent tests in Testcafe

Is there a way to tell one browser instance from another when running concurrent tests in Testcafe?

Say we have two tests.

  • One creates some entity and then changes it and verifies that everything change is applied correctly.
  • Another deletes all the entities and verifies that everything is deleted.

If we run these tests in parallel they will interfere with each other. So there must be either a way to embrace this concurrency and synchronize these tests with some primitive or to make them parallel and run in isolated sandboxes.

I would prefer to go to the second option. It could be something like

test('Some test', async t => {
  await useSandbox(t.browser.alias, t.browser.os.name, t.browser.instanceId);
  ... rest of the test
})

But AFAIK there is no way to tell one browser instance from another inside the test code. Or is there?

Aucun commentaire:

Enregistrer un commentaire