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.

thanks

3 comments
Comment actions Permalink

Asif,

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
http://www.jetbrains.com
"Develop with pleasure!"

0
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"/>
      <classpath>
        <pathelement location="${dist}/FrameworkComplete.jar" />
      </classpath>

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

  </target>

0
Comment actions Permalink

Asif,

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?

0

Please sign in to leave a comment.