Publishing artifact coverage.ic failed using Maven2 runner


TeamCity 5.1.1, Maven2 runner. We are unable to get IDEA code coverage runner from our tests.


[2010-05-12 10:48:57,055]   INFO -    jetbrains.buildServer.AGENT - Publishing artifacts 'coverage.ic' to root artifacts directory
[2010-05-12 10:48:57,056]  DEBUG -    jetbrains.buildServer.AGENT - Files to publish before preprocessing: {}
[2010-05-12 10:48:57,056]  DEBUG -    jetbrains.buildServer.AGENT - Files to publish after  preprocessing: {}
[2010-05-12 10:48:57,056]   INFO -    jetbrains.buildServer.AGENT - Artifacts path  not found
[2010-05-12 10:48:57,056]  DEBUG - r.agent.impl.AgentLogProxyImpl - Later executor invocation
[2010-05-12 10:48:57,073]   WARN -    jetbrains.buildServer.AGENT - Failed to generate coverage report coverage.ic file does not exist
        at jetbrains.buildServer.coverage.idea.IDEACoverageArtifactsProvider.createCoverageData(
        at jetbrains.buildServer.coverage.idea.IDEACoverageArtifactsProvider.beforeBuildFinish(
        at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at jetbrains.buildServer.util.EventDispatcher.dispatch(
        at jetbrains.buildServer.util.EventDispatcher$2.invoke(
        at $Proxy8.beforeBuildFinish(Unknown Source)
        at jetbrains.buildServer.agent.impl.FinishBuildProcessor.finishBuild(
        at jetbrains.buildServer.agent.impl.BuildRunAction$

here is pom.xml snippet

                            <!--suppress MavenModelInspection -->
                            <!--suppress MavenModelInspection -->

Additionaly, we have Maven command line parameters ( TeamCity configuration page of Maven2 runner ):
-Dmaven.junit.fork=true -Dmaven.junit.forkmode=once

Yet, still we see no coverage at all. Any ideas?

Comment actions Permalink

TeamCity Maven coverage supports Surefire only. Feel free to watch/vote for this request:

As for possible workaround, I think you can try to add the following command line argument to JVM process started by failsafe plugin:
-javaagent:${agent.home.dir}/plugins/coveragePlugin/lib/coverage-agent.jar=coverage.ic  true true true true <include pattern regexp>  -exclude <exclude pattern regexp>

agent.home.dir property should be defined by TeamCity

Comment actions Permalink

Pavel / All

Does the lack of maven failsafe integration also apply to tests?

TeamCity is executing our integration tests via failsafe, but not detecting failures, thus passing the build and not parsing the failsafe report.

I find it surprising if this is just not supported as failsafe + teamcity must be a widely deployed combination no?



Comment actions Permalink

As I can see failsafe plugin can generate Surefire reports. If this is true, you can enable XML report processing on the Maven runner settings, and specify there paths to reports produced by this plugin.


Please sign in to leave a comment.