TeamCity EAP 5 build 10380 - IDEA code coverage not displaying any results

I would like to switch from using EMMA to IDEA code coverage to take advantage of the in memory instrumentation, I changed the settings under the Ant build runner and I tried a combination of package names in the "Classes to instrument"  but the code coverage tab does not display any coverage result:

----------------------------------------------------------
[ all classes ]
Overall Coverage Summary

Package
all classes


Coverage Breakdown
----------------------------------------------------------

In the log file I can see

[18:15:30]: [UnitTestStudio] IDEA Coverage: Java agent added to JUnit task
[18:15:30]: [UnitTestStudio] junit (39s)

[18:16:19]: Publishing artifacts
[18:16:19]: [Publishing artifacts] Paths to publish: [C:\TeamCity\BuildAgent\work\86ec2b9d4d7df214\coverage.ic]
[18:16:19]: [Publishing artifacts] Publishing artifacts 'coverage.ic' to root artifacts directory
[18:16:19]: Publishing artifacts
[18:16:19]: [Publishing artifacts] Paths to publish: [C:\TeamCity\BuildAgent\work\86ec2b9d4d7df214\coverage.params]
[18:16:19]: [Publishing artifacts] Publishing artifacts 'coverage.params' to root artifacts directory
[18:16:19]: Generating coverage report...
[18:16:19]: Publishing artifacts
[18:16:19]: [Publishing artifacts] Paths to publish: [C:\TeamCity\BuildAgent\work\86ec2b9d4d7df214\coverage.zip]
[18:16:19]: [Publishing artifacts] Publishing artifacts 'coverage.zip' to root artifacts directory
[18:16:20]: Calculating coverage statistics...

I noticed that by changing the include pattern the coverage.ic file size changes but not the coverage.zip

I am compiling against JDK 1.6 and I am not using IntellJ IDEA as IDE, but that does not seem to be a requirement from the documentation.
Does anyone have any idea why this is not working?

0
7 comments

Could you please try this in the new EAP build (10455)? There should be coverage-errors.log file published as build artifact if exceptions occured during coverage gathering.

0

Hi,

I had little time to try this recently, this is my scenario (tried with build 10522).

Class UDOElement in package citynet.common.udo has a 100%/62%/32% class/method/block coverage when running EMEA. When using IDEA I get nothing.

I have tried the following values in the "Classes to instrument:":
citynet.common.udo
citynet.common.udo.*
citynet.common.udo.UDOElement

These are the respective logs (I cannot see any coverage-errors.log file)

[13:19:02]: [UnitTestStudio] IDEA Coverage: Java agent added to JUnit task
[13:19:02]: [UnitTestStudio] junit (34s)
[13:19:02]: [junit] ---- IDEA coverage runner ----
[13:19:02]: [junit] sampling ...
[13:19:02]: [junit] include patterns:
[13:19:02]: [junit] citynet\.common\.udo
[13:19:02]: [junit] exclude patterns:
[13:19:02]: [junit] -exclude
[13:19:02]: [junit] sun.reflect.*
[13:19:03]: [junit] Running citynet.common.udo.ElementAttributeTest
[13:19:04]: [junit] citynet.common.udo.ElementAttributeTest
[13:19:04]: [citynet.common.udo.ElementAttributeTest] testElementAttributeStringString
[13:19:04]: [citynet.common.udo.ElementAttributeTest] testGetName
[13:19:04]: [citynet.common.udo.ElementAttributeTest] testSetName
[13:19:04]: [citynet.common.udo.ElementAttributeTest] testGetValue
[13:19:04]: [citynet.common.udo.ElementAttributeTest] testSetValue
[13:19:04]: [citynet.common.udo.ElementAttributeTest] testToXML
[13:19:04]: [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.687 sec

*****************

[UnitTestStudio] IDEA Coverage: Java agent added to JUnit task
[12:06:18]: [UnitTestStudio] junit (33s)
[12:06:18]: [junit] ---- IDEA coverage runner ----
[12:06:18]: [junit] sampling ...
[12:06:18]: [junit] include patterns:
[12:06:18]: [junit] citynet\.common\.udo\..*
[12:06:18]: [junit] exclude patterns:
[12:06:18]: [junit] -exclude
[12:06:18]: [junit] sun.reflect.*
[12:06:19]: [junit] Running citynet.common.udo.ElementAttributeTest
[12:06:19]: [junit] citynet.common.udo.ElementAttributeTest
[12:06:19]: [citynet.common.udo.ElementAttributeTest] testElementAttributeStringString
[12:06:19]: [citynet.common.udo.ElementAttributeTest] testGetName
[12:06:19]: [citynet.common.udo.ElementAttributeTest] testSetName
[12:06:19]: [citynet.common.udo.ElementAttributeTest] testGetValue
[12:06:19]: [citynet.common.udo.ElementAttributeTest] testSetValue
[12:06:19]: [citynet.common.udo.ElementAttributeTest] testToXML
[12:06:19]: [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.453 sec

******************

[UnitTestStudio] IDEA Coverage: Java agent added to JUnit task
[11:38:31]: [UnitTestStudio] junit (35s)
[11:38:31]: [junit] ---- IDEA coverage runner ----
[11:38:31]: [junit] sampling ...
[11:38:31]: [junit] include patterns:
[11:38:32]: [junit] citynet\.common\.udo\.UDOElement
[11:38:32]: [junit] exclude patterns:
[11:38:32]: [junit] -exclude
[11:38:32]: [junit] sun.reflect.*
[11:38:32]: [junit] Running citynet.common.udo.ElementAttributeTest
[11:38:32]: [junit] citynet.common.udo.ElementAttributeTest
[11:38:32]: [citynet.common.udo.ElementAttributeTest] testElementAttributeStringString
[11:38:32]: [citynet.common.udo.ElementAttributeTest] testGetName
[11:38:32]: [citynet.common.udo.ElementAttributeTest] testSetName
[11:38:32]: [citynet.common.udo.ElementAttributeTest] testGetValue
[11:38:32]: [citynet.common.udo.ElementAttributeTest] testSetValue
[11:38:32]: [citynet.common.udo.ElementAttributeTest] testToXML
[11:38:32]: [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.422 sec

0

Are there coverage.ic and coverage.params files in the build artifacts?

0

Sorry for delay, but is it still actual with latest TeamCity release?

0
Avatar
Permanently deleted user

I am looking into this now.
TeamCity Enterprise Version 5.1.3 (build 13506)
The problem is still same. IDEA code coverage not displaying any results.

0

Could you please submit bug report with coverage files attached, and with build log. Please provide details whether coverage is available in the web UI and in IDE plugin.

0

Please sign in to leave a comment.