【发布时间】:2022-11-28 09:57:55
【问题描述】:
在我的 trx 文件中有 3 个测试用例。 UnitTestResult 名称如下
代码:
<Results>
<UnitTestResult executionId="a009dca9-9a9c-45c6-966e-ce83b6a8f4d0" testId="c9427cd3-1949-4163-f8e9-3d620e7b7c04" testName="CampaignAdGroupCreationMSANAdCreatorSuite" computerName="71986a60c000008" duration="00:03:23.4530000" startTime="2022-11-17T00:20:46.3170000+00:00" endTime="2022-11-17T00:24:09.7700000+00:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Failed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="a009dca9-9a9c-45c6-966e-ce83b6a8f4d0" />
<UnitTestResult executionId="f61b0324-afe2-4b5a-b48d-e6fc2dbee4b0" testId="178fc87e-7321-761c-6004-c0824a26eaa4" testName="CampaignAdGroupCreationMSANAdCreatorSuite.should be able to apply effect to image added to an ad in create campaign workflow" computerName="71986a60c000008" duration="00:01:52.7160000" startTime="2022-11-17T00:21:15.6250000+00:00" endTime="2022-11-17T00:23:08.3410000+00:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Failed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="f61b0324-afe2-4b5a-b48d-e6fc2dbee4b0">
<UnitTestResult executionId="a5a4451b-675c-47ef-80f3-fba4a13c9b56" testId="5db0478b-94a4-a31f-ee72-883dbd15bb96" testName="CampaignAdGroupCreationMSANAdCreatorSuite.should be able to apply effect to image added to an ad in create adgroup workflow" computerName="71986a60c000008" duration="00:01:01.2260000" startTime="2022-11-17T00:23:08.3420000+00:00" endTime="2022-11-17T00:24:09.5680000+00:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Failed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="a5a4451b-675c-47ef-80f3-fba4a13c9b56">
</Results>
单击每一个,调用堆栈和错误消息都是正确的。
这是 TRX 文件中的测试定义:
<TestDefinitions>
<UnitTest name="CampaignAdGroupCreationMSANAdCreatorSuite" storage="parentsuite" id="c9427cd3-1949-4163-f8e9-3d620e7b7c04">
<Execution id="a009dca9-9a9c-45c6-966e-ce83b6a8f4d0" />
<TestMethod codeBase="ParentSuite" adapterTypeName="executor://mochatestexecutor/" className="ParentSuite" name="CampaignAdGroupCreationMSANAdCreatorSuite" />
</UnitTest>
<UnitTest name="CampaignAdGroupCreationMSANAdCreatorSuite" storage="campaign-adgroup-creation-selenium" id="178fc87e-7321-761c-6004-c0824a26eaa4">
<Execution id="f61b0324-afe2-4b5a-b48d-e6fc2dbee4b0" />
<TestMethod codeBase="campaign-adgroup-creation-selenium" adapterTypeName="executor://mochatestexecutor/" className="CampaignAdGroupCreationMSANAdCreatorSuite" name="should be able to apply effect to image added to an ad in create campaign workflow" />
</UnitTest>
<UnitTest name="CampaignAdGroupCreationMSANAdCreatorSuite" storage="campaign-adgroup-creation-selenium" id="5db0478b-94a4-a31f-ee72-883dbd15bb96">
<Execution id="a5a4451b-675c-47ef-80f3-fba4a13c9b56" />
<TestMethod codeBase="campaign-adgroup-creation-selenium" adapterTypeName="executor://mochatestexecutor/" className="CampaignAdGroupCreationMSANAdCreatorSuite" name="should be able to apply effect to image added to an ad in create adgroup workflow" />
</UnitTest>
</TestDefinitions>
能帮忙看看吗? 谢谢。
测试选项卡应该显示正确的测试名称。
【问题讨论】:
-
问题会发生在全新的测试中吗?
-
没有机会验证。现在我将版本更改为“发布测试结果”v1.*。此错误发生在 v2.* 中。
-
很高兴知道您找到了解决此问题的方法!请考虑回答它并接受它作为答案以将其状态更改为已回答。见can I answer my own question,提醒一下:)
-
这只是一种解决方法。该问题在 V2.* 中仍然存在。无论如何,我现在可以得到正确的结果。
标签: azure-devops