TC (4.0) reporting wrong number of tests

Hi for some reason, my TeamCity is reporting more test results, thus reassuring us more than what we should be

I am also generating junit HTML and that contains correct number; for some reason TC is reporting more tests - any ideas ?

I am using ANT runner.


Comment actions Permalink


Can you please include a snippet of the test running task from your Ant script?
Do you use bundled Ant? Any specific settings of the runner?
Also, what is the difference between the actual and TeamCity-reported tests count?

Best regards,

Yegor Yarko
Project Manager (TeamCity)
JetBrains, Inc
"Develop with pleasure!"

Comment actions Permalink

One thing; the wrong results are basically when I am using Cobertura for code coverage. If I do not use it (and use EMMA instead) then the test count is correct. The test numbers are doubled (and so are test failure reports i.e. one failure is reported twice).

thanks a lot

<target name="test" depends="softdistcomplete" description="Run the unit tests">
    <junit errorProperty="junit.failed" failureProperty="junit.failed" fork="yes" maxmemory="512m" printsummary="yes">
      <jvmarg value="-server"/>
        <pathelement location="${dist}/FrameworkComplete.jar" />

      <formatter type="xml" usefile="true" />
      <batchtest todir="${junit.reports}">
        <fileset dir="${classes}" includes="**/*Test.class">
          <exclude name="**/*Integration*" />
          <exclude name="**/*PerfTest*" />
          <exclude name="**/*JFreeChartPlotter*"/>
    <junitreport todir="${junit.reports}">
      <fileset dir="${junit.reports}">
        <include name="TEST-*.xml" />
      <report format="frames" todir="${junit.reports}/html" />
    <fail message="Test Cases Failed" if="junit.failed" />


Comment actions Permalink


TeamCity does not rely on JUnit task XML reports (at least until you install additional plugins). What we do is attaching a listener to the JUnit task and reporting the resutls in real time.
Is there any possibility the tests are actually run twice in the single build when you use Cobertura? Can you attach a build log when the tests are reported doubled?


Please sign in to leave a comment.