Uzamčený Problem running a custom test type with MSTest

  • 23. dubna 2012 4:23
     
     

    I've created a custom test type using the Visual Studio SDK.  The test type executes correctly when the tests are run as part of a test project inside visual studio.  However, when I attempt to run the same test project using MSTest and the /testcontainer: option, MSTest prints a message saying that no tests were found.  To register the test type I copied the .dll to private assemblies, registered the package using regpkg.exe, and then used regedit to make the following alterations to the system registry:

    [HKEY_LOCAL_MACHINE\%RootHive%\EnterpriseTools\QualityTools\HostAdapters\Regression Test\SupportedTestTypes]
        "{3451566B-E89A-4b09-AC24-6CB67CFB8A04}"="Regression Test"
        "{13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}"="Unit Test"
        [HKEY_LOCAL_MACHINE\%RootHive%\EnterpriseTools\QualityTools\TestTypes\{13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}\SupportedHostAdapters]
       "Regression Test"="Regression Test Host Adapter"
       [HKEY_LOCAL_MACHINE\%RootHive%\EnterpriseTools\QualityTools\TestTypes\{3451566B-E89A-4b09-AC24-6CB67CFB8A04}\SupportedHostAdapters]
        "Regression Test"="Regression Test Host Adapter"[HKEY_LOCAL_MACHINE\%RootHive%\EnterpriseTools\QualityTools\HostAdapters\Regression Test\SupportedTestTypes]
       "{3451566B-E89A-4b09-AC24-6CB67CFB8A04}"="Regression Test"
        "{13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}"="Unit Test"
       [HKEY_LOCAL_MACHINE\%RootHive%\EnterpriseTools\QualityTools\TestTypes\{13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}\SupportedHostAdapters]
        "Regression Test"="Regression Test Host Adapter"
        [HKEY_LOCAL_MACHINE\%RootHive%\EnterpriseTools\QualityTools\TestTypes\{3451566B-E89A-4b09-AC24-6CB67CFB8A04}\SupportedHostAdapters]
        "Regression Test"="Regression Test Host Adapter"

    Windows Registry Editor Version 5.00
        [HKEY_LOCAL_MACHINE\%RootHive%\EnterpriseTools\QualityTools\Xml\http://microsoft.com/schemas/VisualStudio/SDK/Samples/RegressionTest/2010/06]
        "XsdLocation"="%VSXsdLocation:\=\\%"
       [HKEY_LOCAL_MACHINE\%RootHive%\EnterpriseTools\QualityTools\Xml\http://microsoft.com/schemas/VisualStudio/SDK/Samples/RegressionTest/2010/06\ElementToClass]
        "RegressionTestRunConfig"="Microsoft.VisualStudio.TestTools.Samples.RegressionTestRunConfig, Microsoft.VisualStudio.QualityTools.Samples.RegressionTestTIP"
        "RegressionTestHostRunConfig"="Microsoft.VisualStudio.TestTools.Samples.RegressionHostRunConfigData, Microsoft.VisualStudio.QualityTools.Samples.RegressionTestTIP"
        "RegressionTestResult"="Microsoft.VisualStudio.TestTools.Samples.RegressionTestResult, Microsoft.VisualStudio.QualityTools.Samples.RegressionTestTIP"
         "RegressionTest"="Microsoft.VisualStudio.TestTools.Samples.RegressionTest, Microsoft.VisualStudio.QualityTools.Samples.RegressionTestTIP"

    I'm not sure if these MSTest problems are coming from an error in my test type or my registration process.  Any help would be appreciated.

Všechny reakce