Annoying Unit Test Runner

Hi JetBrains,

i have a big problem with the Unit Test Runner since Version 3.0.

It doesn't build the right Projects if i will run the test.

The Runner is so configured that he will allways run the test. But the
Problem is that only the Test-Assembly will be build and not the Referenced
one.

I get messages that buidls of the reference assemblies are skipped. Even if
i changed something in there.

-


Skipped Build: Project: Jjk.WebBeilagen.Tools, Configuration: Debug
Any CPU -


Project not selected to build for this solution configuration

The message stated that the Project is not selecte to build for this
solution configuratione, wich is wrong. It's the debug configuration and
every project is in selected for build in every configuration. Only the
Test-Assembly will be build and the test wil run.But maybe give an incorrect
result.

Sometimes i also get another message. In addition to the above.

-


Build started: Project: Jjk.WebBeilagen.Tools.Tests, Configuration:
Debug Any CPU -


C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702
/errorreport:prompt /warn:4 /define:DEBUG;TRACE
/reference:D:\Code\WebBeilagen\Jjk.WebBeilagen.Tools\bin\Release\Jjk.WebBeilagen.Tools.dll
/reference:..\Shared\Vendor\NUnit\Release\2.4\nunit.framework.dll
/reference:..\Shared\Vendor\RhinoMocks\Current\Rhino.Mocks.dll
/reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll
/reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll
/reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll
/debug+ /debug:full /filealign:512 /optimize-
/out:obj\Debug\Jjk.WebBeilagen.Tools.Tests.dll /target:library
MapSlicerTest.cs Properties\AssemblyInfo.cs
error CS0006: Metadata file
'D:\Code\WebBeilagen\Jjk.WebBeilagen.Tools\bin\Release\Jjk.WebBeilagen.Tools.dll'
could not be found


Compile complete -- 1 errors, 0 warnings
========== Build: 0 succeeded or up-to-date, 1 failed, 8 skipped ==========


Take deeper look, it stated me that ...\Release\Jjk.WebBeilagen.Tools.dll
could not found, which is of course correct, 'cause there was no release
build. The Build-Path in the Projects are correct (Debug=>bin\Debug,
Release=>bin\Release). Even in simple Solutions this problem Occures.

Currently the Runner is quiet useless for TestDriven Development. I have to
build the Test-Assembly manually before running the Tests. Otherwhise that
Result which are display are not correct With TestDriven.NET there is no
problem with that, but TD.NET has no red & green lights.


I'm the only one with the problems?

Regards

Albert

12 comments
Comment actions Permalink

"Albert Weinert" <newsh2-06@der-albert.com> schrieb im Newsbeitrag
news:fjhmjc$3m4$1@is.intellij.net...

I'm the only one with the problems?


I'm not.

http://www.jetbrains.net/jira/browse/RSRP-38414

Yes, i also have web projects in my solution, 'cause im a web developer.


Albert

0
Comment actions Permalink

Hello Albert,

AW> http://www.jetbrains.net/jira/browse/RSRP-38414

Did you try workaround proposed in the comments to the issue?


0
Comment actions Permalink

Hello Ilya,

AW> http://www.jetbrains.net/jira/browse/RSRP-38414

>

Did you try workaround proposed in the comments to the issue?


I checked twice. In the Project Properies and in the Configuration Manager.
every Project has the following settings.

Target Framework = 2.0
Configuration = Debug
Plattform = Any CPU (.NET is not available only x86, x64 and Itanium are
altenatives)

In the Configurationmanager every project shows Debug, Any CPU and is
checked for including in build (see Attachment).
Also the References are to the projects and not to the assemblies.

It even fails in Solutions without a web.

Regards

Albert







Attachment(s):
SolutionConfiguration.jpg
0
Comment actions Permalink

Hello Albert,

Could you please send us a small solution revealing the problem? I've tried
to repeat your scenario, but in my case, if the solution doesn't contain
a Web site,
everything builds OK when I invoke Unit Test Runner.


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


Did you try workaround proposed in the comments to the issue?

I checked twice. In the Project Properies and in the Configuration
Manager. every Project has the following settings.

Target Framework = 2.0

Configuration = Debug



0
Comment actions Permalink

"Dmitry Shaporenkov" <dsha@jetbrains.com>

Could you please send us a small solution revealing the problem? I've
tried to repeat your scenario, but in my case, if the solution doesn't
contain a Web site,
everything builds OK when I invoke Unit Test Runner.


Ok, i try to get a small not working solution.

In the meantime you can fix the website thing, it seems reproducable ;)

Try

Build.BuildSelection()

instead of

DTE.Solution.SolutionBuild.BuildProject()

BuildSelection is that what i am running manually befor running the Test.

Regards

Albert


0
Comment actions Permalink

Hello Albert,

thanks for your proposal. But is using BuildSelection really correct? It
seems that relying on
what selected at the moment is a bit fragile...


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


"Dmitry Shaporenkov" <dsha@jetbrains.com>

>> Could you please send us a small solution revealing the problem? I've
>> tried to repeat your scenario, but in my case, if the solution
>> doesn't
>> contain a Web site,
>> everything builds OK when I invoke Unit Test Runner.

Ok, i try to get a small not working solution.

In the meantime you can fix the website thing, it seems reproducable
;)

Try

Build.BuildSelection()

instead of

DTE.Solution.SolutionBuild.BuildProject()

BuildSelection is that what i am running manually befor running the
Test.

Regards

Albert



0
Comment actions Permalink

"Dmitry Shaporenkov" <dsha@jetbrains.com> schrieb im Newsbeitrag

thanks for your proposal. But is using BuildSelection really correct? It
seems that relying on
what selected at the moment is a bit fragile...


It works better then yours ;) This is the Command for the Project Build in
the Build-Menu

I made now a little Macro (base on
http://fanms.com/files/folders/75/download.aspx)

This seems to work, not testet much and may need make more bulletproof.
Maybe you can use similar in R#

Imports System
Imports EnvDTE
Imports EnvDTE80
Imports System.Diagnostics
Imports System.IO

Public Module UnitTesting

Dim WithEvents bldEvents As BuildEvents
Dim applicationObject As EnvDTE.DTE

Sub CompileAndTest()

' Get a reference to the add-in instance
Dim addInInstance As EnvDTE.AddIn

' Get a reference to the application object
applicationObject = CType(Application, EnvDTE.DTE)

' Hook up to the build event
bldEvents = CType(applicationObject.Events.BuildEvents,
EnvDTE.BuildEvents)

' Execute build on the current selection
DTE.ExecuteCommand("Build.BuildSelection")

End Sub

Private Sub bldEvents_OnBuildDone(ByVal Scope As EnvDTE.vsBuildScope,
ByVal Action As EnvDTE.vsBuildAction) Handles bldEvents.OnBuildDone

' Unhook the event
bldEvents = Nothing

DTE.ExecuteCommand("ReSharper.ReSharper_UnitTest_ContextRun")

End Sub
End Module





0
Comment actions Permalink

Hello Dmitry,

I see the problem often, even without a web project in my solution. So
most of the time I do a VS build on the project containing the tests
that I woul like to execute before running them with the unit test runner.


Sincerely,
Stefan Lieser



Dmitry Shaporenkov schrieb:

Hello Albert,

Could you please send us a small solution revealing the problem? I've
tried to repeat your scenario, but in my case, if the solution doesn't
contain a Web site,
everything builds OK when I invoke Unit Test Runner.


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


>> Did you try workaround proposed in the comments to the issue?
>>
>> I checked twice. In the Project Properies and in the Configuration
>> Manager. every Project has the following settings.
>>
>> Target Framework = 2.0
>>
>> Configuration = Debug
>>


0
Comment actions Permalink

"Albert Weinert" <newsh2-06@der-albert.com> schrieb im Newsbeitrag
news:fjjm2v$3vf$1@is.intellij.net...

"Dmitry Shaporenkov" <dsha@jetbrains.com> schrieb im Newsbeitrag



I know that this macro solve only the ContextRun Problem. And not the
Problem running from the UTE. But it may a googe start.

Regards

Albert

0
Comment actions Permalink

Hello Stefan,

any ideas how can we reliably repeat it? Thanks.


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


Hello Dmitry,

I see the problem often, even without a web project in my solution. So
most of the time I do a VS build on the project containing the tests
that I woul like to execute before running them with the unit test
runner.

Sincerely,
Stefan Lieser
Dmitry Shaporenkov schrieb:

>> Hello Albert,
>>
>> Could you please send us a small solution revealing the problem? I've
>> tried to repeat your scenario, but in my case, if the solution
>> doesn't
>> contain a Web site,
>> everything builds OK when I invoke Unit Test Runner.
>> Dmitry Shaporenkov
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>>> Did you try workaround proposed in the comments to the issue?
>>>
>>> I checked twice. In the Project Properies and in the Configuration
>>> Manager. every Project has the following settings.
>>>
>>> Target Framework = 2.0
>>>
>>> Configuration = Debug
>>>


0
Comment actions Permalink

Hello Dmitry,

take the next flight to cologne and attach your debugger ;)

I'm sorry I have no idea. Some times I thought it were the embedded
files (like NHibernate mapping files) you did not watch, but then it
works the other day.

Are there any logging mechanics that could help you?


Regards,
Stefan Lieser
--
http://www.lieser-online.de

Dmitry Shaporenkov schrieb:

Hello Stefan,

any ideas how can we reliably repeat it? Thanks.


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


>> Hello Dmitry,
>>
>> I see the problem often, even without a web project in my solution. So
>> most of the time I do a VS build on the project containing the tests
>> that I woul like to execute before running them with the unit test
>> runner.
>>
>> Sincerely,
>> Stefan Lieser
>> Dmitry Shaporenkov schrieb:
>>
>>> Hello Albert,
>>>
>>> Could you please send us a small solution revealing the problem? I've
>>> tried to repeat your scenario, but in my case, if the solution
>>> doesn't
>>> contain a Web site,
>>> everything builds OK when I invoke Unit Test Runner.
>>> Dmitry Shaporenkov
>>> JetBrains, Inc
>>> http://www.jetbrains.com
>>> "Develop with pleasure!"
>>>> Did you try workaround proposed in the comments to the issue?
>>>>
>>>> I checked twice. In the Project Properies and in the Configuration
>>>> Manager. every Project has the following settings.
>>>>
>>>> Target Framework = 2.0
>>>>
>>>> Configuration = Debug
>>>>


0
Comment actions Permalink

Was there ever any resolution to this?  I'm seeing what seems to be the same problem with a VB/ASP.NET solution with about 30 projects.  It builds the project I'm testing, but not any of it's dependencies.

Thanks!

0

Please sign in to leave a comment.