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

Add Cucumber example / support #8

Closed
dodie opened this issue Sep 11, 2016 · 3 comments
Closed

Add Cucumber example / support #8

dodie opened this issue Sep 11, 2016 · 3 comments

Comments

@dodie
Copy link
Owner

dodie commented Sep 11, 2016

No description provided.

@dodie
Copy link
Owner Author

dodie commented Sep 12, 2016

  • The failure renderer should be extended to tolerate when no description.getTestClass() is provided. As a fallback it could look into the stack trace and detect the first instrumented method.~~
  • Cucumber does not support JUnit Rules, so it can only be used with the ScottRunListener. This should be documented in the cucumber example. The listener simply writes to system.out, which is really ugly. Maybe it should modify the original exception?

@dodie
Copy link
Owner Author

dodie commented Sep 13, 2016

The changes described above has been applied, but they just brought new problems to the surface:

  • Now the source code for the glue code is found, but it reports the exception one line after the method body.
  • Cucumber reports are not altered if the exception message is modified in the Run Listener, so I doubt they would be the optimal solution for this problem. Try a custom Cucumber Formatter for this instead.

@dodie
Copy link
Owner Author

dodie commented Sep 17, 2016

The Cucumber Runner saves the exception message in its
Result object before Scott could enhance it.
The Exception object is available for the Formatters, but by default
they use the saved text instead.

This problem is fixed with the usage of custom Cucumber Formatters. See scott-example-cucumber project for more info.

@dodie dodie closed this as completed Sep 17, 2016
@dodie dodie modified the milestone: 2.0 Oct 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant