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

Formatter output to file prematurely ending (not being flushed, or something) #172

Closed
dkowis opened this issue Jan 24, 2012 · 3 comments
Closed

Comments

@dkowis
Copy link
Member

dkowis commented Jan 24, 2012

After all the Scenario Outline expansion (if grepping for formatter.scenario in report.js is any indication) I've got 817 scenarios being executed.

I was going to use the JSON Formatter to hand off to an external automated system that would like to track the results of our runs.

Unfortunately, the JSON isn't complete. It ends somewhere in the middle. It also appears that all the JSON is on one line, but I don't think that should matter, but it is a 3MB JSON file. I tried to load it up with a ruby script real quick to see what I could do with the data, and it failed to parse. After a bit of investigation, I found out that the JSON just ends somewhere in the middle of our scenario execution.

We've got a pretty extensive Cucumber Suite for building this project. It's possible that some of our tests aren't meaning ful and should be done better, but it is what it is. Information:

$ find . -name "*.feature" | wc -l
38
$ grep -R "Scenario" *.feature | wc -l
164
$ grep -R "Scenario Outline" *.feature | wc -l
85

The report.js file is 4.1MB and the json output file that I configured is only 3.0 MB. I wonder if some kind of hard limit was reached in the JSON formatter, but there was none that I could find, unless it's a limit in the upstream gson stuff, and maybe something like XStream's JSON outputter would be better (or maybe even a groovy JSON outputter.) I might have time to expirement with it a bit to see where the problem lies, but I'm not certain.

@dkowis
Copy link
Member Author

dkowis commented Jan 25, 2012

It's something else, things not being flushed or something like that.

I added a json outputter to the jruby backend's integration test, and I was going to test things, but the file is empty!
When I barf it out to the console, it comes out correctly.

So i think things are being prematurely closed somehow. That would give the same effect on the larger ruby project we've got, and may also affect things like the HTML formatter :(

@dkowis
Copy link
Member Author

dkowis commented Jan 25, 2012

This is fixed thanks to the commits @aslakhellesoy pushed recently

@dkowis dkowis closed this as completed Jan 25, 2012
@lock
Copy link

lock bot commented Oct 25, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant