Le réseau pour les développeurs > Forums - Accueil > Microsoft Visual Studio Team Foundation Server 2010 Beta 2 > The MSTestActivity was invoked without a value for either TestMetadata or TestContainers.
Poser une questionPoser une question
 

TraitéeThe MSTestActivity was invoked without a value for either TestMetadata or TestContainers.

  • vendredi 22 mai 2009 08:18Lars WilhelmsenMVPMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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/
    • Déplacédougn-MSFTMSFT, Modérateurmercredi 27 mai 2009 13:00Team Build issue that we need to fix... (From:Microsoft Visual Studio Team System 2010 Beta 1)
    •  

Réponses

  • lundi 25 mai 2009 15:34Karl Z Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    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...

Toutes les réponses

  • vendredi 22 mai 2009 11:24Anutthara - MSFT Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    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
  • vendredi 22 mai 2009 11:56Lars WilhelmsenMVPMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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/
  • lundi 25 mai 2009 15:34Karl Z Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    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...
  • lundi 25 mai 2009 17:56Lars WilhelmsenMVPMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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/
  • mercredi 29 juillet 2009 21:47Michael Heitland Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     A du code
    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
  • lundi 28 septembre 2009 15:50Cezary Nolewajka Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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