"Run Unit Tests" doesn't ignore projects not selected to build

When I select "Run Unit Tests" from the solution's context menu, I get a message that looks like this:

---------------------------
ReSharper
---------------------------
Could not build the projects. Tests will not be run.

The project Project1 has not been built.
The project Project2 has not been built.
---------------------------
OK  
---------------------------

These projects are not supposed to be built, because they are deselected to build for the project configuration.

After this message, the unit test runner doesn't start. I have to select the projects individually to get them to run.

Is this difficult to fix?

14 comments

I am having the exact same problem. ReSharper 4.5 Beta (build 1212) will not run unit tests, reporting that 2 projects (which were intentionally skipped during the build) were not built. This is new behavior, as I was able to run unit tests with ReSharper 4.1 in the exact same Visual Studio solution.

0

Hello Noam,

This forum is meant for community discussions, i.e. ReSharper users helping
each other. For EAP builds there is separate forum/newsgroup. If you have
problem with release builds, you could contact support at jetbrains. Of course,
we will check the issue you created in JIRA, thanks.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> When I select "Run Unit Tests" from the solution's context menu, I
IR> get a message that looks like this:
IR>
IR> -


IR> ReSharper
IR> -


IR> Could not build the projects. Tests will not be run.
IR> The project Project1 has not been built.
IR> The project Project2 has not been built.
IR> -


IR> OK
IR> -


IR> These projects are not supposed to be built, because they are
IR> deselected to build for the project configuration.
IR>
IR> After this message, the unit test runner doesn't start. I have to
IR> select the projects individually to get them to run.
IR>
IR> Is this difficult to fix?
IR>
IR> ---
IR> Original message URL:
IR> http://www.jetbrains.net/devnet/message/5234117#5234117


0

There is an operational workaround that gets the job done (althought it's slightly less convenient than using the context menu).

On the ReSharper menu, select Unit Testing, then Run All Tests from Solution.

0

This workaround does NOT help. I'm still getting the same "Could not build the projects. Tests will not be run." error message.
--
JetBrains ReSharper 7.1.1 C# Edition
Build 7.1.1000.900 on 2012-12-13T20:22:48

Licensed to: Dennis Gorelik
Plugins: none
Visual Studio 10.0.40219.1.
--


0

I'm seeing this problem too, on 7.1.1.

According to Jira the problem was fixed in v5, but looks like it's come back.

0

Is unit test runner in ReSharper a component from Jira?

0

Not sure what you mean, but here is a recent bug on youtrack:

http://youtrack.jetbrains.com/issue/RSRP-303921

My workaround is to set the test runner to 'never build', then remember to manually build the code before running the tests, but that's quite irritating.

0

I don't know how it was in previous versions, but in ReSharper 7.1.1 "Build Settings" for unit test runner has 4 options:
-----
1) Automatic
2) Automatic (Whole Solution)
3) Always Build
4) Never Build
-----

Selecting "Automatic (Whole Solution)" causes compilation error if I attempt to run unit tests.
Other 3 options allow tests to run.

0

In my case 'Automatic' builds the whole solution, rather than respecting the projects I have selected in Configuration Manager.  In other words, 'Automatic' is behaving how I'd expect 'Automatic (Whole solution)' to behave.

0

What ReSharper version do you have?

0

jetbrains@dennisgorelik.com wrote:

What ReSharper version do you have?

7.1.1000.900 (C# Edition)
Visual Studio 2008 (9.0.30729.1)

0

Oh, I have the same ReSharper, but Visual Studio 2010.
I guess different Visual Studio makes "Automatic" build option behave differently.

JetBrains ReSharper 7.1.1 C# Edition
Build 7.1.1000.900 on 2012-12-13T20:22:48

Visual Studio 10.0.40219.1.
0

Please sign in to leave a comment.