Skip to content
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

Fix NULL reference in CucumberJSON results processing #251

Closed

Conversation

MikeThomas64
Copy link

Cucumber-JS creates JSON results files that may include a background step. The background step will have no results and so a null reference is raised on Line 111:CucumberJsonSingleResults.cs.

The actual results for this step are within the scenario elements of the JSON.

Suggested fix is to remove the background element from the feature when processing results.

…step. The background step will have no results and so a null reference is raised on Line 111:CucumberJsonSingleResults.cs.

The actual results for this step are within the scenario elements of the JSON.

Suggested fix is to remove the background element from the feature when processing results.
@dirkrombauts
Copy link
Member

Hi,

Thanks for taking the time to report this and provide a fix.

Would it be at all possible for you to provide a test as well that demonstrates the problem? Your fix would then make the test pass. Thanks!

@dirkrombauts
Copy link
Member

Unfortunately the solution isn't as simple as that, because the Ruby version of Cucumber does include the background steps and their results as separate elements.

I created an issue to track and solve this problem: #293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants