Forum Discussion

sameerjade's avatar
sameerjade
Frequent Contributor
6 years ago

Display TestExecute/TestComplete results on TeamCity build log

Hello,

 

I am running my TestComplete tests using the TestExecute command line on TeamCity using batch files. The tests are running ok on TeamCity, however, I do not see any information regarding the passed/failed tests on the TeamCity build log section. On TeamCity it always shows a success irrespective of my tests failing or passing. TestComplete is generating the test results in an html files after running the tests. But I am not sure how to show the test results on the TeamCity build log. I read about the TeamCity service messages here but I am not sure how to use them. Any suggestions? For eg: ##teamcity[testStarted name='testname']

How do I use these messages and where do I enter them?

 

https://confluence.jetbrains.com/display/TCD65/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ReportingTests

 

Thank you.

Regards,

Sameer

    • sameerjade's avatar
      sameerjade
      Frequent Contributor

      VladYatskovskiy Thank you for your reply. Where is the " captureStandardOutput='true' " flag in TeamCity? I could find this flag option in TeamCity UI. 

      Thank you.

  • garyschechter's avatar
    garyschechter
    Occasional Contributor

    My teammate and I are working on better TeamCity intergration.   Right now what we have built is a custom API and a Python script its a bit run around,  and is still loaded with bugs.  Once we have it more refined we will be releasing it to the community,  I have no ETA on our plans to release it.  

     

    Our product is a web application,  we use a git flow methodolgy and TeamCity builds and deploys to a test enviornment for the branch. 

     

    1. TeamCity's python script tells our custom-API to start tests and the environment.  (http://tcapidev/start?=http://webdev521:52319/ )
    2. Our custom API triggers a bat file with "psexec" to launch TestExecute (I would like to switch over to using TE's built in TestRunner API instead of this psexec bat so we have better control to remotely stop the tests).
    3. Our TestExecute/TeamCity project has an OnStartTest event,  determins if it's the first test gets the targetURL, then OnLogEvent's to store errors etc,  and then OnStopTest to post the final state and isPassing of recorded logEvents to our custom API.

      (http://tcapidev/post?sessionID=123&testresult=

      {'testname':'welcome page',

      'isPassing': 'true',

      'log':'{'type':'checkpoint',

      'message':'loaded welcomepage'}

      '}  )

    4. TeamCity's python script peridocialy checks our in house API for these status messages that TestExecute has posted and gives that to the TamCity build log.

    I wish TestComplete's built in API gave this information,  and our Python script could just poll for that instead of having to post it to our own custom API.