API access newly failed test
Completed
Hello, is there any way how to get the newly failed test via the Rest API?
I found only how to get all failed tests.
Please sign in to leave a comment.
Hello Michal,
You can use newFailure locator part:
/app/rest/testOccurrences?locator=build:(id:<build_id>),newFailure:true
Per my test where two tests were included, with one being an old failure and another (test2) being a new failure:
Please let me know if this works for you.
Hello Fedor,
thanks, it works well! Do you have idea whether this could be called from the kotlin rest client? I wasn't able to find this tag in the code.
Michal,
I assume you mean this implementation: https://github.com/JetBrains/teamcity-rest-client/blob/master/teamcity-rest-client-impl/src/main/kotlin/org/jetbrains/teamcity/rest/implementation.kt (please let me know if you are using another client).
Basing on TestOccurence implementation, it appears that the property is not available on the class. Please note that you can make a pull request with a corresponding change to this repository.