-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Fixed use of formatter to list all step results in JSON output #426
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
Conversation
import org.jsoup.nodes.Element; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
import org.mozilla.javascript.Context; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these imports for?
If this is a fix for the JSON output, why are you chaning the JUnit formatter? |
Fixed formatting
@@ -95,10 +101,7 @@ public void done() { | |||
public void result(Result result) { | |||
testCase.results.add(result); | |||
|
|||
if (testCase.scenario != null && testCase.results.size() == testCase.steps.size()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relies on steps
and results
to grow in parallel.
Sorry about the format and import issues, fixed now. I had to change the JUnit formatter because it relied on test case |
Firstly, your test JSON file only works in linux environment. In windows environment the uri looks like this: Also, I am using your fix on my project and I'm getting an index out of bounds exception every time it tries to write a result |
Im confused as to whether or not this is fixed and how to get the fix into our repo ? Does the JUnit formatter need changing ? It is the JSON output files that I think are wrong thats showing my givens as |
@priceand It's not merged to the cucumber repo's master branch if that's what you're asking. When it is this PR will be closed. This is unrelated to the JUnit report. I've been too busy to look into this, hoping to get some time during holidays. |
Ok thanks! Andy From: Aslak Hellesøy [mailto:[email protected]] @priceandhttps://github.com/priceand It's not merged to the cucumber repo's master branch if that's what you're asking. When it is this PR will be closed. This is unrelated to the JUnit report. I've been too busy to look into this, hoping to get some time during holidays. — This message, and any attachments, is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.bankofamerica.com/emaildisclaimer. If you are not the intended recipient, please delete this message. |
This fix will be very much appreciated as I rely on the json report for the jenkins cucumber report plugin: https://github.com/masterthought/jenkins-cucumber-jvm-reports-plugin-java Currently all json reports after cucumber-jvm 1.0.8 do not produce the required result sections consistently in the json report which means the result of the step cannot be determined. The plugin currently has thousands of downloads which means I get lots of questions about this and am looking forward to seeing this resolved :) |
So does my javascript formatter: https://github.com/poum/cucumber-json2report. But I'm pretty far of Kingsleyh download rate (euphemism). So I wish you having soon holydays (for the work already done, not for the fix of course .... the price of glory ;-) |
@thestumonkey, I committed a fix for Windows OS. But I don't know how to reproduce your java.lang.IndexOutOfBoundsException, could you investigate? I haven't touched that part of the code, are you sure your issue is related to this pull request? |
Confirmed your test now passes. I'm unsure quite how to check if this issue is due to your pull request, but I'm using the latest dev branch then putting your code on top. It could be the way I'm building it and referencing it, I'm still fairly new to this stuff. Any idea when we can expect this making it into the main branch? |
So is there a fix now ? How can I get it into my code ???!! |
2 similar comments
So is there a fix now ? How can I get it into my code ???!! |
So is there a fix now ? How can I get it into my code ???!! |
Any update on this pull request? |
Hi, any updates on this? |
Anxiously waiting for this one too. |
So I did the following: git clone , then set agattiker's repo as a remote. I then fetched the repo with the JSON-Format-Fix branch and ran maven. One of the tests failed: git clean install Failed tests: featureWithOutlineTest(cucumber.runtime.formatter.JSONPrettyForm So I compiled with -D skipTests. Now when I run my project with the updated libraries I get: Exception in thread "main" java.lang.NoSuchMethodError: org.junit.runner.Description.createSuiteDescription(Ljava/lang/String;Ljava/io/Serializable;[Ljava/lang/annotation/Annotation;)Lorg/junit/runner/Description; Am I doing something wrong or is there an issue with this code? |
On Wed, Jan 30, 2013 at 9:28 AM, Stuart Alexander
The exception indicates that you have an older version of JUnit on the Aslak
|
That's what my research showed me, but I have in my POM. I think I have solved this, I don't think the new JAR's were in my maven repo, despite me telling it to use a local one. However, after getting the test running, I am still getting my original "out of bounds" exception, detailed above. java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 I am unsure if this is me merging the branches and building incorrectly or if there's an error in the pull request code. Any chance you could merge this and release an update into maven? :) |
On Wed, Jan 30, 2013 at 11:05 AM, Stuart Alexander <[email protected]
Some of your other deps may depend on an old junit, in which case you
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
No description provided.