简体   繁体   中英

How Powershell affect test execution in TFS2015

I have ancestral project and my Nightly build fails. I can`t find out how to fix it. Problem is about test cases sequence dependent execution .

Environment :

There is used TFS2015 build definitions. Basically, I have a definition with a Visual Studio Build task and then a Visual Studio Test task. Visual Studio Test task is also overwritten with Powershell file and I see that in TFS Nightly build process my predefined VS Ordered Test statements is ignored.

Important

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

Problem

Interesting is that build log files always shows test execution in sequence what I define in VS Ordered Test , but at TFS2015 Detailed report Test results sequence always is different. So I can`t find out what affects test case execution procedures in TFS. Also I am not sure how tests are executed - parallel or sequentially (As I see, both TFS and PowerShell has no indications to run test cases in Parallel).

I have 2 questions :

  1. Powershell brake down all in VS defined conditions?
  2. Which is the best way to define test execution order, so that it takes into account?

Actually, those Test method run in the order that you defined in Ordered Test file during TFS build process. The build log already shows the correct sequence.

Just like you mentioned above, in the test result page, the order is the same as what you defined in the Ordered Test , but you can see that in front of each test method, it has an order number. You could download the test result file to check again and you will find those test methods are run in the correct order.

In the higher version, like TFS 2017, you could click the Column title 'Test' to make it sort by order( 在此输入图像描述 ).

You could also add a Date started column to know which test method run the first.

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM