microsoft / vstest

Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
MIT License
889 stars 320 forks source link

failOnMinTestsNotRun doesn't appear to work correctly #5017

Open jve72 opened 5 months ago

jve72 commented 5 months ago

Description

Have an ADO pipeline using the JustMockVSTest@2 task, which sets a couple of env vars and then forwards the inputs and work to the VSTest@2 task.

I have a test dll that, while it does actually have tests in it, its build doesn't include the test adapter as part of its output, so VSTest is unable to enumerate the test cases to execute them.

I assumed the failOnMinTestsNotRun should catch this case, as there are no test cases run, but the build happily completes successfully!

Steps to reproduce

Explained in Description

Expected behavior

No tests run, task/build fails

Actual behavior

No tests run, task/build succeeds

Diagnostic logs

Attempt--1_p5u4gv.txt

Environment

This is a .Net 4.5 project on vmImage: 'windows-2019'.