fix: null exception when using parallel batches/forks #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a fix for #5. It seems like the main issue is using TestSourcesModel to obtain Features in CucumberScenarioLoader and ScenarioLineCountStatistics. From what I can see, TestSourcesModel can only be used to get Features if it has TestSourceRead event in its field already. In CucumberScenarioLoader and ScenarioLineCountStatistics prior to this fix, the fields in TestSourcesModal are all empty. For this fix, I only changed the way Features are obtained.
Aside from that, there was a line that collects to map that did nothing. I removed it. mapsForFeatures wasn't set, so I set that too.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
I added more tests in build.gradle. Not sure why those 2 lines aren't already there. I also installed locally and did e2e tests using both LineCount and MultiRunTest.
Extra Note:
I notice that the documentation in serenity-bdd.github.io, specifically the section of how to configure failsafe plugin, does not mention the config reuseForks=false. Without it, I had many cases where all test splits go to one fork. When I have that config in, all forks get their shares.