You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to decide this based on telemetry data of ordered tests usage?
Steps to reproduce
What steps can reproduce the defect?
Please share the setup, sample project, target platform (desktop, core, uap)
Expected behavior
Share the expected output
Actual behavior
What is the behavior observed?
Environment
Please share additional details about the test environment.
Operating system, Build version of vstest.console, Package version of MSTest
framework and adapter
Reacted by Philip Patrick, Stefan Tucker, sdj, Jared, Maximilian Chaplin, Denys Ivchenko, Thomas VAILLIER, Whit Waldo and bvbellomo
We should support ordered tests in a generic manner and not restrict it to only MSTest framework based tests - perhaps as yet another extension point offered by the test platform.
Reacted by Abhitej John, Eugene Bekker, VitoHanoi, J.D. Cain, Ryan Hill, sdj and n0sleep
We have an app (on multiple platforms) where a lot of the code is in C++. We use a very thin cross-platform wrapper for writing unit tests. The wrapper internally uses CPPUnitTestFramework for unit testing on Windows.
Sometimes, when running the unit tests one of the tests will fail, and that will result in some of the tests that are executed after the failed test, to fail as well. Most of the times the fix is a trivial one, but time is spent in segregating the test which actually failed from those that failed as a result of some remnant of the earlier failed test.
We would like to know if there is a way to determine the order in which the unit tests are run inside Visual Studio. This will help us in determining the failing test quickly, and help resolve issues faster.
Moreover, it would be good to have a mechanism to control the order of the execution of the unit tests inside Visual Studio.
divijkumar : Ideally tests should be isolated units and should not adversely affect other tests. They do so by ensuring that the right cleanup is done even if a test fails. When this is not possible for some reason, you could turn on diagnostic logs(link for the default test platform, link for the new cross plat test platform) to figure out what order they actually ran.
Yes, this issue should probably cover providing ordered test support for C++ based tests as well.
I'm not a huge fan of ordered tests, but they do serve a purpose (e.g. integration testing by sequencing many unit tests). That said, one would expect the default behavior of VS 2017 to just work.
Reacted by Loris Bognanni, pablozanetti, Swellenator, Denys Ivchenko, Lesky Alfonso Martinez and Gustavo Russo
I wanted to know if this was any plan for adding built in support for testorder to the roadmap.
We currently have some workarounds but they are rather ugly implementations with custom scripts reading a defined order and calling vstest.console.exe for each individual test.
Come on guys, it has been over 2 years now and there is still no update/fix0 on this issue? Ordered tests are now a norm especially for Selenium based GUI tests developed using VS C#. I had to ditch MSTest in favour of NUnit just because MSTest didn't support ordered tests.
Reacted by Stefan Tucker, Jan 'spl!te' Kondelík, Abu Ali Muhammad Sharjeel and Denys Ivchenko
I'd like to see support for ordered tests primarily to ensure that I can execute a set of smaller unit tests sequentially comprising a larger integration test.
Activity
sbaid commentedon Dec 9, 2016
Harsh Jain (@harshjain2) Do we have telemetry data of usage of ordered tests, generic tests?
sbaid commentedon Dec 9, 2016
pvlakshm (@pvlakshm) to keep u in loop
AbhitejJohn commentedon Dec 11, 2016
I believe pvlakshm (@pvlakshm) has also filed a user voice item for this.
codito commentedon Dec 12, 2016
https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/16417609-enable-ordered-test-support-for-mstest-v2-framewor
pvlakshm commentedon Feb 24, 2017
We should support ordered tests in a generic manner and not restrict it to only MSTest framework based tests - perhaps as yet another extension point offered by the test platform.
divijkumar commentedon May 23, 2017
We have an app (on multiple platforms) where a lot of the code is in C++. We use a very thin cross-platform wrapper for writing unit tests. The wrapper internally uses CPPUnitTestFramework for unit testing on Windows.
Sometimes, when running the unit tests one of the tests will fail, and that will result in some of the tests that are executed after the failed test, to fail as well. Most of the times the fix is a trivial one, but time is spent in segregating the test which actually failed from those that failed as a result of some remnant of the earlier failed test.
We would like to know if there is a way to determine the order in which the unit tests are run inside Visual Studio. This will help us in determining the failing test quickly, and help resolve issues faster.
Moreover, it would be good to have a mechanism to control the order of the execution of the unit tests inside Visual Studio.
AbhitejJohn commentedon May 23, 2017
divijkumar : Ideally tests should be isolated units and should not adversely affect other tests. They do so by ensuring that the right cleanup is done even if a test fails. When this is not possible for some reason, you could turn on diagnostic logs(link for the default test platform, link for the new cross plat test platform) to figure out what order they actually ran.
Yes, this issue should probably cover providing ordered test support for C++ based tests as well.
rhundhausen commentedon May 24, 2017
I'm not a huge fan of ordered tests, but they do serve a purpose (e.g. integration testing by sequencing many unit tests). That said, one would expect the default behavior of VS 2017 to just work.
JDCain commentedon Aug 9, 2018
I wanted to know if this was any plan for adding built in support for testorder to the roadmap.
We currently have some workarounds but they are rather ugly implementations with custom scripts reading a defined order and calling vstest.console.exe for each individual test.
melleck commentedon Jan 30, 2019
Come on guys, it has been over 2 years now and there is still no update/fix0 on this issue? Ordered tests are now a norm especially for Selenium based GUI tests developed using VS C#. I had to ditch MSTest in favour of NUnit just because MSTest didn't support ordered tests.
14 remaining items
N-Olbert commentedon Jan 3, 2023
Amaury Levé (@Evangelink) Due to the conversation in #821 maybe this issue should be reopened
Evangelink commentedon Jan 6, 2023
Reopened for investigation if that's something we want to support.
[-]MSTestv2 does not support orderedTests[/-][+]Add support for ordered tests[/+]WhitWaldo commentedon Aug 17, 2023
I'd like to see support for ordered tests primarily to ensure that I can execute a set of smaller unit tests sequentially comprising a larger integration test.
weitzhandler commentedon May 30, 2025
Related: microsoft/vstest#15081
Evangelink commentedon Jul 25, 2025
Closing as won't fix given how old the ticket is and the fact no effort was put on that.