Hi Csaba,
Please read the group rules and reply inline.
On Wed, Oct 1, 2014 at 11:08 PM, Csaba Bejan <
bejan...@gmail.com> wrote:
> You are right I can't be sure that GSON is the issue, didn't do any
> profiling. What we know is that we can add hundreds of new scenarios and
> there is no issue. Everything works fine, however as soon as I'm adding back
> the json format option I'm getting this exception at the end of the test
> execution.
From this email, you are probably right and technically you would
benefit from a JSON formatter using a streaming API, as you are
saying.
> Answering your questions:
> - Memory settings: -Xms512m -Xmx512m (when changed it to 1024 the problem
> was solved but this is only temporary given that new tests are added every
> day)
Current workstations come with at least 8GB and servers much more. I
believe there isn't a real need to improve the memory efficiency of
the formatter (see also my comments at the end).
You also need to consider if whatever software is going to parse that
massive JSON is using a streaming API, or you'll have the same issue
there.
> - I removed all the formatters, it made no difference, when json was added I
> got out of memory.
> - We are executing the tests as part of our maven build and we are using the
> surefire plugin. That executes the unit tests and there is one empty test
> which we are using to execute all of our cucumber tests and we are
> configuring this through annotation.
> - I can try to replicate the issue with the method you described and also
> will try to do the profile but unfortunately this week I won't have time to
> do it.
>
> A little background, maybe it would be useful:
> - We have one runner which executes all our cucumber tests so one huge json
> file is generated in the end
> - The size of or json at the moment is ~58Mb (I'm not sure how much memory
> is used by GSON to create the json from the result object. By the way the
> json is 2.2 million lines long and we are adding new scenarios constantly
> - We have ~1800 scenarios at the moment.
From a separate point of view, a monolithic application with 1800
scenarios is massive! Are you sure you still need all those scenarios?
Are they technical-facing or business-facing? Have you got a testing
pyramid or a testing ice-cream cone? Matt keeps saying that teams
should be brave and delete scenarios that are not providing much
value. You might find more information on this topic in this
presentation:
https://skillsmatter.com/skillscasts/4984-post-bdd-team
Paolo