0

I'm looking for some tool which will provide me the code coverage of my functional tests (Not the unit testing code coverage ). To elaborate more, assume QA team executes their tests suites using selenium. At the end of the tests, I would like to know the amount of code (target code , not the test code base) got invoked / tested .

I found a similar post for .Net , but in my case the webserver is Apache and application server is jBoss

Coverage analysis for Functional Tests

Also, we have never done this type of analysis before, is this worth the effort, anyone who tried it ?

2 Answers 2

1

I used to do code coverage testing on assembly code and Java code. It is definitely worth it. You will find as you get the coverage close to 100% that it gets more and more difficult to construct tests for the remaining code.

You may even find code that you can prove can never be executed. You will find code on the fringes that has never been tested and you will be forced to run multi user tests to force race conditions to occur, assuming that the code had taken these into account.

On the assembly code, I had a 3000 line assembly program that took several months to test, but ran for 9 years without any bugs. Coverage testing proved its worth in that case as this code was deep inside a language interpreter.

As far as Java goes I used Clover: http://www.atlassian.com/software/clover/overview

This post: Open source code coverage libraries for JDK7? recommends Jacoco, but I've never tried it.

Sign up to request clarification or add additional context in comments.

5 Comments

I also used Emma: emma.sourceforge.net, but it hasn't been updated in years and we switched to Clover even though it is expensive.
Thanks but I was specifically talking about functional test coverage and not the unit test , I don't believe Clover provides that, does it ?
It used to provide general code coverage tools. I used it for functional testing a few years ago. Maybe the current craze for unit tests has changed that.
blogs.atlassian.com/2009/05/clover_25_relea discusses using clover for functional and acceptance testing.
This old blog post recommends the free Jacoco for functional testing: kurlenda.blogspot.ca/2010/12/…
0

Thanks for the pointers @Peter Wooster. I did a lot of digging into the clover documentation but unfortunately there is not even a good indication that functional / integration is supported by clover, leave alone a good documentation. Lucky I got to a link within the clover documentation itself which talks about this and looks promising (Thanks to Google search). I was using the ant so didn't even search in this Maven2 area. This talks about ant as well though :)

https://confluence.atlassian.com/display/CLOVER/Using+Clover+in+various+environment+configurations

I will be trying this , will update more on this soon !

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.