Show extra info on overview page

Completed

Hi!

In order to perform re-running of tests, we uncheck "test failures" from Build Failure conditions and send out a service message from the re-running build script to fail the build in case tests fail a second time.

This works, but the overview page becomes somewhat confusing, showing a green build status but red tests!

So some of our devs get confused - can we somehow show a message may saying "tests were successful after re-run" or maybe change the tests status to be successful or ...

4 comments
Comment actions Permalink

In the old UI you can see "The test was run 2 times in the build, 1 failure" somehow I want this to be more present in the UI.

0
Comment actions Permalink

Hello!

Unfortunately, as of now it`s not possible to change the status of the test after it has failed. However, there is a feature request on adding the option to choose if the re-runned test should be marked as successful: https://youtrack.jetbrains.com/issue/TW-48674
As of now, each reported test execution counts independently, so if, for example, you made two test runs and first failed, you`ll end up with two executions, one of them failed:

Please let me know if there is anything else I could assist with.

0
Comment actions Permalink

That was one quick response!

Can we in someway promote that message to the overview part ? (BTW - that text doesn't show in the "Experimental UI")

0
Comment actions Permalink

I have just done a few tests; first of all, I was able to review test traces on build overview with Experimental UI enabled on version 2019.2.3:

The custom message was added with service message (the full script I used is as following):
echo ##teamcity[testStarted name='test1']
echo ##teamcity[testFailed name='test1' message='failure message for test1']
echo ##teamcity[testFinished name='test1']

Secondly, it`s possible to set a custom status for the build with service messages too:

This was done with the following script:
echo ##teamcity[buildStatus text='Some of the tests were successful only after rerun']

In order to use this, you would have to print out above message if a test failure and rerun has been detected during the build.
The build status (i.e. was the build SUCCESS or a FAILURE) is not changed with the usage of this feature, so it`s more a cosmetic feature which still allows to provide user with a hint on any noteworthy build detail. This property may also be changed with REST API.

More on this logic could be found here: https://www.jetbrains.com/help/teamcity/build-script-interaction-with-teamcity.html#BuildScriptInteractionwithTeamCity-ReportingBuildStatus

0

Please sign in to leave a comment.