Allow to disable the query "Run tests from the last successful build?"
The Tools / Options dialog contains the following settings for running the application:
On Run, when build or deployment errors occur:
"Launch old version", "Do not launch", "Prompt to launch".
If I hit Ctrl-R A to run all tests and the build results in errors, then the following dialog appears:
"There were build errors. Would you like to continue and run tests from the last successful build?"
This is a hassle, in particular when implementing in TDD-style.
It would be very convenient to have the same choice for tests as for application launch:
On Test, when build or deployment errors occur:
"Launch test from the last successful build", "Do not test", "Prompt to test".
Thank you for the feedback. We believe that running tests from a previous build without explicit consent might be potentially confusing. Hence marking this as “declined”.
Visual Studio Team
Matthew Piatt commented
+1 for turning off this dialog. This makes true Test Driven Development (TDD) a huge pain when using Visual Studio.
Rob Hughes commented
They have definitely missed the point. I would NEVER want to run obsolete tests!
Ditto that. When build errors occur, I *NEVER* want to run. Dialog is a nuisance.
Yes, please reconsider this. The ask isn't to automatically run tests against the last build - those are useless if the code is broken. The ask is to get rid of the annoying dialog and run no tests at all.
+1 to the "... missed thne point" comment. I never want to tests to run if my code didn't build as any results are misleading at best.
Ed Kolis commented
What about the ability to turn it permanently OFF, so we don't get nagged about running obsolete tests?
I think you've missed the point. The issue with the message is that running tests from the previous build is never the correct thing to do. If I've chosen to run tests then I clearly want to test the current state of the code, not some historical version. If I run tests on the previous build then any result I get from the test is useless since I don't know what was actually in that build unless it's in source control, in which case I can just get the previous version. All the message does is get in the way of the standard process, which is to immediately fix whatever caused the build to fail.
Please remove the popup from the default code path. No-one ever wants to run the tests from a previous build.
More generally, with just about any popup, there should be an option to prevent it from showing and automatically take whatever choice.