how to configure team city to show test results of remote server(SSH Exec)
I have a remote server where I am executing some python unit tests.
below is the log from teamcity :
Step 2/6: run all tests (1) (SSH Exec) (2s)
[15:46:45][Step 2/6] Executing commands: nosetests simple.py on host [XXX.XX.XXX.XXX]
[15:46:46][Step 2/6] ..
[15:46:46][Step 2/6] ----------------------------------------------------------------------
[15:46:46][Step 2/6] Ran 2 tests in 0.001s
[15:46:46][Step 2/6]
[15:46:46][Step 2/6] OK
[15:46:46][Step 2/6] SSH exit-code [0]
How should I parse this logs to display test results in test tab of teamcity?
Please sign in to leave a comment.
Hi,
In order to get a tests tab in teamcity, teamcity needs to know that tests have been run. This can be accomplished in two different ways:
-XML Report processing https://confluence.jetbrains.com/display/TCD10/XML+Report+Processing. For it, the test suite will need to output the tests in a compatible format, then you will need to pick them up from the remote server into the build agent, and then import the file into teamcity.
-Service messages https://confluence.jetbrains.com/display/TCD10/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ReportingTests. The test platform will need to post back through to stdout some specially formatted messages that teamcity can understand and translate into the tests tab
@Denis - I am running tests using python. any example you can provide ?
I don't really have examples, but for python in particular there is a plugin here: https://github.com/JetBrains/teamcity-messages. You might need to adapt some of the tests, but it should be good.