views:

114

answers:

2

Hi, This might sound silly but I have been trying to execute a NUnit test using powershell script, had several attempts but no hope. is there different format or do I need to add a plugin?

Any help would be appriciated...

Command = "c:\Program Files\NUnit 2.4.8\bin\nunit-console.exe" /config=Release "C:\projects\IntegrationTests\IntegrationTests.nunit" 2>&1

Output as below:

PS C:\tests> "c:\Program Files\NUnit2.4.8\bin\nunit-console.exe" /config=Release

"C:\projects\IntegrationTests\IntegrationTests.nunit" 2>&1

You must provide a value expression on the right-hand side of the '/' operator.

At line:1 char:55 + "c:\Program Files\NUnit 2.4.8\bin\nunit-console.exe" / <<<<

config=Release "C:\projects\IntegrationTests\IntegrationTests.nunit" 2>&1

Thanks in Advance

+1  A: 

You didn't put the part

/config=Release

inside your quoted command text.

Your command should probably look like

"c:\Program Files\NUnit 2.4.8\bin\nunit-console.exe /config=Release C:\projects\IntegrationTests\IntegrationTests.nunit" 2>&1

... i didn't check nunit-console.exe command line options, but i suppose you already tested if the nunit command works.

Filburt
Cédric Rup
@Cédric Thanks for support on the nunit side ... considering the question i should rather have pointed out that assigning the command string to a variable needs $Command = "..."
Filburt
Ozie Harb
A: 

Sorry for the mess in the top dialog, proper code version below

& 'c:\Program Files\NUnit 2.4.\bin\nunitconsole.exe' /config=Release C:\Projects\IntegrationTests\IntegrationTests.nunit 2>&1
Ozie Harb