Running several JUnit anttasks and getting them all in the reportfile

Hi

I have a setup where we have our application split into several modules. These modules have their own sets of JUnittests and i would like to run them in one configuration.

Atm i have moved two of them from their own configuration into one configuration with two buildsteps. It runs fine but when both succedes i only get the report in teamcity from the last module run.

Any idea what im doing wrong?

Best regards
Peter Rasmussen

3 comments
Comment actions Permalink

Peter,

Do you use XML report processing to import JUnit tests into TeamCity? If yes, please ensure the report files do not overwrite each other.

BTW, if you use standard junit Ant task to run tests, tests should be detected and reported by TeamCIty without any configuration and without XML reports generation. Isn't it the case in your setup?

0
Comment actions Permalink

Hi Yegor

I dont use reportfiles as i am counting on TS to hook into the runs itself. I have the following ant target:

          <junit fork="true" printsummary="true" showoutput="true" failureproperty="junit.failure" haltonfailure="false" haltonerror="fail" logfailedtests="true">

               <classpath refid="class.path.unittest.model"/>
               <formatter type="xml" usefile="false" />
               <sysproperty key="user" value="${DBuser}"/>
               <sysproperty key="password" value="${DBuserpassword}"/>

               <batchtest fork="yes" >
                   <fileset dir="${src.test}">
                         <include name="**/*.java"/>

                   </fileset>                </batchtest>           </junit>           <fail if="junit.failure" message="Unit test(s) failed.  See reports!"/>

The same problem can be seen from the EMMA coverage.
Could it be the formatter statement?
I am using the TS ant runner to run this target.

0
Comment actions Permalink

Anyone have more suggestions for this one?

0

Please sign in to leave a comment.