Reputation: 7399
I have a build step that reports the number of run tests to TeamCity.
I would like access this number (and other data) in a subsequent build step, ideally from a python or powershell script.
Looking at TeamCity messages, they seem to only allow transmitting data from the script to TeamCity, not the other way around.
How can I access the number of succeeded/failed tests from a script in a subsequent build step?
Upvotes: 1
Views: 1615
Reputation: 2211
There is one service message which allows to change parameter (environment variable, for example) for subsequent steps, see: http://confluence.jetbrains.com/display/TCD7/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-AddingorChangingaBuildParameter
Upvotes: 1
Reputation: 301147
One simple way that I can think of is to put that data in a file - say "TestResults.txt".
In the next build step, read the txt file with normal file operations.
You can even do this across build configurations by making this file an artifact in one configuration and fetching it in another.
Upvotes: 1