Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to see the sequence of test run?

I'm using MSTest with Visual Studio 2012, is it possible to see which test runs first, second third and so forth?

I prefer the tests to run in random orders but I just want to know when tests fail, I like to know the sequence they ran and helps me to figure out why they fail easier.

like image 703
Ray Cheng Avatar asked Nov 02 '22 16:11

Ray Cheng


1 Answers

If you want to know the sequence in which your test ran you can do the following:

A bit of work to do:

  1. Add a breakpoint at the start of your method decorated with attribute 'TestMethod'.
  2. Right click your breakpoint and select 'When Hit...'.
  3. Make sure the checkbox next to 'Print a message' is ticked.

    Do this for all your test methods.

Let Visual Studio do the rest:

  • Debug all your tests by pressing ALT + S, D, A.

Wow! It worked:

  • Find the sequence in your debug output window (ALT + V, O).
like image 171
mathijsuitmegen Avatar answered Nov 15 '22 05:11

mathijsuitmegen