简体   繁体   中英

TeamCity tests tab won't show up for custom testing framework

Many similar questions already exist but all address specific testing frameworks such as PHP or Junit. I would like to get the tests tab to appear using a custom framework that makes use of service messages along the lines of

##teamcity[testSuiteStarted name = 'Benchmark.Tests'] 

To do its work. Do I still need XML report processing to do this or is there an easier way? My 'tests' are simply checked out of a testing directory, each containing test subdirectories and a little python script for each test. The script outputs service messages to indicate whether the test has succeeded or failed.

How do I get the tests tab to show up for this kind of setup?

For those of you that encounter this problem. This is how I fixed it

The service messages are no joke, they do get the test tab to show up, but for this the following order is needed:

##teamcity[testSuiteStarted name = 'tests'] 
##teamcity[testStarted name='tests.test1']
##teamcity[testFailed name ='tests.test1' message = 'error'] ---->> OPTIONAL!!!!
##teamcity[testFinished name ='tests.test1']
##teamcity[testSuiteFinished name = 'tests'] 

Please note that the third service message is OPTIONAL whereas all the others are REQUIRED . The third service message should only show up for failed tests. For successful tests only three services messages should occur (ie testSuiteStarted, testStarted, testFinished and testSuiteFinished).

In the TeamCity documentation they should really make this a lot clearer. They are presenting a huge list of possible service messages without really specifying which are required and which are optional...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM