No Code Coverage Tab in Build Results Page

Hi,

i dont see the tab for Code coverage in the build results page.

Runner : Ant
Java Version : 1.5


Log Details:

[compile.src] EMMA: Instrumenting classes

[11:39:22]: [EMMA: Instrumenting classes] EMMA commandline: [-cp, /apps/tools/TeamCity/buildAgent2/work/f731ac19a97902ec/Axis2TMTClient/build/classes, -m, overwrite]
[11:39:22]: [EMMA: Instrumenting classes] EMMA: processing instrumentation path ...
[11:39:23]: [EMMA: Instrumenting classes] EMMA: instrumentation path processed in 695 ms
[11:39:23]: [EMMA: Instrumenting classes] EMMA: [23 class(es) instrumented, 0 resource(s) copied]
[11:39:23]: [EMMA: Instrumenting classes] EMMA: metadata merged into [/apps/tools/TeamCity/buildAgent2/work/f731ac19a97902ec/coverage.em] {in 32 ms}
[11:39:23]: jar.client
[11:39:23]: [jar.client] jar
[11:39:23]: [jar] Building jar: /apps/tools/TeamCity/buildAgent2/work/f731ac19a97902ec/Axis2TMTClient/build/lib/TMT-test-client.jar
[11:39:23]: EMMA: Create Report (6s)
[11:39:29]: [EMMA: Create Report] Unable to find /apps/tools/TeamCity/buildAgent2/work/f731ac19a97902ec/coverage.ec, cannot create EMMA report
[11:39:29]: Process exit code: 0
[11:39:29]: Publishing artifacts
[11:39:29]: [Publishing artifacts] Paths to publish: [coverage.txt, coverage, coverage.ec, coverage.em]
[11:39:29]: [Publishing artifacts] Publishing artifacts 'coverage.txt' to root artifacts directory
[11:39:29]: [Publishing artifacts] Artifacts path coverage.txt not found
[11:39:29]: [Publishing artifacts] Publishing artifacts 'coverage' to root artifacts directory
[11:39:29]: [Publishing artifacts] Artifacts path coverage not found
[11:39:29]: [Publishing artifacts] Publishing artifacts 'coverage.ec' to root artifacts directory
[11:39:29]: [Publishing artifacts] Artifacts path coverage.ec not found
[11:39:29]: [Publishing artifacts] Publishing artifacts 'coverage.em' to root artifacts directory
[11:39:29]: Build finished




The file coverage.em is generated but , coverage.ec is not generated, and report is not there.


Please help me.


PFA the file coverage.em


Thanks,
Manu


Attachment(s):
coverage.em.zip
3 comments

Hello Manu,

  I suppose there is no coverage.ec because your build didn't run any tests which would involve the instrumented code.
  So coverage runtime information wasn't collected.

  Kind regards,
  KIR

0

Hi Kirill,

Thanks for your mail.

Can you please guide me how to run the tests on our own to get the code coverage.

I thought that the JUnit tests are run automatically when the build is run.

Do we add additional JUnit tests by specifying a XML file in the XML Report Processing under the Ant Build Runner ? also how do we configure a xml file to write our own tests...

please help me.

Thanks a lot.
Manu

0

Hello Manu,

  If you're using Ant build runner you should create an Ant task which runs your tests.
  For your case this would be JUnit task. Please read corresponding Ant docs at
  http://ant.apache.org/manual/OptionalTasks/junit.html

  Hope this helps,
  KIR

0

Please sign in to leave a comment.