Error running NUnit tests from Jenkins..

2,137 views
Skip to first unread message

Ashok Tulachan

unread,
Oct 23, 2012, 2:24:46 PM10/23/12
to nunit-...@googlegroups.com
I'm getting error while running try to run the nunit-console.exe from Jenkins although it works when i try to run the same command from command prompt though.
 
Below is the error i'm getting which says 'C:\Program' is not recognized as an internal or external command,
operable program or batch file".

 

Can anyone help me out why it errored out while running from Jenkins?
 
Thanks


********************************************************************************************
 
Started by user anonymous
Building in workspace C:\Program Files\Jenkins\jobs\AHJ\workspace
Updating http://source.dev.dice.com/svn/ahj
At revision 17
no change for http://source.dev.dice.com/svn/ahj since the previous build
Path To MSBuild.exe: C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
Executing the command cmd.exe /C C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /p:Configuration=Release C:\ahj\AHJAutomationSuite\AHJ_Automation_Suite.sln && exit %%ERRORLEVEL%% from C:\Program Files\Jenkins\jobs\AHJ\workspace
[workspace] $ cmd.exe /C C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /p:Configuration=Release C:\ahj\AHJAutomationSuite\AHJ_Automation_Suite.sln && exit %%ERRORLEVEL%%
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.269]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build started 10/23/2012 1:16:56 PM.
Project "C:\ahj\AHJAutomationSuite\AHJ_Automation_Suite.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Release|Any CPU".
Project "C:\ahj\AHJAutomationSuite\AHJ_Automation_Suite.sln" (1) is building "C:\ahj\AHJAutomationSuite\AHJ_Automation_Suite\AHJ_Automation_Suite.csproj" (2) on node 1 (default targets).
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
  AHJ_Automation_Suite -> C:\ahj\AHJAutomationSuite\AHJ_Automation_Suite\bin\Release\AHJ_Automation_Suite.dll
Done Building Project "C:\ahj\AHJAutomationSuite\AHJ_Automation_Suite\AHJ_Automation_Suite.csproj" (default targets).
Done Building Project "C:\ahj\AHJAutomationSuite\AHJ_Automation_Suite.sln" (default targets).

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.68
[workspace] $ cmd /c call C:\WINDOWS\TEMP\hudson3254837668206352489.bat

C:\Program Files\Jenkins\jobs\AHJ\workspace>"c:\program files\NUnit 2.6.2\bin\nunit-console.exe"
NUnit-Console version 2.6.2.12296
Copyright (C) 2002-2012 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.

Runtime Environment - 
   OS Version: Microsoft Windows NT 5.1.2600 Service Pack 3
  CLR Version: 2.0.50727.3634 ( Net 3.5 )

fatal error: no inputs specified

NUNIT-CONSOLE [inputfiles] [options]

Runs a set of NUnit tests from the console.

You may specify one or more assemblies or a single
project file of type .nunit.

Options:
/fixture=STR         	Test fixture or namespace to be loaded (Deprecated) (Short format: /load=STR)
/run=STR             	Name of the test case(s), fixture(s) or namespace(s) to run
/runlist=STR         	Name of a file containing a list of the tests to run, one per line
/config=STR          	Project configuration (e.g.: Debug) to load
/result=STR          	Name of XML result file (Default: TestResult.xml) (Short format: /xml=STR)
/xmlConsole          	Display XML to the console (Deprecated)
/noresult            	Suppress XML result output (Short format: /noxml)
/output=STR          	File to receive test output (Short format: /out=STR)
/err=STR             	File to receive test error output
/work=STR            	Work directory for output files
/labels              	Label each test in stdOut
/trace=X             	Set internal trace level: Off, Error, Warning, Info, Verbose
/include=STR         	List of categories to include
/exclude=STR         	List of categories to exclude
/framework=STR       	Framework version to be used for tests
/process=X           	Process model for tests: Single, Separate, Multiple
/domain=X            	AppDomain Usage for tests: None, Single, Multiple
/apartment=X         	Apartment for running tests: MTA (Default), STA
/noshadow            	Disable shadow copy when running in separate domain
/nothread            	Disable use of a separate thread for tests
/basepath=STR        	Base path to be used when loading the assemblies
/privatebinpath=STR  	Additional directories to be probed when loading assemblies, separated by semicolons
/timeout=X           	Set timeout for each test case in milliseconds
/wait                	Wait for input before closing console window
/nologo              	Do not display the logo
/nodots              	Do not display progress
/stoponerror         	Stop after the first test failure or error
/cleanup             	Erase any leftover cache files and exit
/help                	Display help (Short format: /?)


Options that take values may use an equal sign, a colon
or a space to separate the option from its value.


C:\Program Files\Jenkins\jobs\AHJ\workspace>C:\Program Files\NUnit 2.6.2\bin\nunit-console.exe /run:AHJ_Automation_Suite.Tests.Firefox_Tests.Functional_Testing.Test_01_New_Seeker_Testing C:\ahj\AHJAutomationSuite\AHJ_Automation_Suite\bin\Release\AHJ_Automation_Suite.dll  
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files\Jenkins\jobs\AHJ\workspace>exit 9009 
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE


--
- "If you haven't suffered, you haven't lived your life."

Regards,
Ashok Tulachan
 

Michael

unread,
Oct 23, 2012, 2:36:01 PM10/23/12
to NUnit-Discuss
I'll field this one offline: it's a Jenkins question not an NUnit
question.

On Oct 23, 1:24 pm, Ashok Tulachan <tulachanas...@gmail.com> wrote:
> I'm getting error while running try to run the nunit-console.exe from
> Jenkins although it works when i try to run the same command from command
> prompt though.
>
> Below is the error i'm getting which says 'C:\Program' is not recognized as
> an internal or external command,
> operable program or batch file".
>
> Can anyone help me out why it errored out while running from Jenkins?
>
> Thanks
>
> ********************************************************************************************
>
> Started by user anonymous <http://localhost:8080/user/null>Building in
> workspace C:\Program Files\Jenkins\jobs\AHJ\workspace
> Updatinghttp://source.dev.dice.com/svn/ahjAtrevision 17
> no change forhttp://source.dev.dice.com/svn/ahjsince the previous build
> *- "If you haven't suffered, you haven't lived your life."*
>
> Regards,
> Ashok Tulachan

Ashok Tulachan

unread,
Oct 23, 2012, 2:41:14 PM10/23/12
to nunit-...@googlegroups.com
Correct but it's giving the error on NUnit command which is as below.
 
> C:\Program Files\Jenkins\jobs\AHJ\workspace>C:\Program Files\NUnit
> 2.6.2\bin\nunit-console.exe
> /run:AHJ_Automation_Suite.Tests.Firefox_Tests.Functional_Testing.Test_01_New_Seeker_Testing
> C:\ahj\AHJAutomationSuite\AHJ_Automation_Suite\bin\Release\AHJ_Automation_Suite.dll
> 'C:\Program' is not recognized as an internal or external command,
> operable program or batch file.
 
I think it's contradicting with the Jenkins path folder with NUnit folder.
 
Thanks,


 

--
You received this message because you are subscribed to the Google Groups "NUnit-Discuss" group.
To post to this group, send email to nunit-...@googlegroups.com.
To unsubscribe from this group, send email to nunit-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nunit-discuss?hl=en.




 

Charlie Poole

unread,
Oct 23, 2012, 2:57:32 PM10/23/12
to nunit-...@googlegroups.com
Off the cuff, it looks like you failed to put the path to
nunit-console.exe in quotes.
If that doesn't make it clear, I suggest trying a Jenkins list.

Is it normal to be creating workspaces in the C:\Program Files directory? That
doesn't seem right to me.

Charlie

Ashok Tulachan

unread,
Oct 23, 2012, 3:49:22 PM10/23/12
to nunit-...@googlegroups.com
Forgive my ignorance but i'm trying to set up Jenkins with Nunit following this site tutorial
 
http://redsolo.blogspot.co.uk/2008/04/guide-to-building-net-projects-using.html
 
 
After following all the steps, i'm getting that error and that's why i thought it was sth with Nunit.
 
Thanks,
 
Ash
Reply all
Reply to author
Forward
0 new messages