Daniel-Marynicz / BehatParallelExtension

Behat Parallel Extension
MIT License
18 stars 6 forks source link

Ability to exclude/limit feature files/scenarios/tags/etc from parallelization #65

Closed jnicola closed 5 months ago

jnicola commented 1 year ago

Hey there! Trying this out to experiment with how much performance we can pick up. We're using Behat for Drupal. Some of our tests utilize "backgrounds" and in those backgrounds we create content with specific ID's for ease of access and test writing.

When parallel processes fire on these files, there are SQL errors such as "Integrity constraint violation: 1062 Duplicate entry"

Might be nice if we could get this to work in such a way that it instead of going for every scenario instead divides everything based on feature files. That would reduce such collisions substantially!

Thank you for making this by the way. Definitely interesting!

Daniel-Marynicz commented 1 year ago

You should on each scenario clean database to the virgin state. Like in this example https://github.com/Daniel-Marynicz/BehatParallelExtension-IntegrationWithSymfony-Example/blob/71971da5686061b2b8c6eb3f454584e941dde5f0/tests/Behat/Context/DatabaseContext.php#L44

jnicola commented 1 year ago

Okay, we're using this with Drupal, and it doesn't seem to be setup in such a way that it would be reasonable to start with an empty database every single scenario.