Forum Discussion

sburkard's avatar
sburkard
Occasional Contributor
10 years ago

Obtain arguments given to testrunner.sh in Script

Hi    Is there a way to obtain the arguments given to testrunner.sh? For example the endpoint from the -e option or the username from the -u option?   I found in the JavaDoc that the class Abstra...
  • sburkard's avatar
    10 years ago

    OK I finally found it. 

     

    I can obtain the runner instance through the statically accessible SoapUI class. I already tried this, but I must have overseen the getCmdLineRunner method that does the trick. 

     

    import com.eviware.soapui.SoapUI
    
    def runner = SoapUI.getCmdLineRunner()
    assert runner != null
    
    log.info runner.getEndpoint()
    log.info runner.getUsername()