TFS - order of automata tests to execute

孤者浪人 提交于 2020-01-05 07:41:26

问题


Supposing I have system tests: A and B, where A includes a record to a database, B tries to modify it. When A fails, B will fail as well. A and B are written as "unit tests" (test methods), A and B are tests cases in TFS as well, automated, linked to these "unit tests". I put them on a test plan, test suite, both of them. I want to execute them with the "Run Functional Tests" step.

How can I tell TFS to execute them in the right order?

What is the best practice to develop tests like these?


回答1:


You could created an ordered test, which is a container that holds other tests and guarantees that tests run in a specific order.

How to create an ordered test, you could refer this tutorial.

In TFS, you could follow below steps to run ordered test:

  1. Add an Order Test file in your test project and use it to define the testing order.
  2. In your build definition, add a Run Functional Tests task. Change the Test Assembly like the picture below.
  3. In the Test Drop location I have the complete Project, and in the Executions folder I have the ordered test. hope it helps


Update

It's able to order for manual tests, however not able for automated test. If you need the ordering support for automated tests, please vote on this user voice item:

enable changing the order of test cases on the web gui and let them be tested in this order for automated tests

https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/13489221-enable-changing-the-order-of-test-cases-on-the-web



来源:https://stackoverflow.com/questions/48275722/tfs-order-of-automata-tests-to-execute

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!