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!
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.
That UserVoice instance is no longer available. Is there a new link to follow this?
Seems like #11328 is now tracking this issue
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