Statistical information is not available through REST until the end of the assembly.

We create an installation that will send statistical information to an external server when creating the application. There is the following assembly configuration with several steps.

  • The 1st step creates an application and runs unittests.
    • As a result, a set of xml files is created (the result of nUnit execution)
  • 2nd step to publish a Write-Host "##teamcity[importData type='nunit' path='%report.monitoring.rules%' parseOutOfDate='true' verbose='true']" message Write-Host "##teamcity[importData type='nunit' path='%report.monitoring.rules%' parseOutOfDate='true' verbose='true']" to process them.
  • The third step is to access the statistical information from the test run. Either through variables or REST api. So far, he has requested the following Invoke-WebRequest -uri http://[host]/httpAuth/app/rest/builds/id:$buildId/statistics -Credential $creds -Headers @{"accept"="application/json"}

The problem is that in the third stage I can not get statistical information, even if a pause is added. However, as soon as complete statistics are built (for example, this line in the response <property name="TotalTestCount" value="2"/> )

Question: Is it possible to access trial run information during assembly?

+7
source share
1 answer

Based on your documentation , it would seem that you can get the information you need by sending a request to a URL, for example :: http: // teamcity: 8111 / app / rest / testOccurrences? Locator = build: (id: XXX), currentlyFailing : true

0
source share

All Articles