How Powershell affects test execution in TFS2015

I have an ancestor project and my nightly build is not working. I cannot figure out how to fix this. The problem is with the execution of a sequence dependent on the test sequence .

Environment

TFS2015 assembly definitions are used. Basically, I have a definition with a Visual Studio Build task and then a Visual Studio test task. The Visual Studio Test task is also overwritten by the Powershell file and I see my predefined VS statements being Ordered Test

ignored during the TFS Nightly build process .

Attention!

Test cases are sequence dependent (as I said, this project is an ancestor).

Problem

Interestingly, the build log files always show the test execution in the sequence I define in VS Ordered Test

, but in TFS2015. Detailed report. The sequence of test results is always different. So I cannot find out what affects the test case execution routines in TFS. Also I'm not sure how the tests are executed - in parallel or sequentially (as I see, both TFS and PowerShell have no indication of running test cases in Parallel).

I have 2 questions :

  • Powershell slows down everything in VS certain conditions?
  • What is the best way to determine the order in which a test is executed so that it takes into account?
+3


source to share


1 answer


In fact, this testing method is performed in the order that you specified in the file Ordered Test

during the TFS build process. The build log already shows the correct sequence.

As you mentioned above, on the test results page, the order is the same as what you defined in Ordered Test

, but you can see that it has an order number before each test method. You can download the test results file to test it again and you will find that these test methods are performed in the correct order.

In a higher version like TFS 2017, you can click the Test column heading to make it sort in order ( enter image description here).



You can also add a Start Date column to see which test method runs first.

enter image description here

+1


source







All Articles