简体   繁体   English

是否可以将 Specflow 和 Selenium 中的自动化案例与 Microsoft 测试管理器相关联?

[英]Is it possible to associate automatd cases in Specflow and Selenium to Microsoft Test Manager?

I have some test scenarios and cases written in Specflow/Selenium in Visual Studio, usin MsTest.我有一些在 Visual Studio 中用 Specflow/Selenium 编写的测试场景和案例,使用 MsTest。 I just want to associate them to Microsoft Test Manager, so a test case written there is associated to an automated test.我只想将它们与 Microsoft 测试管理器相关联,因此在那里编写的测试用例与自动化测试相关联。

Is that possible?那可能吗? How?如何?

More Data: test were created by using Scenario Outline with some lines of examples.更多数据:测试是通过使用场景大纲和一些示例行创建的。

You can associate testcases to a workitem in TFS/MTM, but we found it to cumbersome to do: It is a manual action in MTM that references the TestMethod by name.您可以将测试用例与 TFS/MTM 中的工作项相关联,但我们发现这样做很麻烦:这是 MTM 中按名称引用TestMethod的手动操作。 But because the TestMethod is generated by specflow by combining the title of the Scenario Outline and the first column of your Examples table, it is difficult to maintain:但是因为TestMethod是specflow通过结合Scenario Outline的标题和你的Examples表的第一列来生成的,所以很难维护:

  • Whenever a Scenario Outline title is changed, or the term in the first column of the examples table is changed, you have to re-couple the TestMethods to the workitems每当一个Scenario Outline标题改变,或在实施例表的第一列术语改变时,你必须重新联接TestMethods的工作项
  • When you add new Examples or Scenarios to your feature, you have to remember to link them to the workitem, one-by-one当您将新ExamplesScenarios添加到您的功能时,您必须记住将它们一一链接到工作项
  • To find the correct TestMethod in the dll is nearly undoable when you approach the thousandish scenarios.当您接近数千个场景时,在 dll 中找到正确的TestMethod几乎是无法撤消的。

What we did was using the WorkItem attribute in the Feature to connect (parts of) the feature to a workitem like @Workitem:42 .我们所做的是使用功能中的WorkItem属性将Feature (部分)连接到像@Workitem:42这样的工作项。 This is a little unnoticed feature in SpecFlow:这是 SpecFlow 中一个 未被注意到的特性

MsTest: Support for MSTest's [Owner] and [WorkItem] attributes with tags like @owner:foo @workitem:123 (Issue 162, Pull 161) MsTest:支持 MSTest 的 [Owner] 和 [WorkItem] 属性,带有 @owner:foo @workitem:123 等标签(Issue 162,Pull 161)

and it creates a WorkItemAttribute attached to the method that is connected to that tagged Scenario (Outline) or Feature .并创建一个WorkItemAttribute附加到连接到该标记的Scenario (Outline)Feature
Then, we imported all testcases into MTM with the Test Case Management tool and ran a custom made tool (making use of the TeamFoundation namespace and the TestManagement and WorkItemTracking Client) that connected each imported testcase to the correct workitem .然后,我们使用测试用例管理工具将所有测试用例导入 MTM 并运行一个定制工具(利用TeamFoundation 命名空间以及TestManagementWorkItemTracking Client)将每个导入的testcase连接到正确的workitem Whenever a test did run we could see the results in MTM, but also from the perspective of the connected workitem.每当测试运行时,我们都可以在 MTM 中看到结果,而且还可以从连接的工作项的角度看到结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Microsoft 测试管理器和 Selenium 实现自动化? - Automation with Microsoft Test Manager and Selenium? Selenium(Nunit)与MTM(微软测试经理) - Selenium (Nunit) with MTM (Microsoft Test Manager) 如何在Microsoft测试管理器中运行硒测试 - How to run selenium tests in Microsoft test manager 是否可以将Selenium测试用例打包到可运行的应用程序中 - Is it possible to package Selenium test cases into a runnable appliction 使用 Selenium / Specflow 测试 Kendo Combobox - Test Kendo Combobox with Selenium / Specflow 使用不同的测试用例运行SpecFlow测试 - Running SpecFlow tests with different test cases 是否可以将Selenium IDE测试用例导出为Java / TestNG / WebDriver? - Is it possible to export Selenium IDE test cases as Java/ TestNG/ WebDriver? 是否有将代码与测试用例关联的工具或方法? - Is there a tool or method to associate code with test cases? 是否可以在 Kiwi TCMS 中运行使用 selenium 和 cucumber 创建的测试用例? - Is it possible to run test cases created with selenium and cucumber in Kiwi TCMS? 是否可以在没有Firefox的情况下运行和创建Selenium IDE测试用例? - Is it possible to run and create Selenium IDE test cases without Firefox?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM