How to get test order from rest api?

Hello,

I am using api calls like:
http://localhost/guestAuth/app/rest/testOccurrences?locator=build:(id:5752)&fields=count,testOccurrence(id,status,duration,name,test(id))

I would like to know get the order of the test as described in this documentation:
https://confluence.jetbrains.com/display/TCD9/Working+with+Build+Results#WorkingwithBuildResults-AllTests

Order: "Shows the sequence in which the tests were run. Click the header above this column to sort by the test order number."

I couldn't guess the field name that would provide me that information; I tried timestamp and order.

Thank you

3 comments
Comment actions Permalink

Hello Tam,

It's not possible to get tests order via REST API, however tests are returned sorted by the order of the execution. Also you can download tests in .csv format from the Tests tab, it contains the Order# column.

0
Comment actions Permalink

Hi Alina,

I am not seeing the return tests in order of execution. I am looking at both the xml and json responses.  My server version is 9.1.6 (build 37459).

0
Comment actions Permalink

Hi Tam,

Sorry for delay. Could you please provide an example: a screenshot of the tests order in TeamCity UI and the xml response?

0

Please sign in to leave a comment.