如何从套件触发的测试用例中获取TestSuite ID [英] How to get TestSuite ID from a test case which was triggered from a suite

查看:168
本文介绍了如何从套件触发的测试用例中获取TestSuite ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 我已将手动测试与Microsoft Test Manager(MTM)中的自动化单元测试相关联,并且我正在从MTM运行UnitTests(Selenium)。我有一个测试套件(名称:abcdTestSuite),我为这个测试套件添加了一个测试用例(例如:123)。

 I have associated manual test to automated unit test in Microsoft Test Manager(MTM) and I am running UnitTests(Selenium) from MTM. I have a test suite (name: abcdTestSuite) and i have added a test case (ex: 123) for this test suite.

我从MTM触发了123测试脚本执行,我想知道这个123测试脚本是从abcdTestSuite触发的。你能不能让我知道怎么做。

When I triggered 123 test script execution from MTM , i would like to know this 123 test script got triggered from abcdTestSuite.. Could you please let me know how to get this.

我能够使用TestContext.Properties获取计划ID [" __ Tfs_TestPlanId __"]); ,但不是测试套件ID。如果我得到任何解决方案将会很有帮助。

I am able to get plan id using TestContext.Properties["__Tfs_TestPlanId__"]); , but not test suite id . It would be great help if i get any solution on this.

推荐答案

您需要了解测试套件的要求是什么?您无法直接获得测试套件ID,您可以在该测试计划中迭代测试套件并检查哪个包含当前测试用例。

What's the requirement that you need to know test suite? You can't get test suite id directly, you can iterate test suites in that test plan and check which one contains current test case.

TFS API第27部分 - 测试计划,测试套件,测试案例制图


这篇关于如何从套件触发的测试用例中获取TestSuite ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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