Question

I am trying to implement a custom Test Adapter, all the files are bellow:

Using

vstest.console.exe /listdiscoverers /usevsixextensions:true

I confirmed that the extension is installed and it is listed on the test discoverers.

Running

vstest.console.exe file.ts

I confirmed that both TSTestDiscoverer and TSTestExecutor are working correctly.

Now I want to list the tests on Test Explorer, for that I guess I need ITestContainer and ITestContainerDiscoverer. I tried to implement both, but something is not working, the Test Explorer does not show any tests...

What did I do wrong? How can I find out what is not working?

Was it helpful?

Solution

I forgot to add an attribute on the class that implements ITestContainerDiscoverer.

[Export(typeof(ITestContainerDiscoverer))]

Now it is working.

OTHER TIPS

I have found the blog post here http://blogs.msdn.com/b/mathew_aniyan/archive/2012/05/17/content-index-for-unit-test.aspx as very useful. It contains links to most of the MS stuff on unit testing, including the extension building. It also seems to be updated.

The post by the Chutzpah creator, Matthew Manela, is also very useful http://matthewmanela.com/blog/anatomy-of-the-chutzpah-test-adapter-for-vs-2012-rc/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top