xUnit can be extended by using custom (inherited) attributes for Fact or Theory. There are some examples an the xUnit site for this.
I'm using a WpfTheory attribute (inherited from Theory) to start my tests in a STA thread to be able to create WPF controls in the tests.
It seems that the CodeRush test runner does not find this test methods and not identify them as test methods.
Is there an alternative way to mark the methods as tests?
Test Runner does not recognize tests with the WpfTheory attribute
Answers approved by DevExpress Support
We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.
Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.
- v19.2.5Download Official Update
Hi Steffen,
Thank you for pointing out this issue.
I have downloaded the STA Examples for xUnit tests, which contain a test with the WpfTheory attribute. CodeRush Test Runner finds this test, shows an icon for it, and displays it in the Test Runner window on my side. But an attempt to run this test is unsuccessful and it is not started. I have recorder a screencast that illustrates this behavior. We will fix this issue in the context of this ticket.
Please clarify whether you have same behavior or whether CodeRush Test Runner does not recognize tests with the WpfTheory attribute at all on your side.