Skip to content

Instantiate classes per scenario #30

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

Merged
merged 6 commits into from
May 1, 2020
Merged

Instantiate classes per scenario #30

merged 6 commits into from
May 1, 2020

Conversation

gaeljw
Copy link
Member

@gaeljw gaeljw commented Apr 26, 2020

This aims to fix #1

Content:

  • added tests to highlight the "isolation" issue bringed by loading glue classes once for all scenarios
  • fix this behavior in a similar way to how the Java8/Lambda implementation does
  • documentation for future developers

Breaking changes introduced:

  • this is an internal breaking change, users should not be affected unless users have scenarios relying on a state shared between multiple scenarios using glue classes

Tests:

  • Added some as part of the PR
  • Currently using this SNAPSHOT version on a private codebase with hundreds of features to ensure non regression

@gaeljw gaeljw added this to the 5.6.0 milestone Apr 26, 2020
@gaeljw gaeljw added 🐛 bug Defect / Bug ⚡ enhancement Request for new functionality labels Apr 26, 2020
@gaeljw gaeljw force-pushed the classes-per-scenario branch from e458c51 to 1c3ea40 Compare April 26, 2020 14:07
@gaeljw gaeljw marked this pull request as ready for review April 26, 2020 14:21
@gaeljw
Copy link
Member Author

gaeljw commented Apr 26, 2020

I confirm I didn't had any issue (except the ones from Cucumber 5 upgrade itself with some null values in datatables) on the codebase against which I ran the test.
I wouldn't say we use all the features offered by Cucumber in this codebase but pretty confident for the main ones.

@gaeljw gaeljw force-pushed the classes-per-scenario branch from e8b3ec1 to c0a78e9 Compare May 1, 2020 09:43
@gaeljw gaeljw merged commit a93b043 into master May 1, 2020
@gaeljw gaeljw deleted the classes-per-scenario branch May 1, 2020 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Defect / Bug ⚡ enhancement Request for new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cucumber-scala instantiates step definition classes per test JVM instead of per scenario
1 participant