LabDefaultTemplate-> ExecuteRemoteTestRun2 doesn't take in account the Order field of the test in the MTM

末鹿安然 提交于 2019-12-11 03:17:32

问题


The Scenario:

  1. Create 2 codedui tests. First Test will be Test1 and the second Test2.

  2. Create 2 test cases in the mtm.

  3. Create 2 suites in the MTM. Suite1 and Suite2.

  4. Add to Suite1 the tests in the following order, Test1 then Test2.

  5. Add to Suite2 the tests in the following order, Test2 then Test1.

Now create a build with the template "LabDefaultTemplate" In the Tests add Suite1 and Suite2

Now Use the MTM and change the order of the tests in the suites and run the build again.

The Test Agent run the tests in the Suites in the order they where inserted and will not use the order field.

We user Test controller 2013, Test Agent 2013 , TFS 2013.

Now for the Details.

The WorkFlow LabDefaultTemplate runs the following activity "ExecuteRemoteTestRun2"

In the method TestRunCreation.CreateTestRun the test point is requested according to the suite and configuration

We can see that the Select has no "Order by" and this is the reason we got the test no in the order of the Test in the Suite.

  private ITestRun CreateTestRun(CodeActivityContext context, ITestManagementService testManager, ITestManagementTeamProject project)
      {
....

foreach (ITestPoint point in (IEnumerable<ITestPoint>) this.plan.QueryTestPoints(string.Format((IFormatProvider) CultureInfo.InvariantCulture, "SELECT * FROM TestPoint WHERE SuiteId={0} AND ConfigurationId={1}", new object[2]
              {
                (object) testSuiteId,
                (object) this.TestParameters.Get((ActivityContext) context).TestConfigurationId
              })))
              {
                flag = true;
                testRun.AddTestPoint(point, (TeamFoundationIdentity) null);
              }

I think it is a bug, Can someone approve it?

What is the workaround for execution of suite in the order of the MTM.

Barak

来源:https://stackoverflow.com/questions/27970203/labdefaulttemplate-executeremotetestrun2-doesnt-take-in-account-the-order-fie

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