Forum Discussion

VGaur's avatar
VGaur
Contributor
9 years ago

Accessing SoapUI NG command line arguments

Hello, 

 

Is there a way to access(through groovy script) the arguments those were passed to testrunner(cli).

 

for example for the below command , I want to check what environment(-E) was enforced.

testrunner.bat -sGlobalFunctions -c"xxx" -a -fD:\reportnew -EStage -R"TestSuite Report" -FPDF "C:\ApiProject "

 

Cheers,

Varun

2 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3

    By the way, did you try ?

    testrunner -help

    Otherwise, the simplest way would be to open the testrunner.bat file, look for the line starts with "java", there you find the fully qualified java class file name. Then use any IDE like eclipse / intellij IDEA to access the public methods of that particular class by creating object.

    • VGaur's avatar
      VGaur
      Contributor

      Thanks for the reply. 

      1. I tried System.getProperty("sun.java.command") and this gives a string which has all arguments that were passed to testrunner. We can parse the string and get the desired arguments.

      2. Also by accessing "com.eviware.soapui.SoapUI.cmdLineRunner" class would give the aruguments that were passed to testrunner.But I believe that this is applicable for soapui and not soapuipro.

       

      I found for readyapi the testrunner class "com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner" but its api documentation is not exposed to public.

       

      Cheers,

      Varun