cucumber/cucumber-jvm — Issue #172: JSON Formatter unable to handle the quantity of scenarios we're running
Author: dkowis
Created: 2012-01-24 23:43:51+00:00
State: open

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.