Does R#5 support NUnit addins that create tests?

I am developing a NUnit addin that creates tests on a fixture dynamically, and supports a different way of marking test fixtures than is standard in NUnit. The test fixture for my addin will be marked with a custom attribute, not [TestFixture], and tests are generated from data within the marked class so there are neither [Test] attributes nor a 1 to 1 mapping between functions and tests. When I load the NUnit 2.5.3 gui with my addin installed and open my test dll, it correctly lists the generated tests and can run them. When I try to use the Run Uinsnit Tests command on the file in Resharper (Pre-Release, Build 5.1.1704.7 on 2010-06-04T21:37:00) it simply tells me that there are "No tests found in project". Nor does Resharper show a little green test icon in the gutter next to the class name. I've also noticed that when I create a test that uses the TestCaseSource attribute, the NUnit GUI shows me one test per case, but the Resharper  runner only shows me one test for all of them. The dynamic creation of tests from the TestCaseSource attribute is similar to what I am working on (edit: There is a ticket related to this: http://youtrack.jetbrains.net/issue/RSRP-137377).

I have tried placing my addin in the %Resharper Installation%/bin/addins directory to no avail. I've tried including the addin in the test dll itself (a way to deploy the addin without copying the dll to a addin directory), but nothing happened. I've also tried changing the resharper NUnit settings to use my local deployment of NUnit 2.5.3 to run the tests, with no luck. In all cases I am able to run 'normal' tests that I mark with [TestFixture], etc. I also set addins to load 'always' in the Resharper dialog under the Nunit testing framework.

Am I doing something wrong? Are SuiteBuilder extensions just not fully supported in R#5?

Thank you.

2 comments
Comment actions Permalink

Hello Noah,

I'm afraid such NUnit add-ins are not supported yet. Thank you!

Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I am developing a NUnit addin that creates tests on a fixture
dynamically, and supports a different way of marking test fixtures
than is standard in NUnit. The test fixture for my addin will be
marked with a custom attribute, not , and tests are
generated from data within the marked class so there are neither
attributes nor a 1 to 1 mapping between functions and tests.
When I load the NUnit 2.5.3 gui with my addin installed and open my
test dll, it correctly lists the generated tests and can run them.
When I try to use the Run Uinsnit Tests command on the file in
Resharper (Pre-Release, Build 5.1.1704.7 on 2010-06-04T21:37:00) it
simply tells me that there are "No tests found in project". Nor does
Resharper show a little green test icon in the gutter next to the
class name.

I have tried placing my addin in the %Resharper
Installation%/bin/addins directory to no avail. I've tried including
the addin in the test dll itself (a way to deploy the addin without
copying the dll to a addin directory), but nothing happened. I've also
tried changing the resharper NUnit settings to use my local deployment
of NUnit 2.5.3 to run the tests, with no luck. In all cases I am able
to run 'normal' tests that I mark with , etc. I also set
addins to load 'always' in the Resharper dialog under the Nunit
testing framework.

Am I doing something wrong? Are SuiteBuilder extensions just not
supported in R#5?

Thank you.

---
Original message URL:
http://devnet.jetbrains.net/message/5266850#5266850



0
Comment actions Permalink

Hi!

I look farward to have this full NUnit support as described in:
http://www.jetbrains.com/resharper/whatsnew/index.html

"Native NUnit Support
ReSharper 5 introduces a completely new approach to running NUnit tests. Our engine is now based on native NUnit code, which means 100% compatibility with the latest released version of NUnit and full support of its recent unit testing features."

100% compability isn't really the case in R#5.1.
So keep up the good work!

//Sam

0

Please sign in to leave a comment.