开发者

Run NUnit Test cases using xUnit Test

I want th开发者_Python百科e ability to run NUnit tests from xUnit using somehting like xunit.nunit.dll.


There was a RunWithAttribute in a sample which did just that, but it's no longer on trunk. There's a thread on the Codeplex forum explaining why it had to be removed.

Unless you have a seriously interesting quantity of legacy tests and can't port, I strongly suggest not getting yourself into two-test-frameworks land - no good can come of it.


You could attach the debugger with the xUnit test cases from visual studio is by clicking on the tools, go to process and click on xunit.exe, then when you execute your testcases, they will break into visual studio and hence you got the ability to debug the test cases


If you use nuget to get the latest version of of Xunit, then search and replace to . As long as you are using basics asserts it should just work.


As I understand your question, the core issue here is that you've got tests written in two unit testing frameworks: xUnit.net and nUnit and you want to run them all with one runner (if that's not the issue, please disregard this answer). In this case, you might wanna take a look at Gallio. Part of the package is Icarus Runner that can run unit tests from at least nunit, xunit.net, mbunit. It is in some ways limited (e.g. when you extend nunit or xunit by creating custom subclasses for attributes used to mark the test method, Icarus does not see them anymore), but most of the time, you should be fine.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜