MSDN >
Home page del forum
>
Microsoft Visual Studio Team Foundation Server 2010 Beta 2
>
The MSTestActivity was invoked without a value for either TestMetadata or TestContainers.
The MSTestActivity was invoked without a value for either TestMetadata or TestContainers.
- Hi,
I've created a simple solution that I've checked into TFS (2010 beta1) and I've created a build type for continuous integration.
Run Tests i set to true and I've assigned a testsettings file as well as a vsmdi file. When the build server build the projects, it
runs the tests (it's actually right now only a single unit test / method) but it spits out the following error message after it finish
the test run:
The MSTestActivity was invoked without a value for either TestMetadata or TestContainers.
How do I fix this?
--larsw
Lars Wilhelmsen | Senior Consultant | Miles, Norway | Connected Systems MVP | http://larswilhelmsen.com/- Spostatodougn-MSFTMSFT, Moderatoremercoledì 27 maggio 2009 13.00Team Build issue that we need to fix... (From:Microsoft Visual Studio Team System 2010 Beta 1)
Risposte
- I finally got past this. I created a Test List called "Build". I then added ALL my tests to that test list and specified the Build test list rather than "Run all tests in this VSMDI file".
At least a work around for me for Beta 1...- Contrassegnato come rispostaLars WilhelmsenMVPlunedì 25 maggio 2009 17.56
Tutte le risposte
Hey Lars - in the build definition "Process" tab there is an option to choose the test list to run. Have you chosen the right .vsmdi file and the test list to run as part of the build there?
If not, point to your .vsmdi file and choose "run all tests" - that should give you test results on the build. HTH!
- Anu
http://blogs.msdn.com/anutthara- Hi Anutthara,
Are you referring to the "Test Metadata Files" option in the property grid? If so, yes - I've assigned the default .vsmdi file that was generated
when I added the Test project to the solution, and I selected the "Run all Tests" node.
--larsw
Lars Wilhelmsen | Senior Consultant | Miles, Norway | Connected Systems MVP | http://larswilhelmsen.com/ - I finally got past this. I created a Test List called "Build". I then added ALL my tests to that test list and specified the Build test list rather than "Run all tests in this VSMDI file".
At least a work around for me for Beta 1...- Contrassegnato come rispostaLars WilhelmsenMVPlunedì 25 maggio 2009 17.56
- Hi Karl,
Same thing worked for me - I just forgot to reply to this thread.
--larsw
Lars Wilhelmsen | Senior Consultant | Miles, Norway | Connected Systems MVP | http://larswilhelmsen.com/ - Hi, I tried the same but it did not work for me. I got the following error message: "'MSTest.exe' returned an unexpected exit code. Expected '0'; actual '1'." Extract from my Log file see below. Any Ideas? Cheers, Michael APPENDIX Run Tests 00:17 If Not TestProjects Is Nothing 00:17 For Each TestProject in TestProjects 00:16 Try Run Tests for TestProject 00:16 Run MSTest for Project 00:00 Convert Server Path to Local Path 00:16 Run MSTest for Project C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe /nologo /searchpathroot:"C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\1\ContinuousIntegrationDemo\BuildDefinition1\Binaries" /resultsfileroot:"C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\1\ContinuousIntegrationDemo\BuildDefinition1\TestResults" /testmetadata:"C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\1\ContinuousIntegrationDemo\BuildDefinition1\Sources\ContinuousIntegrationDemo1.vsmdi" /testlist:"MyTestList" /publish:"http://caa1747-2008v:8080/tfs/DefaultCollection" /publishbuild:"vstfs:///Build/Build/48" /teamproject:"ContinuousIntegrationDemo" /flavor:"Debug" No platform specified for publish operation. For switch syntax, type "MSTest /help" 00:00 Handle MSTest Exception 'MSTest.exe' returned an unexpected exit code. Expected '0'; actual '1'. 00:00 Set TestStatus to Failed
- Hi,
The platform needs to be specified in the Build Definition, Process tab, Comilation section.
the Configuration to Build needs to indicate both, configuration AND platform: Debug|Any CPU.
Then, the Platform parameter for the MSTest.exe is passed from that configuration data.
I hope this would help if someone is still looking for the answer.
Best regards,
Cezary Nolewajka

