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]
Windows Registry Editor Version 5.00
"{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"
[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
-
24. dubna 2012 6:20Moderátor
Hi rmcglaughlin,
Thank you for posting in the MSDN forum.
I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
-
24. dubna 2012 14:01Moderátor
Would you please tell the Visual Studio version you're running? I ask because the process could be different between VS versions.
- Process of extending test type in VS 2010 like: http://archive.msdn.microsoft.com/CustomTestTypeSample There's a batch script to deploy the test type.
- Process of authoring new VS Unit test adapter (VS 11 beta) like: http://blogs.msdn.com/b/bhuvaneshwari/archive/2012/03/13/authoring-a-new-visual-studio-test-adapter.aspx
best regards,
Forrest Guo | MSDN Community Support | Feedback to manager
-
24. dubna 2012 17:56
I managed to run the test using the /testmetadata option and a metadata file which will work for my purposes.- Označen jako odpověď Forrest GuoMicrosoft Employee, Moderator 25. dubna 2012 2:43