Eap 3.1 NUnit Launcher & NCover Broken

So I just upgrade to eap because the 2.2 nunit in 3.01 was failing for some reason. Worked fine with raw 2.2 nunit but the teamcity wrapper was blowing up with Rhino.Mocks.

Anyway, the new launcher appears to be launching a second launcher which runs nunit. This means when I try and run ncover using the nunit launcher I actually profile the launcher and not the nunit test fixture.

Is there anyway to call the launcher directly with args so I can use 2.4.6 and profile the right assemblies?

I really need to finish the gallio test runner....

5 comments

So when I try and run the processRunner manually I get the following exception.

D:\export\teamcity\BuildAgent\work\98561997f875f84e>..\..\plugins\dotnetPlugin\b
in\JetBrains.TeamCity.PlatformProcessRunner.x86.exe x86 v2.0 ..\..\plugins\dotne
tPlugin\bin\Test\NUnit-2.4.6\JetBrains.BuildServer.NUnitLauncher-plugin.dll src\
MVCContrib.UnitTests\bin\debug\MVCContrib.UnitTests.dll
Failed to start process due to error:
No entry point in the assembly JetBrains.BuildServer.NUnitLauncher-plugin, Versi
on=3.1.28.39573, Culture=neutral, PublicKeyToken=null
StackTrace:
at JetBrains.TeamCity.Utils.Runtime.ParseUtil.LoadAssembly(String value) in c
:\Agent\work\bbc4cb48456abcf4\src\Utils\src\Runtime\ParseUtil.cs:line 99
at JetBrains.TeamCity.PlatformProcessRunner.PlatformSwitchBase.Main2(String[]
args) in c:\Agent\work\bbc4cb48456abcf4\src\PlatformProcessRunner\src\PlatformS
witchBase.cs:line 50
at JetBrains.TeamCity.PlatformProcessRunner.PlatformSwitchBase.Main(String[]
args) in c:\Agent\work\bbc4cb48456abcf4\src\PlatformProcessRunner\src\PlatformSw
itchBase.cs:line 22

How can I call the PlatformProcessRunner directly with args to run using NUnit 2.4.6?

0

Just noticed too that its looking c:\ when the path should be D:\export\teamcity I tried with absolute paths for everything too and still the same result.

0

nm about that last thing... I just realized its the stacktrace location...

0

Hello,

Could you please file jira issue for the problem of too much process tree
for running tests
at http://www.jetbrains.net/jira/browse/TW

JetBrains.TeamCity.PlatformProcessRunner.*.exe are simple tools that take
2 arguments
about system (x86, x64, MSIL) and .NET framework (v1.1, v2.0, ANY) All
other arguments
are .NET exe assembly path and it's arguments.

This process will load to runtime and start the assembly
iff framwork and platform constraints are sutisfied. Otherwise it will
start other
version JetBrains.TeamCity.PlatformProcessRunner.*.exe to much the conditions.

Could you please try as workaround staring

JetBrains.BuildServer.NUnitLauncher.exe ANY MSIL NUnit-2.4.6 ]]>

Thanks!

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

nm about that last thing... I just realized its the stacktrace
location...



0

Could you please file jira issue for the problem of
too much process tree
or running tests


Created: http://www.jetbrains.net/jira/browse/TW-4501

JetBrains.TeamCity.PlatformProcessRunner.*.exe are
simple tools that take
arguments
about system (x86, x64, MSIL) and .NET framework
(v1.1, v2.0, ANY) All
ther arguments
are .NET exe assembly path and it's arguments.
This process will load to runtime and start the
assembly
iff framwork and platform constraints are sutisfied.


Right, I saw that in reflector. My question is, start what Assembly? Can you provide an example of calling the process runner directly to get nunit 2.4.6 to run? When I pass the nunit.2.4.6 plugin as an argument it tells me no execution point could be found. So what dll are you executing via the process runner?

Could you please try as workaround staring
JetBrains.BuildServer.NUnitLauncher.exe ANY MSIL
NUnit-2.4.6 <assemblies>


No luck... I get this error which is strange, I have never seen it before I have used the nunit-launcher before with the same project. Are you using a custom build of NUnit.2.4.6 that is requiring this. I can run any version of nunit against my test assembly under ncover.

[[19:44:35]: [Target "TeamCityBuild" in project "teamcity.msbuild.teamcity.patch.proj"] Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Coverage Directory is: D:\export\teamcity\BuildAgent\work\98561997f875f84e\Artifacts\coverage
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Using "NCover" task from assembly "C:\Program Files\NCover\Build Task Plugins\NCoverExplorer.MSBuildTasks.dll".
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Creating settings file: D:\export\teamcity\BuildAgent\temp\buildTmp\tmp2392.tmp.ncoversettings
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Arguments: //r "D:\export\teamcity\BuildAgent\temp\buildTmp\tmp2392.tmp.ncoversettings"
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Contents of config file:\r\n D:\export\teamcity\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe ANY MSIL NUnit-2.4.6 D:\export\teamcity\BuildAgent\work\98561997f875f84e\src\MvcContrib.UnitTests\bin\Debug\MvcContrib.UnitTests.dll D:\export\teamcity\BuildAgent\work\98561997f875f84e\src\MvcContrib.UnitTests\bin\Debug MvcContrib D:\export\teamcity\BuildAgent\work\98561997f875f84e\Artifacts\coverage\mvccontrib-coverage.xml Xml2 false D:\export\teamcity\BuildAgent\work\98561997f875f84e\Artifacts\coverage\mvccontrib-coverage.log false false true ]]>
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] C:\Program Files\NCover\NCover.Console.exe //r "D:\export\teamcity\BuildAgent\temp\buildTmp\tmp2392.tmp.ncoversettings"
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] The "NCover" task is using "NCover.Console.exe" from "C:\Program Files\NCover\NCover.Console.exe".
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] NCover.Console v2.0.3 (x86) - Code Coverage Analysis for .NET
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] http://www.ncover.com
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Copyright (c) 2003-2007 Gnoso Inc.
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"]
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Registered to Customer #: 3860
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] NCover Professional Edition (1 User)
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"]
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Command: D:\export\teamcity\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Command Args: ANY MSIL NUnit-2.4.6 D:\export\teamcity\BuildAgent\work\98561997f875f84e\src\MvcContrib.UnitTests\bin\Debug\MvcContrib.UnitTests.dll
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Working Directory: D:\export\teamcity\BuildAgent\work\98561997f875f84e\src\MvcContrib.UnitTests\bin\Debug
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Assemblies: MvcContrib
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"]
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] ******************* Program Output *******************
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Failure executing test(s). If you assembly is not built using NUnit version 2.4.6.0, then ensure you have redirected assembly bindings. Consult the documentation of the ]]> task for more information.
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Version 2.0 is not a compatible version.
StackTrace:

Server stack trace:
at System.Reflection.AssemblyName.nGetFileInformation(String s)
at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
at NUnit.Core.Builders.TestAssemblyBuilder.Load(String path)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, Boolean autoSuites)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, String testName, Boolean autoSuites)
at NUnit.Core.TestSuiteBuilder.Build(TestPackage package)
at NUnit.Core.SimpleTestRunner.Load(TestPackage package)
at NUnit.Core.ProxyTestRunner.Load(TestPackage package)
at NUnit.Core.ProxyTestRunner.Load(TestPackage package)
at NUnit.Core.RemoteTestRunner.Load(TestPackage package)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(MethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at :
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at NUnit.Core.TestRunner.Load(TestPackage package)
at JetBrains.TeamCity.NUnitLauncher.NUnitRunner.LoadTest(String testAssembly, String testName, TestRunner runner)
at JetBrains.TeamCity.NUnitLauncher.NUnitRunnerBase.Run()
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] ***************** End Program Output *****************
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"]
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Execution Time: 00:00:10.1093750s
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"]
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Coverage Xml: D:\export\teamcity\BuildAgent\work\98561997f875f84e\Artifacts\coverage\mvccontrib-coverage.xml
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Coverage Log: D:\export\teamcity\BuildAgent\work\98561997f875f84e\Artifacts\coverage\mvccontrib-coverage.log
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] D:\export\teamcity\BuildAgent\work\98561997f875f84e\default.msbuild(78, 3): error MSB6006: "NCover.Console.exe" exited with code 1.
: [Target "TestWithCoverage" in project "teamcity.msbuild.teamcity.patch.proj"] Deleting settings file: D:\export\teamcity\BuildAgent\temp\buildTmp\tmp2392.tmp.ncoversettings
: [Target "TeamCityBuild" in project "teamcity.msbuild.teamcity.patch.proj"] Target "Post-Test" in project "teamcity.msbuild.teamcity.patch.proj"
: [Target "Post-Test" in project "teamcity.msbuild.teamcity.patch.proj"] Task "CallTarget" skipped, due to false condition; (Exists('$(CoverageDirectory)\CoverageSummary.xml')) was evaluated as (Exists('D:\export\teamcity\BuildAgent\work\98561997f875f84e\Artifacts\coverage\CoverageSummary.xml')).
: Target "TeamCityReportFailure" in project "teamcity.msbuild.teamcity.patch.proj"
: MSBuild output:
Done Building Project Coverage Directory is: D:\export\teamcity\BuildAgent\work\98561997f875f84e\Artifacts\coverage NCover.Console v2.0.3 (x86) - Code Coverage Analysis for .NET http://www.ncover.com Copyright (c) 2003-2007 Gnoso Inc. Registered to Customer #: 3860 NCover Professional Edition (1 User) Command: D:\export\teamcity\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe Command Args: ANY MSIL NUnit-2.4.6 D:\export\teamcity\BuildAgent\work\98561997f875f84e\src\MvcContrib.UnitTests\bin\Debug\MvcContrib.UnitTests.dll Working Directory: D:\export\teamcity\BuildAgent\work\98561997f875f84e\src\MvcContrib.UnitTests\bin\Debug Assemblies: MvcContrib ******************* Program Output ******************* ***************** End Program Output ***************** Execution Time: 00:00:10.1093750s Coverage Xml: D:\export\teamcity\BuildAgent\work\98561997f875f84e\Artifacts\coverage\mvccontrib-coverage.xml Coverage Log: D:\export\teamcity\BuildAgent\work\98561997f875f84e\Artifacts\coverage\mvccontrib-coverage.logD:\export\teamcity\BuildAgent\work\98561997f875f84e\default.msbuild(78,3): error MSB6006: "NCover.Console.exe" exited with code 1.Done Building Project "D:\export\teamcity\BuildAgent\work\98561997f875f84e\teamcity.msbuild.teamcity.patch.proj" (TeamCityBuild target(s)) -- FAILED.Build FAILED."D:\export\teamcity\BuildAgent\work\98561997f875f84e\teamcity.msbuild.teamcity.patch.proj" (TeamCityBuild target) (1) ->(TestWithCoverage target) -> D:\export\teamcity\BuildAgent\work\98561997f875f84e\default.msbuild(78,3): error MSB6006: "NCover.Console.exe" exited with code 1. 0 Warning(s) 1 Error(s)Time Elapsed 00:00:35.76
: Process exit code: 1
: Publishing artifacts
: Will process paths:
: Publishing artifacts 'Artifacts/coverage.zip' to root artifacts directory
: Artifacts path Artifacts/coverage.zip not found
: Build finished

0

Please sign in to leave a comment.