We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More

Forum Discussion

Amna_Saeed321's avatar
Amna_Saeed321
Occasional Contributor
7 years ago
Solved

"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?
  • IStaroverov's avatar
    IStaroverov
    7 years ago

    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)

4 Replies

  • AlexKaras's avatar
    AlexKaras
    Community Hero

    Hi,

     

    How do you execute this NUnit test from TestComplete?

     

  • tristaanogre's avatar
    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/running.html

    • IStaroverov's avatar
      IStaroverov
      Icon for Alumni rankAlumni

      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's avatar
        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.