0

总的来说,我对 Team City 和 Jet Brains 产品很陌生。

我正在使用 MSTest 运行一些测试(VS 单元测试)。我能够配置 Team City 以使用元数据文件和测试列表运行测试。

但是,Team City 并未报告所有测试。它说“9 通过”而不是“9 通过/2 失败”

无法读取的两个测试是数据驱动测试。这会造成问题吗?

任何帮助将不胜感激。

谢谢!

从构建日志:

9/11 test(s) Passed, 2 Failed
Summary
-------
Test Run Failed.
Passed 9
Failed 2
----------
Total 11
Results file: ..\TeamCity\buildAgent\temp\buildTmp\tmp4E9E.tmp.teamcity.trx
Test Settings: Local
Run has the following issue(s):
EXEC Test Run deployment issue: The assembly or module 'XmlDiffPatch' directly or indirectly referenced by the test container '..\build\output\alpha\ds9\erpservicestest\bin\alpha\erpservicestest.dll' was not found.
The command ""..\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe" /runconfig:..\Build\Output\Alpha\DS9\Local.testsettings /testmetadata:..\Build\Output\Alpha\DS9\DS9.vsmdi /resultsfile:..\TeamCity\buildAgent\temp\buildTmp\tmp4E9E.tmp.teamcity.trx /testlist:ERPServices_IntegrationTests /test:Manufacturing_ManufacturingPlanning_CreateEngineeringMaster /testlist:ERPServices_IsAlive" exited with code 1.
##teamcity[importData id='mstest' file='..\TeamCity\buildAgent\temp\buildTmp\tmp4E9E.tmp.teamcity.trx']
Importing data from '..\TeamCity\buildAgent\temp\buildTmp\tmp4E9E.tmp.teamcity.trx' with 'mstest' processor
MSTest
[MSTest] Found 11 test definitions.
[MSTest] ERPServicesTest.InventoryServiceUnitTests.InventoryService_GetPart_IsAliveTest
[ERPServicesTest.InventoryServiceUnitTests.InventoryService_GetPart_IsAliveTest] [Test Output] Endpoint = ../ERPServices/InventoryService.svc
[ERPServicesTest.InventoryServiceUnitTests.InventoryService_GetPart_IsAliveTest] Done Building Project "..\TeamCity\buildAgent\work\478837a28017f91d\Build\Build_DS9.proj.teamcity.patch.tcprojx" (DeployTests;TeamCity_Generated_MSTestTests target(s)).
[MSTest] ERPServicesTest.PurchaseServiceUnitTests.PurchaseService_CreateSupplierReturn_IsAliveTest
[ERPServicesTest.PurchaseServiceUnitTests.PurchaseService_CreateSupplierReturn_IsAliveTest] [Test Output] Endpoint = ../ERPServices/PurchasingService.svc
[MSTest] ERPServicesTest.AuthorizationServiceUnitTests.AuthorizationService_GetUserByADUsername_IsAliveTest
[ERPServicesTest.AuthorizationServiceUnitTests.AuthorizationService_GetUserByADUsername_IsAliveTest] [Test Output] Endpoint = ../ERPServices/AuthorizationService.svc
[MSTest] ERPServicesTest.ManufacturingServiceUnitTests.ManufacturingService_GetWorkOrder_IsAliveTest
[ERPServicesTest.ManufacturingServiceUnitTests.ManufacturingService_GetWorkOrder_IsAliveTest] [Test Output] Endpoint = ../ERPServices/ManufacturingService.svc
[MSTest] ERPServicesTest.QualityServiceUnitTests.QualityService_GetAllStatuses_IsAliveTest
[ERPServicesTest.QualityServiceUnitTests.QualityService_GetAllStatuses_IsAliveTest] [Test Output] Endpoint = ../ERPServices/QualityService.svc
[MSTest] ERPServicesTest.GeneralServiceUnitTests.GetCountry
[ERPServicesTest.GeneralServiceUnitTests.GetCountry] [Test Output] Endpoint = ../ERPServices/GeneralService.svc
[MSTest] ERPServicesTest.PublicServiceUnitTests.PublicService_GetPMStatuses_IsAliveTest
[ERPServicesTest.PublicServiceUnitTests.PublicService_GetPMStatuses_IsAliveTest] [Test Output] Endpoint = ../ERPServices/PublicService.svc
[MSTest] ERPServicesTest.PurchaseServiceUnitTests.PurchaseService_AddReceiverNoteByReceiver_IsAliveTest
[ERPServicesTest.PurchaseServiceUnitTests.PurchaseService_AddReceiverNoteByReceiver_IsAliveTest] [Test Output] Endpoint = ../ERPServices/PurchasingService.svc
[MSTest] ERPServicesTest.LogServiceUnitTests.LogService_GetLogItem_IsAliveTest
[ERPServicesTest.LogServiceUnitTests.LogService_GetLogItem_IsAliveTest] [Test Output] Endpoint = ../ERPServices/LogService.svc
[MSTest] Test 'ERPServicesTest.ManufacturingServicesIntegrationTests.ManufacturingService_AddWorkOrderNote_Neg_IntTest': Failed to read testDuration
[MSTest] Test 'ERPServicesTest.ManufacturingServicesIntegrationTests.ManufacturingService_AddWorkOrderNote_Pos_IntTest': Failed to read testDuration
[MSTest] 9 test(s) were reported
Build succeeded.
4

1 回答 1

0

您可能需要将 XmlDiffPatch 程序集添加到您引用的 .testsettings 文件中的部署列表中。

未找到测试容器“..\build\output\alpha\ds9\erpservicestest\bin\alpha\erpservicestest.dll”直接或间接引用的程序集或模块“XmlDiffPatch”。

于 2011-05-30T03:12:41.997 回答