3

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

Santosh
  • 31
  • 1

2 Answers2

1

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.

pjcj
  • 421
  • 2
  • 3
0

Try to drop db and run test before you make result

cover -test
  • You mean to say to drop the cover db, then run the cover -test and then run the test files to capture coverage? – Santosh Jun 03 '15 at 14:25
  • Yes, big db is useless in many cases, you should not regenerate html for the previous days. – NeoNox NeoNox Jun 03 '15 at 14:53
  • But if I run cover -test, it displays, Deleting database cover_db cover: running make test "OPTIMIZE=-O0 -fprofile-arcs -ftest-coverage" "OTHERLDFLAGS=-fprofile-arcs -ftest-coverage" make: Nothing to be done for `test'. – Santosh Jun 04 '15 at 04:08