none
Visual Studio Does not finish all cases in a file one at a time RRS feed

  • Question

  • I see similar tickets on stackoverflow but my case is not same.

    Issues is seen for codedui tests in Visual Studio 2017 or 2019, Visual Studio does not run test suites one by one (not talking about a spesific order). Visual Studio jumps to other files without finishing all test cases in a file, 

    I do not talking about running tests in a file sequentially, thats not the case. Issues is, I setup every individual file with classInitializers, but sometimes Visual Studio switches between files without finishing all the cases in the file, thats really weird.

    I think VS follow some creation date or something when running tests

    Here is Scenario, lets say I have 5 files each contains different number of tests

    File1 - 10 test

    File2 - 20 test

    File3- 25 test

    File4 - 5 test

    Visual Studio runs

    all tests for File1  (all 10 test)

    then continues with File3 but only running 20 tests 5 remaining

    Then runs cases in another file,

    then returns File3 again but I lost the setup for File3 !!!

    so if all tests wont run for a class, whats classInitialization for ?? Id doesnt make sense

    If I would create environment for very other case there will be no problem, but thats time consuming for my tests I cant do that, I use a variable and setup environment only one time at file level, I mean I do setup for every other file not for every other test case.

    There is no mechanism that a fila (a suite) will finish (order of individual tests are not important) and it will continue with another file(Suite.)




    • Edited by rastek Tuesday, October 8, 2019 10:56 AM
    Tuesday, October 8, 2019 10:23 AM

All replies

  • Hi rastek,

    Welcome to MSDN forum.

    According to your description, I also met this issue on my side. We recommend you could use ordered test for your coded ui test, the ordered test is not supported in MsTest V2, so please follow these steps:

    1. expand the references, make sure the version "Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll" is 10.0.0.0, if not, please remove existing one, then re-add it in Add references../Extensions.
    2. right-click your project -> Add items -> ordered test

    Any feedback will be expected.

    Cheers,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, October 9, 2019 2:36 AM
  • Hi rastek,

    Sorry for my misunderstanding.

    I have updated my reply. If this issue still persists, please feel free to contact us.

    Cheers,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, October 11, 2019 9:13 AM