LabDefaultTemplate-> ExecuteRemoteTestRun2不考虑MTM中测试的Order字段

时间:2015-01-15 18:12:52

标签: tfsbuild coded-ui-tests tfs2013 buildconfiguration mtm

情景:

  1. 创建2个codedui测试。第一次测试将是Test1,第二次是Test2。

  2. 在mtm中创建2个测试用例。

  3. 在MTM中创建2个套件。 Suite1和Suite2。

  4. 按以下顺序向Test1添加测试,Test1,然后是Test2。

  5. 按以下顺序将Test2添加到Suite2,Test2,然后是Test1。

  6. 现在使用模板“LabDefaultTemplate”创建一个构建在测试中添加Suite1和Suite2

    现在使用MTM并更改套件中测试的顺序,然后再次运行构建。

    测试代理按插入顺序在套件中运行测试,不会使用订单字段。

    我们使用Test controller 2013,Test Agent 2013,TFS 2013。

    现在是详情。

    WorkFlow LabDefaultTemplate运行以下活动“ExecuteRemoteTestRun2”

    在方法TestRunCreation.CreateTestRun中,根据套件和配置请求测试点

    我们可以看到Select没有“Order by”,这就是我们按照套件中的测试顺序得到测试的原因。

      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);
                  }
    

    我认为这是一个错误,有人可以批准吗?

    按照MTM的顺序执行套件的解决方法是什么。

    巴拉克

0 个答案:

没有答案