开发者

Running T4-generated nUnit tests - which test runners support and how?

In our solution (EF4, WCF, MVC2), we have a very large amount of T4 code generation going on, FAR beyond the EF4 stuff. In fact, we even generate a large number of services as well. Since we can predict this behavior very easily (otherwise we couldn't generate the code), that means we can even predict many tests for this generated code. As such, we also generate a large number of nUnit tests.

Thinking about doing this sounds easy as long as you can get the generated code, services, tests, and all templates figured out. That's the hard part and we've now mastered this. However, now that we're growing our team and getting some addi开发者_如何学运维tional nonconformities added to the equation, we're now starting to learn that there are some problems that come with this. Specifically, what test runners work nicely with these tests!

So this brings us to my question: Is there a resource that lists what common test runners support this scenario?

What we've seen is that pretty much all tests work when you run the specific test or class's tests. When running all tests within a folder, this usually results in 0 tests being ran. When running all tests within a project or solution, this varies depending on the test runner (ReSharper skips them while TestDriven.net runs them).

Help would be appreciated so we don't have to do all the discovery work ourselves to identify what test runners we can and cannot work with, and in what ways.


Ultimately, I suspect the problem lays on the method that a test runner goes to discover the tests within a certain context (folder vs project). It seems that since the generated .cs file actually exists as a child to the .tt file rather than the folder causes a problem in this discovery algorithm. If this is the case, I suspect I should be in contact with the product teams that I wish to work with and request that they support this scenario. Unfortunately, I suspect this is the REAL answer. :-(

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜