Unit Test code coverage report

298 views
Skip to first unread message

Andrey Pohilko

unread,
Jun 11, 2013, 5:15:31 AM6/11/13
to jmeter-...@googlegroups.com
For our developers, emma code coverage report is available here: http://jmeter-plugins.org/img/target/site/emma/

Cheen-Pin Lim

unread,
Jun 11, 2013, 9:21:19 AM6/11/13
to jmeter-...@googlegroups.com
Hi Andrey,

I was surprised to see that the WebDriverConfig and its subclasses had such low coverage, as I'd taken the extra effort to integrate PowerMock into the system to ensure that the Selenium classes can be mocked correctly.  Then I found this: https://code.google.com/p/powermock/issues/detail?id=402 It seems that EMMA (v2.0+) has difficulty tracking powermock classes, hence gave the WebDriverConfig classes almost zero coverage. It seems the problem has to do with the Jacoco library/framework that EMMA 2.0+ uses.  

If we do want to measure our code coverage properly, I guess we could either downgrade to EMMA v1.5+ or use another library (not sure what to use as Cobertura hasn't been updated in a while). 

I do think that the code coverage metric is a useful tool in measuring our code quality though.

regards,
CP



On 11 June 2013 19:15, Andrey Pohilko <a...@apc.kg> wrote:
For our developers, emma code coverage report is available here: http://jmeter-plugins.org/img/target/site/emma/

--
You received this message because you are subscribed to the Google Groups "jmeter-plugins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmeter-plugin...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Cheen-Pin Lim

unread,
Jun 11, 2013, 9:31:21 AM6/11/13
to jmeter-...@googlegroups.com
Actually Cobertura looks like they might get a 2.0 release soon.  Their website has had an update since 2010! Yay!

Stéphane Hoblingre

unread,
Jun 11, 2013, 11:17:18 AM6/11/13
to jmeter-...@googlegroups.com
Hi Andrey!

That's good news! I hope I'll have time again to work on the project, I really miss it... :(
I have one new sampler in mind, which could do load testing of GUI based application (in master/slave, one gui running in each slave).
That may be great feature to allow JMeter to loadtest ANY application, web or not :)

See you,

Stef

Andrey Pohilko

unread,
Jun 12, 2013, 2:10:36 PM6/12/13
to jmeter-...@googlegroups.com
Nice to have you back, Stef!

вторник, 11 июня 2013 г., 19:17:18 UTC+4 пользователь Stef написал:

Andrey Pohilko

unread,
Jun 12, 2013, 2:12:17 PM6/12/13
to jmeter-...@googlegroups.com
I'm not sure about cobertura, I had no success with it in Maven, but I tried. Emma looks much more simple to use, but it really have problems that you mentioned. 

вторник, 11 июня 2013 г., 17:31:21 UTC+4 пользователь CP Lim написал:

Matthew Fremont

unread,
Jun 17, 2013, 11:06:57 PM6/17/13
to jmeter-...@googlegroups.com
Andrey,

Were you having trouble getting cobertura to run from Maven, or with settings for the reports?

I ran "mvn cobertura:cobertura" against master and it generated reports in target/site/cobertura, even with a few failing unit tests.

cobertura-maven-plugin 2.5.2 and cobertura 1.9.4.1 reports 99% line coverage for com.googlecode.jmeter.plugins.webdriver.config.

CP, is this more in line with your expectations?


Matthew

Cheen-Pin Lim

unread,
Jun 18, 2013, 2:07:19 AM6/18/13
to jmeter-...@googlegroups.com

Hi

Yes the coverage is what I see within my ide

Regards
CP

Andrey Pohilko

unread,
Jun 18, 2013, 9:27:48 AM6/18/13
to jmeter-...@googlegroups.com
Jenkins Cobertura plugin requires XML report from cobertura. Do you know how to set it up for Maven?

вторник, 18 июня 2013 г., 7:06:57 UTC+4 пользователь Matthew Fremont написал:

Cheen-Pin Lim

unread,
Jun 18, 2013, 9:50:04 AM6/18/13
to jmeter-...@googlegroups.com
I think if you specify xml for the format (http://mojo.codehaus.org/cobertura-maven-plugin/cobertura-mojo.html#format) it should output XML files.  Not sure if its the XML file format that jenkins requires though....

Matthew Fremont

unread,
Jun 18, 2013, 10:33:36 AM6/18/13
to jmeter-...@googlegroups.com
On Tuesday, June 18, 2013 9:50:04 AM UTC-4, CP Lim wrote:
I think if you specify xml for the format (http://mojo.codehaus.org/cobertura-maven-plugin/cobertura-mojo.html#format) it should output XML files.  Not sure if its the XML file format that jenkins requires though....


On 18 June 2013 23:27, Andrey Pohilko <a...@apc.kg> wrote:
Jenkins Cobertura plugin requires XML report from cobertura. Do you know how to set it up for Maven?

Yep, looks easy enough to turn on XML format: https://wiki.jenkins-ci.org/display/JENKINS/Cobertura+Plugin

I made the POM addition. "mvn clean cobertura:cobertura" generates target/site/cobertura/coverage.xml. Give my pull request a try and see if that works with the Jenkins Cobertura plugin.

If this doesn't work, I can check with a colleague who has extensive experience with Jenkins.


Matthew 

Andrey Pohilko

unread,
Jun 18, 2013, 12:43:01 PM6/18/13
to jmeter-...@googlegroups.com
Thank you very much, Matthew!

Now we have a cobertura report: http://jmeter-plugins.org/img/target/site/cobertura/

вторник, 18 июня 2013 г., 18:33:36 UTC+4 пользователь Matthew Fremont написал:
Reply all
Reply to author
Forward
0 new messages