Ask a Question

"An invalid argument was passed." Error appears while executing nunit test through TestComplete Proj

SOLVED
Amna_Saeed321
Occasional Contributor

"An invalid argument was passed." Error appears while executing nunit test through TestComplete Proj

I created a project in  Visual Studio and write a nunit test . When i added the nunit test in testcomplete and execute it. nunit test fails with following error: The NUnit console has returned an error during the test execution. See Additional Information for details. 15:55:32 Normal 2.07

 

In additional Information it mentioned the following error:

 

An invalid argument was passed.

"D:\Installers\NUnit.Console-3.10.0\bin\net35\nunit3-console.exe" /xml="D:\Webservice Project\Webservice\Webservice\bin\Debug\Webservice.trx" "D:\Webservice Project\Webservice\Webservice\bin\Debug\Webservice.dll" /nologo /run=Webservice.MyTestClass.testmethod
Invalid argument: /xml=D:\Webservice Project\Webservice\Webservice\bin\Debug\Webservice.trx
Invalid argument: /nologo
Invalid argument: /run=Webservice.MyTestClass.testmethod
NUnit Console Runner 3.10.0 (.NET 2.0)
Copyright (c) 2019 Charlie Poole, Rob Prouse
Wednesday, May 22, 2019 3:55:30 PM
 
 
This test is working fine when execute through Command prompt. Can anyone help me what is teh cause of this error?
4 REPLIES 4
AlexKaras
Community Hero

Hi,

 

How do you execute this NUnit test from TestComplete?

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
tristaanogre
Esteemed Contributor

How do you have the NUnit test set up within TestComplete?  A screenshot of the configuration option will probably be helpful in diagnosing the problem.   Reference https://support.smartbear.com/testcomplete/docs/working-with/integration/unit-test-frameworks/nunit/...


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
IStaroverov
SmartBear Alumni (Retired)

Hi

You use NUnit2 command Line parameters.
NUnit3 can't use this parameters

Could you check a version of TestComplete(Only TestComplete 14.10 supports NUnit3)

Amna_Saeed321
Occasional Contributor

Thanks, I was using Test Complete 12.6 version so I uninstalled all the Nunit 3 references and installed Nunit 2.7 references. It is working fine now.

 

cancel
Showing results for 
Search instead for 
Did you mean: