Unit Tests not Recognized

I recently installed build 257 and now no unit tests are getting recognized by resharper. All was working fine before I upgraded. I love the tool so I hate that it's not working - any help would be greatly appreciated!

7 comments
Comment actions Permalink

Is the problem still reproducable with 2.0.1 release?

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Gary Lapointe" <glapointe@edfinancial.com> wrote in message
news:17171608.1156779364854.JavaMail.itn@is.intellij.net...
>I recently installed build 257 and now no unit tests are getting recognized
>by resharper. All was working fine before I upgraded. I love the tool so
>I hate that it's not working - any help would be greatly appreciated!


0
Comment actions Permalink

I have this problem as well. It was happenning with the 2.0 release and is still happenning with the 2.0.1 release (#259) - both on VS2005. Other members of my team have this problem as well.

We define our tests in an #IF TEST block so we can remove them from release output. Any code inside the #IF TEST block is ignored by Resharper and all of the menu options and keyboard navigations stop working.

0
Comment actions Permalink

How do you define the TEST word?

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Adrian Banks" <no_reply@jetbrains.com> wrote in message
news:30322173.1157018284419.JavaMail.itn@is.intellij.net...
>I have this problem as well. It was happenning with the 2.0 release and is
>still happenning with the 2.0.1 release (#259) - both on VS2005. Other
>members of my team have this problem as well.
>

We define our tests in an #IF TEST block so we can remove them from
release output. Any code inside the #IF TEST block is ignored by Resharper
and all of the menu options and keyboard navigations stop working.



0
Comment actions Permalink

Open the project properties and click the Build tab. In the "Conditional Compilation Symbols" box, type the word TEST. Then you can wrap code like so:

string buildType;

#if TEST
buildType = "test";
#else
buildType = "non-test";
#endif

If you define a compilation symbol for a debug build, but not for a release build, you can exclude code from a release build. All of our test classes are wrapped as such, but ReSharper cannot recognise them. By pressing Ctrl-N and typing their name, ReSharper thinks no such class exists.

0
Comment actions Permalink

I cannot reproduce your behavour.
Please could you try to reproduce it on a small solution?

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Adrian Banks" <no_reply@jetbrains.com> wrote in message
news:7457280.1157029735448.JavaMail.itn@is.intellij.net...

Open the project properties and click the Build tab. In the "Conditional
Compilation Symbols" box, type the word TEST. Then you can wrap code like
so:

>

string buildType;

>

#if TEST
buildType = "test";
#else
buildType = "non-test";
#endif

>

If you define a compilation symbol for a debug build, but not for a
release build, you can exclude code from a release build. All of our test
classes are wrapped as such, but ReSharper cannot recognise them. By
pressing Ctrl-N and typing their name, ReSharper thinks no such class
exists.



0
Comment actions Permalink

Unfortunately, no. I did recreate it in a brand new solution, but I reopened the solution and it went away. I've cleared my Resharper caches on my working solution, but the problem still persists: no resharper help in test files and no Ctrl-N find for my test classes.

0
Comment actions Permalink

We have managed to consistently reproduce this behaviour. If the conditional compilations symbols are not separated by a semi-colon (;), ReSharper does not work within #if statements using those constants.

I've attached an example solution that demonstrates the problem. Pressing Ctrl-P (show parameters) inside the parenthesis to the AMethod call currently does nothing. Editing the compilation symbols to replace the space with a semi-colon, saving the properties, and repeating Ctrl-P shows the parameters.



Attachment(s):
ResharperTest.zip
0

Please sign in to leave a comment.