user2323134
user2323134

Reputation: 63

How to get code coverage for tests run using QF test tool

I use QF test tool (http://www.qfs.de/en/qftest/) to run my integrated UI based tests . Is there any tool which can get code coverage of qft test suites ? Note : I use Sonar (jacoco plugin) to get code coverage for Junit tests . I googled a lot and couldn't find any relevant documentation for this . So any links to documentation or example would be helpfull

Upvotes: 1

Views: 1265

Answers (1)

Mahatma_Fatal_Error
Mahatma_Fatal_Error

Reputation: 779

oYes, this is possible. I'm using QF-Test with Jenkins CI, Sonar and JaCoCo.

To keep it short, in QF-Test go to the step which invokes the SUT and add the -javaagent: parameter to the program

e.g.:

-javaagent:/path/to/mvnlib/org.jacoco.agent-0.6.4.201312101107-runtime.jar=destfile=/usr/share/tomcat6/.jenkins/jobs/Integration_Build/workspace/your.program.test/jacoco/jacoco-qf.exec,includes=your.packages.*,output=file

Configure Jenkins (with Jacoco Plugin) to look for jacoco-qf.exec file.

PS: If you use regular Junit Tests you should combine both the coverage of QF-Test and Junit by this Ant script:

<jacoco:merge destfile="${jacoco.file}">
    <fileset dir="${jacoco.report.dir}" includes="*.exec"/>
</jacoco:merge>

Upvotes: 1

Related Questions