Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amended Publish Test Results task to fail build if test failures are present in the attached files. #6240

Closed
wants to merge 2 commits into from

Conversation

T-rav
Copy link

@T-rav T-rav commented Jan 17, 2018

This pull request is to address issue #1268
The recommended solutions did not fix my version of this issue.
I have an external process, Katalon Studio, that runs UI test and does not report back the test run status to TFS.
This means I need to rely upon the Publish Test Results task being more intelligent and failing the build if test failures are detected in the attachments.

I did look at other proposed solutions in the issue and they are inadequate or not easy to repeat across builds.

Taking @alejandro5042 suggetion I added a check box.
screen-shot-deployed-to-my-vsts-instance

If FAILED is detected, in any of the attachments, the build is marked as failed.

…he build to fail if test failures are detected in the attached results files.
@msftclas
Copy link

msftclas commented Jan 17, 2018

CLA assistant check
All CLA requirements met.

@T-rav T-rav changed the title Amended Publish Test Results task to include a checkbox that allows the build to fail of test failures are present in the attached files. Amended Publish Test Results task to fail build if test failures are present in the attached files. Jan 17, 2018
@MirzaSikander
Copy link

MirzaSikander commented Feb 10, 2018

This is great! When will this be available. I currently don't see it in the Publish Test Results Task.

@prawalagarwal
Copy link
Member

@T-rav I am afraid this is not the right fix. Based on the runner you can have different content in the result files. For eg. for VsTest runner, trx files have aggregated reporting in the end which says "Failed=0" when there are no failed tests. With your fix, this will too fail the task. Also, this match is case sensitive which is again based on the runner. @vinodjo will update the issues thread with the latest information on this.

@krishnand
Copy link

@vinodjo - Do we know when this is going to be rolled out?.

@vinodjo
Copy link

vinodjo commented May 17, 2018

@krishnand, The purpose of Publish Test Results Task is to report the test results, hence if task is able to report all the results successfully it is marked as success even if it there were test failures. Since we have received a few requests on this, I have added this to our backlog. However this is more than just looking for failed test, but also multiple result formats along with multiple outcomes that could be treated as failures (other than failed). Unfortunately at this stage I don’t have any concrete information on the timeline to share with you.

In the interim, here is a sample that queries the failed tests and returns failure, which you can refer to enable the expected behavior

@lqueryvg
Copy link

Wow. Why would anyone not want this feature ?
I'm struggling to get my head around this...
Again... why would anyone want a build definition which runs tests and always succeeds, even if the tests failed ???

You could at least implement an option (as per this pull request).
Or create a variable which a subsequent task can read and make use of.

If you (Microsoft) are saying that the purpose of the publish task is ONLY to publish results, then where is the task which helps the user interpret the test results ? Or is every user expected to parse the test output in their own way ?

Surely this publish task is the obvious and natural place to implement this functionality ?

@stephenmichaelf
Copy link
Member

@prawalagarwal Should we close this?

@krlydm
Copy link

krlydm commented Sep 5, 2018

Any update on this?

@stephenmichaelf
Copy link
Member

Closing due to age, please reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants