Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Failed to run XUnit tests
alexanderb
#1 Posted : Thursday, February 9, 2012 8:43:43 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/9/2012(UTC)
Posts: 3
Location: Kyiv, Ukraine

Thanks: 1 times
NCrunch: 1.37.0.46b

Trying that on open sourced project from Code52, https://github.com/Code52/Ideastrike

NCrunch initializes fine, but the IdeaStrike.Tests failed with message

NCrunch: If you are experiencing problems in getting this project to build, have a look at https://www.ncrunch.net/...ng_project-build-issues
(120): The "Xunit.Runner.MSBuild.xunit" task could not be loaded from the assembly C:\Users\alexander.beletsky\AppData\Local\NCrunch\8056\2\tests\IdeaStrike.Tests\..\..\tools\xunit\xunit.runner.msbuild.dll. Could not load file or assembly 'file:///C:\Users\alexander.beletsky\AppData\Local\NCrunch\8056\2\tools\xunit\xunit.runner.msbuild.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
Remco
#2 Posted : Thursday, February 9, 2012 9:16:37 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi Alex,

It looks like this project has a custom build step that executes Xunit tests? Likely you would want to disable this for NCrunch builds by making whichever build target triggers it conditional. You can use the $(NCrunch) environment variable - for example:

<Target Name="XUnitTarget" Condition="$(NCrunch) != '1'">
...
</Target>

Otherwise, if you want the target to run, you can probably get it to work by making sure you add "..\..\tools\**.*" to your list of additional files to include for the IdeaStrike.Tests project.
1 user thanked Remco for this useful post.
alexanderb on 2/9/2012(UTC)
alexanderb
#3 Posted : Thursday, February 9, 2012 9:29:15 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/9/2012(UTC)
Posts: 3
Location: Kyiv, Ukraine

Thanks: 1 times
You are absolutely right!

As soon as I temporary removed that target, NCrunch procceded with tests! But, not I have yet another issue.. Probably not related to NCrunch itself, but maybe you know something?

The output:

NCrunch was unable to retrieve a meaningful result from this test due to an unexpected error - was the execution process terminated?

Remco
#4 Posted : Thursday, February 9, 2012 10:18:38 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
There are a few things that can cause this. The easiest way to diagnose this issue is to set your log verbosity to detailed then have a look at one of the testing tasks inside the processing queue. The log will usually contain the issue... it could be an internal problem with NCrunch.
alexanderb
#5 Posted : Thursday, February 9, 2012 10:43:44 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/9/2012(UTC)
Posts: 3
Location: Kyiv, Ukraine

Thanks: 1 times
Set verbosity to Detailed, but nothing has changed;
Remco
#6 Posted : Thursday, February 9, 2012 11:00:05 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Did the log under any of the test tasks show anything interesting that could indicate a failure?

Otherwise, kick through a bug report and I'll take a look at it.
shiftkey
#7 Posted : Friday, February 10, 2012 2:04:54 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/10/2012(UTC)
Posts: 1

Was thanked: 1 time(s) in 1 post(s)
@Remco - I've added in that check for the NCrunch flag and that gets the tests running - I'll send that upstream as a fix in the interim.

@alexanderb - with that flag added, all the tests passing on my local machine. Same version of NCrunch as you.
1 user thanked shiftkey for this useful post.
Remco on 2/10/2012(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.041 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download