none
Test xxx cannot be found when running Test in TFS Build

    Question

  • Hi I am integrating automated testing in TFS Build file and get a message in the log file that the test X Cannot be found. I am using VS2008, TFS2008, Compiling .Net 1.1 Code and running Unit tests with the .Net Version 3.5

    I have read on another post that the space in the Test File Path "E:\Drop\Binaries\.NET 1.1\Release" (see BuildLog.txt)  may be the cause of the problem . Can anyone confirm this if in fact it is the problem and how best to work around this so that the "Platform to Build" is not included in the Binaries Path .

    thanks in advance
    Peter

    <ConfigurationToBuild Include="Release|.NET 1.1">
    <
    FlavorToBuild>Release</FlavorToBuild>
    <
    PlatformToBuild>.NET 1.1</PlatformToBuild>
    </
    ConfigurationToBuild>



    <
    MetaDataFile Include="$(BuildProjectFolderPath)/../../Development/Roche.Rig.CLink/Source/Roche.RIG.CLink.DownloadSupervisor.vsmdi">
    <
    TestList>DownloadProgressState</TestList>
    </
    MetaDataFile>


    -- Exert from  BuildLog.txt

    Task "TestToolsTask"

    Command:

    C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe /nologo /searchpathroot:"E:\Drop\Binaries\.NET 1.1\Release" /resultsfileroot:"E:\Drop\TestResults" /testmetadata:"E:\Drop\Roche.RIG\Roche.RIG.CLink\Source\Roche.RIG.CLink.DownloadSupervisor.vsmdi" /testlist:"DownloadProgressState" /publish:"http://troms252:8080/" /publishbuild:"Roche.RIG.CLink.Common_20081114.5" /teamproject:"Roche.RIG" /platform:".NET 1.1" /flavor:"Release"

    The "TestToolsTask" task is using "MSTest.exe" from "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe".

    Loading E:\Drop\Roche.RIG\Roche.RIG.CLink\Source\Roche.RIG.CLink.DownloadSupervisor.vsmdi...

    Search path(s) for tests:
    E:\Drop\Binaries\.NET 1.1\Release
    E:\Drop\Roche.RIG\Roche.RIG.CLink\Source
    Search path(s) for default run configuration:
    E:\Drop\Roche.RIG\Roche.RIG.CLink\Source

    Starting execution...
    Test InstalledCertificatesTest cannot be found.
    Test ProcessErrorsTest cannot be found.
    Test ProcessMessageTest cannot be found.
    Test CobasStatusTest cannot be found.
    Test LogFilePathTest cannot be found.
    Test DownloadedCertificatesTest cannot be found.
    Test ProcessErrorsPathTest cannot be found.
    Test CertificateStatusTest cannot be found.Test DownloadStateIdTest cannot be found.
    Test DownloadStateStatusTest cannot be found.
    Test DownloadedCobasLinkUpdatesTest cannot be found.
    Test InstalledELibsTest cannot be found.
    Test FilesToDownloadTest cannot be found.
    Test DownloadStatusTest cannot be found.
    Test ProcessMessagePathTest cannot be found.
    Test ProcessErrorTest cannot be found.
    Test InitializeDownloadTest cannot be found.
    Test InstalledCobasLinkUpdatesTest cannot be found.
    Test InitiateDownloadDateTest cannot be found.
    Test FilesDownloadedTest cannot be found.
    Test ELibStatusTest cannot be found.
    Test DownloadedELibTest cannot be found.
    No tests to execute.


    Peter
    Friday, November 14, 2008 3:24 PM

Answers

  • You should be able to compile .NET 1.1 and 2.0 projects in one team build. It seems the TestToolsTask can't find the output assemblies of test projects, so test can't be executed.

     

    TestToolsTask has a property SearchPathRoot. You can set this property to the output of your test projects. Please set SearchPathRoot property before test begins. You might set it by overriding BeforeTestConfiguration target.


    Please mark the replies as answers if they help and unmark them if they provide no help.
    • Proposed as answer by Bill.Wang Wednesday, November 19, 2008 10:25 AM
    • Marked as answer by Bill.Wang Friday, November 21, 2008 2:10 AM
    Tuesday, November 18, 2008 3:27 AM

All replies

  • Hi Peter
     

    I don't think the white space of the platform could be the cause. For example, we can set the build configuration to "Release|Any CPU" and it work fine.

     

    What are you trying to achieve here? Are you targeting all projects including test project to .NET 1.1? I notice you specifeid the search root to E:\Drop\Binaries\.NET 1.1\Release, does the out put of test project been copied there?


    Please mark the replies as answers if they help and unmark them if they provide no help.
    Monday, November 17, 2008 12:31 PM
  •  We have many projects that have to be compiled with .net 1.1 , and to do so we use the MSBee CrossCompile.CSharp.targets solution. We have recently migrated these into VS2008 and TFS and now want to add some VSTS Unit tests that are written in .dotNet 2.0 / 3.5 . Running these tests in the Solution Explorer is no problem .

    If I look in the drop directory then I do not see as you suggested the test projects output.

    I guess the question then is can I somehow combine 1.1 and 2.0 projects in same solution or how should they be seperated for the Build process so that testing can be included.

    Thanks very much for your help



    Peter
    Monday, November 17, 2008 2:31 PM
  • You should be able to compile .NET 1.1 and 2.0 projects in one team build. It seems the TestToolsTask can't find the output assemblies of test projects, so test can't be executed.

     

    TestToolsTask has a property SearchPathRoot. You can set this property to the output of your test projects. Please set SearchPathRoot property before test begins. You might set it by overriding BeforeTestConfiguration target.


    Please mark the replies as answers if they help and unmark them if they provide no help.
    • Proposed as answer by Bill.Wang Wednesday, November 19, 2008 10:25 AM
    • Marked as answer by Bill.Wang Friday, November 21, 2008 2:10 AM
    Tuesday, November 18, 2008 3:27 AM