2010-09-16 65 views
2

我使用vs2010下的团队资源管理器对构建后的构建进行排队,以便在构建后运行自动测试。自动化测试部分配置为使用vsmdi文件来定义一个测试列表,其中只有一个通用测试只能打开calc.exe。使用vs和TFS 2010成功构建后运行通用测试

寻找在日志中,成功构建后,MSTEST生成以下错误日志和钙不上生成代理运行:

Run MSTest for Metadata File 

The MSTestActivity was invoked without a value for Platform or Flavor. The values Mixed Platforms and Debug were used. 
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe /nologo /usestderr /searchpathroot:"C:\Builds\4\CITest\CI_AUT_1\Binaries" /resultsfileroot:"C:\Builds\4\CITest\CI_AUT_1\TestResults" /testmetadata:"C:\Builds\4\CITest\CI_AUT_1\Sources\AUT1.vsmdi" /testlist:"TestList1" /publish:"http://vmftrnd70.devlab.ad:8080/tfs/QTPCollection" /publishbuild:"vstfs:///Build/Build/82" /teamproject:"CITest" /platform:"Mixed Platforms" /flavor:"Debug" 
Loading C:\Builds\4\CITest\CI_AUT_1\Sources\AUT1.vsmdi... 

Search path(s) for tests: 
C:\Builds\4\CITest\CI_AUT_1\Binaries 
C:\Builds\4\CITest\CI_AUT_1\Sources 
Search path(s) for default test settings: 
C:\Builds\4\CITest\CI_AUT_1\Sources 

Failed to load tests from 'C:\Builds\4\CITest\CI_AUT_1\Binaries\generictest1.generictest': Microsoft.VisualStudio.TestTools.TestManagement.InvalidStorageExtensionException: File extension specified '.generictest' is not a valid test extension. 
at Microsoft.VisualStudio.TestTools.TestManagement.Tmi.GetTestTypeInfosForExtension(String ext) 
at Microsoft.VisualStudio.TestTools.TestManagement.Tmi.GetTestTypesNotManagedInStorage(String storage) 
at Microsoft.VisualStudio.TestTools.TestManagement.Tmi.LoadTestsFromTipsHelper(IEnumerable`1 locations, ProjectData projectData) 
at Microsoft.VisualStudio.TestTools.TestManagement.Tmi.LoadTests(IEnumerable`1 locations, ProjectData projectData, TestConflictHandler vetoingHandler) 
at Microsoft.VisualStudio.TestTools.TestManagement.Tmi.LoadTests(String location, ProjectData projectData, TestConflictHandler vetoingHandler) 
at Microsoft.VisualStudio.TestTools.TestManagement.Tmi.LoadTestLinkStorageHelper.LoadTests(String fullStoragePath, ProjectData projectData) 
at Microsoft.VisualStudio.TestTools.TestManagement.Tmi.SimpleLoadTestLinkStorageHelper.Load(String fullStoragePath, ProjectData projectData) 
Starting execution... 
Test GenericTest1 cannot be found. 
No tests to execute. 

我已经尝试了所有可能的方式,以获得通用测试在编译后运行没有成功... 这对msdn \ google, 没有任何关系,谢谢你提供的任何线索。

回答

0

我自己并没有使用通用测试,但是从msdn documentation看起来他们必须被视为测试容器。

在您的构建定义中,将流程更改为使用测试容器,并使用***。generictest代替*** test * .dll并查看是否有效。需要注意的是,如果您正在启动一个像calc.exe这样的GUI工具,那么您的构建服务器需要交互式运行,否则您的测试将失败。

+0

它没有做的伎俩......我从文档中使用的示例和本地复制VS产生MSTEST命令,但由于某些原因MSTEST声称generictest不是有效的测试类型... – user449638 2010-09-19 09:09:33

1

你需要完整的安装Visual Studio识别文件类型