Devel::Cover HTML report process killed

118 Views Asked by At

I have test suite with over 200+ selenium test cases where in each I capture the coverage using Devel::Cover. After all the test cases are run, when I try to generate the HTML report using 'cover cover_db -report html' the process is killed after consuming all the memory nearly 16 GB with error out of memory. Any idea how to resolve this? Any help would be great

2

There are 2 best solutions below

3
On

Try to drop db and run test before you make result

cover -test
0
On

Each coverage run can create quite a lot of data, and in order to create the final report the runs need to be merged. I suspect that this is the part of the process which is consuming the memory.

It is quite likely that this process is using more memory than is necessary.

It is also possible that it is the html report which is using the memory. You could try using the text report to see whether that performs any better.

If you know that some runs probably aren't contributing to the coverage you could also reduce the number of selenium tests being run.

You should also ensure that you are only collecting coverage for the modules that you are interested in.