Search code examples
resharperxunitxunit.netresharper-2016

ReSharper 2016.1 xUnit test runner does not support Theory


I'm currently using ReSharper 2016.1.2 with the native xUnit test runner. I was wondering why the Theories are not supported and get simply ignored from the test sessions. Moreover, trying to run them singularly has no effect at all.

What is also a bit frustrating is that they get silently ignored and not reported in the Ignored Tests tab count (in my case >20 tests using theories with both InlineData and MemberData).

The question is: are theories going to be supported or shall I rewrite my test?


Solution

  • Theory tests are supported. The method should be highlighted in the editor, and when you run the tests, the results tree will include a node for the method, and then automatically add other nodes, one for each theory row. Once the results are shown in the results window, an individual theory (or a group of them) can be highlighted and run, without having to run all of the theories.

    If you're seeing any other behaviour, you should log an issue, with details about how to reproduce.