Skip to content

Add support for ordered tests #25

Closed as not planned
Closed as not planned

Description

@sbaid

Description

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

Activity

  1. sbaid commented on Dec 9, 2016

    @sbaid
    ContributorAuthor

    Harsh Jain (@harshjain2) Do we have telemetry data of usage of ordered tests, generic tests?

  2. sbaid commented on Dec 9, 2016

    @sbaid
    ContributorAuthor

    pvlakshm (@pvlakshm) to keep u in loop

  3. AbhitejJohn commented on Dec 11, 2016

    @AbhitejJohn
    Contributor

    I believe pvlakshm (@pvlakshm) has also filed a user voice item for this.

  4. pvlakshm commented on Feb 24, 2017

    @pvlakshm
    Contributor

    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.

  5. divijkumar commented on May 23, 2017

    @divijkumar

    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.

  6. AbhitejJohn commented on May 23, 2017

    @AbhitejJohn
    Contributor

    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.

  7. rhundhausen commented on May 24, 2017

    @rhundhausen

    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.

  8. JDCain commented on Aug 9, 2018

    @JDCain

    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.

  9. melleck commented on Jan 30, 2019

    @melleck

    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.

  10. 14 remaining items

  11. N-Olbert commented on Jan 3, 2023

    @N-Olbert

    Amaury Levé (@Evangelink) Due to the conversation in #821 maybe this issue should be reopened

  12. Evangelink commented on Jan 6, 2023

    @Evangelink
    Member

    Reopened for investigation if that's something we want to support.

  13. added
    state/needs-approvalAwaiting maintainer approval of the proposal/design before work proceeds.
    state/blockedCannot progress until a blocker is resolved.
    and removed
    needs/triageNeeds triage by a maintainer.
    on Jan 16, 2023
  14. changed the title [-]MSTestv2 does not support orderedTests[/-] [+]Add support for ordered tests[/+] on Jan 16, 2023
  15. WhitWaldo commented on Aug 17, 2023

    @WhitWaldo

    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.

  16. weitzhandler commented on May 30, 2025

    @weitzhandler
  17. Evangelink commented on Jul 25, 2025

    @Evangelink
    Member

    Closing as won't fix given how old the ticket is and the fact no effort was put on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state/blockedCannot progress until a blocker is resolved.state/needs-approvalAwaiting maintainer approval of the proposal/design before work proceeds.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions