We in our team are trying to get cobertura reports generated from selenium tests run out of the production deployment of our JBoss based applications. We use JBoss 6.1.0 for this purpose.
For some reason, the server doesn't seem to write into the cobertura.ser file. I followed the steps mentioned in the links at
- http://blog.avisi.nl/2012/09/25/calculating-the-code-coverage-of-integration-tests/
- Cobertura FAQ pages
- http://ehc.ac/p/cobertura/mailman/message/25520114/
for this but still not able to get coverage information written into that file. Out of the many suggestions, I tried
Starting JBoss from folder where the cobertura.ser file is present (bin folder).
Using -Djboss.shutdown.forceHalt=false
Using -Dnet.sourceforge.cobertura.datafile=$JBOSS_HOME/bin/cobertura.ser.
- Ensured cobertura.ser has file permissions at 666 for it to get updated.
After adding datafile property, I see the file is being touched by some process (through change in file modified timestamp) but doesn't have coverage information added. (All classes still show 0% coverage)
I checked that the machine doesn't have any other cobertura.ser file anywhere besides the one placed by me in the bin directory.
I am not so keen on writing the code snippet into our codebase to get cobertura to forcefully write the coverage information here, hence would like to seek suggestions as to what else can I do to generate coverage information serialized into the cobertura.ser file.
- Is there anyway to debug the status of cobertura on the server.
- Is there any other work-around to make it serialize without needing to add code to the JBoss runtimes.
Any help is appreciated.
P.S: We used to use an older version of JBoss were apparently the same steps work. So surprised its not working in 6.1.0
With Regards