Azure-pipelines-tasks: Optionally fail Visual Studio Test build step if no test assemblies were found

Created on 30 Apr 2017  路  7Comments  路  Source: microsoft/azure-pipelines-tasks

Hi.

Currently, VsTest will just produce a warning if no test assemblies were found.

I'd like for the build step to actually indicate this as an error and fail.

Otherwise, the build could succeed without actually running my tests.
This is problematic if subsequent build steps are only supposed to run if all tests pass.

If this option doesn't also include the scenario where the test assembly was found and loaded but no tests were run, then there should be another option to fail the build step in that scenario as well.

Thank you!

Test

Most helpful comment

Until this is supported natively, I created a Powershell script that can be used in a VSTS task after the VSTest task is executed that checks this.
@janpieterz - if still relevant, this could help you with what you need.

Can be found here: https://github.com/nirlavi/vsts-helpers

All 7 comments

Closing this issue as we have this in our backlog

@nigurr would it be possible to get alerted/follow an issue somewhere to know when this lands?

@janpieterz Can you please raise the request in VSTS user voice https://visualstudio.uservoice.com/forums/330519-team-services
We actively update the features that we accept and deliver.

Hi @nigurr , cheers, done so: https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/20010838-optionally-fail-visual-studio-test-build-step-if-n

@icnocop I copied bits of your text for this, thanks for raising it!

Until this is supported natively, I created a Powershell script that can be used in a VSTS task after the VSTest task is executed that checks this.
@janpieterz - if still relevant, this could help you with what you need.

Can be found here: https://github.com/nirlavi/vsts-helpers

...Can you please raise the request in VSTS user voice https://visualstudio.uservoice.com/forums/330519-team-services
We actively update the features that we accept and deliver.

...done so: https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/20010838-optionally-fail-visual-studio-test-build-step-if-n

That UserVoice instance is no longer available. Is there a new link to follow this?

Seems like #11328 is now tracking this issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

syltaxue picture syltaxue  路  3Comments

richard-ob picture richard-ob  路  3Comments

jared-hexagon picture jared-hexagon  路  3Comments

timfish picture timfish  路  3Comments

alexszilagyi picture alexszilagyi  路  3Comments