It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

NUnit3 console runner not working when run as Command type Task

Hi All,

I am using Bamboo 6.0.3. I have been trying to get my NUnit 3 tests to run using a Command type task (NOT an NUnit 3 runner task) which calls the nunit3-console.exe located in my packages folder but hard as I may try I haven't been able to get the tests to run and the build to succeed.

This is the snippet of the log before the NUnit Runner bombs out:

simple 17-Jul-2017 15:57:29 Starting task 'NUnit 3 Runner' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.command'
command 17-Jul-2017 15:57:29 Beginning to execute external process for build 'Feature Releases - 5.4.0 - Build Wesbite #39 (CONN-FEATURE0-JOB1-39)'\n ... running command line: \npackages\NUnit.ConsoleRunner.3.7.0\tools\nunit3-console.exe Services.Tests\bin\Release\Services.Tests.dll\n ... in: D:\Bamboo\xml-data\build-dir\CONN-FEATURE0-JOB1\n ... using extra environment variables: \nbamboo_planRepository_1_branch=5.4.0\nbamboo_planRepository_1_branch and so on...

And this Bamboo log snippet below is the next line but it just simply says failed with -1 return code...doesn't even mention what the problem is?

Failing task since return code of [packages\NUnit.ConsoleRunner.3.7.0\tools\nunit3-console.exe Services.Tests\bin\Release\Services.Tests.dll] was -1 while expected 0

I should point out that if I go and manually run the .exe above pointing to the same DLL, it runs successfully and I get the NUnit output in the TestResult.xml file.

The console runner executable is located in the packages folder of my .NET project and if I dive into the checkout directory on the build server the .exe is in packages\NUnit.ConsoleRunner.3.7.0\tools\nunit3-console.exe which is where I have Bamboo looking for the executable:

runner.PNG

 

And in the build plan I have the following in the Command task:

 

command.PNG

And the Services.Tests DLL i reference above also exists in the bin\Release folder so it's not that the DLL is missing.

Can anyone please provide any insight into what I am missing here?

Any help is much appreciated.

 

1 answer

Hi Bill! How are you doing?

Usually, for Command type tasks, I use absolute paths. I have the Nunit executable in a specific folder in my build agent and point to it. Would you try this approach?

If your file must reside in the source code repository, I would try a Script type task. In Script tasks you can for sure use relative paths.

Hope this helps!

Thanks,

Cristiano

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Unable to add or edit Bitbucket Cloud repository in Bamboo

On 31 May, a GDPR-related change went live in the Bitbucket Cloud API that resulted in users not being able to create or edit Bitbucket Cloud Linked repositories in Bamboo. This API update removed t...

659 views 2 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you