Forum Discussion

escap89's avatar
escap89
Contributor
9 years ago

TestComplete test results in TeamCity

Hello!:)

 

I wanted to ask if its posibble - and maybe some tip ^^ how to make my test results looks better in build results page in TeamCity.

 

If its not that easy then i will just use artifact /new tab and gonna check it everytime i will see "Exit code 1"

 

But that info massage looks silly so i decided to ask you guys :)

 

My .proj file  for msbuild looks like:

<Project DefaultTargets="Build"

  xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

 

  <!-- Declares the task type, ExecuteSolution, that will be used to run TestComplete projects (TC11 is a namespace). --> 

  <UsingTask TaskName="TC11.ExecuteSolution" AssemblyName= "MSBuildTC11Task, Version=1.1.0.0,

Culture=neutral, PublicKeyToken=e33f56e68d0f845e"/>

 

  <!-- Target -->

  <Target Name="Build">

 

  <!-- Executes the task. Note that the tag name, ExecuteSolution, coincides with the registered task name.   -->

    <ExecuteSolution

      SolutionFile="D:\TC_Projects\Wpius1_12_2\Wpius1_12_2\Wpius1_12_2.pjs"

      StopIfFail="true"

      AdditionalOptions="/p:Wpius1_12_2"

      GUIInteractive="true"

     LogFile="D:\TestCompleteTests\MyResults_build_$(buildnumber).mht"

    />

  </Target>

Above screenshots, hope there is easy way to fix it.

 

  • AlexKaras

    Before i created that topic i have readed both ur links like 3 times :)

    But thanks anyway.

     

     

    Colin_McCrae

    Ok i unchecked all common "Failure Conditions" and created my own like

    if build log contains "The test failed".

    and it works.

    Well, my tests generate mht file i  will add is as artifact and convert it with extractmht10 to html then ill try add a TAB in TeamCity.

     

    Thanks for all.

    /Seb

     

    • Colin_McCrae's avatar
      Colin_McCrae
      Community Hero

      My tests produce a little HTML summary file on completion of the run. This is picked up by TeamCity and included as a clickable link on the page after a build has completed and the tests have run.

       

      It looks at a couple of tags within the file to determine if the run overall was a pass or fail. Clicking the link gets you headline figures (so times, tests attempted/passed/failed ... that sort of thing). And there are links on there that take you directly to the more detailed results and log files so you can drill down to as much detail as you need. The starting point for all this is the project page on TeamCity.

       

      I should add, I run my own framework which produces it's own results and log files. So everything is proprietary and built to allow multiple layers of drill-down as not everyone wants the same thing from a set of test results. Managers want headline figures, test and dev analysts want detail of what a test did and EXACTLY where it went wrong.

       

      I'll also add that I didn't do the TeamCity setup. We have a build engineer who dealt with that. I simply provided him with the project repo location in version control. Ditto where all the test packs are. Set up a BAT file to start the test. (Which is simple - every single project or test I produce all run off the same "Driver" script unit. That reads in all the user populated keywords and data to determine what tests are actually run. So the BAT file is always the same.) And finally output the HTML file containing headline figures and links to more detail. So the build engine pulls down the latest TC script code. The latest test packs. Runs. Checks the exit code from TE. Looks for the HTML file. Parses it (if present). Writes appropriate output to TeamCity. Having everything data driven and being able to (initially) report at a VERY high level makes this WAY easier.

  • AlexKaras

    Before i created that topic i have readed both ur links like 3 times :)

    But thanks anyway.

     

     

    Colin_McCrae

    Ok i unchecked all common "Failure Conditions" and created my own like

    if build log contains "The test failed".

    and it works.

    Well, my tests generate mht file i  will add is as artifact and convert it with extractmht10 to html then ill try add a TAB in TeamCity.

     

    Thanks for all.

    /Seb