TFS-执行自动测试的顺序 [英] TFS - order of automata tests to execute

查看:72
本文介绍了TFS-执行自动测试的顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有系统测试:A和B,其中A包含数据库的记录,B尝试对其进行修改.当A失败时,B也将失败. A和B被写为单元测试"(测试方法),A和B也是TFS中自动链接到这些单元测试"的测试用例.我把它们都放在了一个测试计划,测试套件中.我想通过运行功能测试"步骤执行它们.

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.

如何告诉TFS以正确的顺序执行它们?

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

开发此类测试的最佳实践是什么?

What is the best practice to develop tests like these?

推荐答案

您可以创建一个有序测试,该测试容器是一个容纳其他测试并保证测试按特定顺序运行的容器.

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.

在TFS中,您可以按照以下步骤运行有序测试:

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

  1. 在测试项目中添加一个订单测试文件,并使用它来定义 测试订单.
  2. 在您的构建定义中,添加一个 Run Functional Tests 任务.改变 测试组件如下图所示.
  3. 在测试放置"位置,我有完整的项目,在 Executions文件夹我已下令测试.希望对您有帮助

  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


更新

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:

启用更改Web gui上测试用例的顺序,并按此顺序对其进行测试以进行自动测试

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-theweb

这篇关于TFS-执行自动测试的顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆