交通运输服务 |自动化测试 运行 |中止 |其他人修改的测试结果user/session
TFS | Automated Test Run | Aborted | Test results modified by other user/session
我正在通过 MTM 运行ning 一个自动化测试用例,而在后面的代码中,我正在用 运行ning 测试 运行 的更多字段更新测试结果,并且保存它。
但是,由于 MTM 测试的最终状态 运行 是 "Aborted",我收到了一个错误。
我收到以下错误 -
发生意外错误。正在中止 运行:测试结果已被其他用户或会话修改。您必须重新加载测试 运行 并再次更新测试结果。
代码 -
ITestRun testRun = project.TestRuns.Find(testRunID);
ITestCaseResult result = testRun.QueryResults()[0];
result.FailureTypeId = (int)FailureType.NewIssue;
result.ResolutionStateId = 2;
result.Save();
testRun.Save();
testRun.Refresh();
这是不允许的。
如果要修改测试结果,需要等待测试运行完成,测试结果已经生成,然后可以使用API代码修改。
我正在通过 MTM 运行ning 一个自动化测试用例,而在后面的代码中,我正在用 运行ning 测试 运行 的更多字段更新测试结果,并且保存它。 但是,由于 MTM 测试的最终状态 运行 是 "Aborted",我收到了一个错误。 我收到以下错误 -
发生意外错误。正在中止 运行:测试结果已被其他用户或会话修改。您必须重新加载测试 运行 并再次更新测试结果。
代码 -
ITestRun testRun = project.TestRuns.Find(testRunID);
ITestCaseResult result = testRun.QueryResults()[0];
result.FailureTypeId = (int)FailureType.NewIssue;
result.ResolutionStateId = 2;
result.Save();
testRun.Save();
testRun.Refresh();
这是不允许的。
如果要修改测试结果,需要等待测试运行完成,测试结果已经生成,然后可以使用API代码修改。