Ask a Question

How do i set up the -G switch Via the command line

armygrad
Occasional Contributor

How do i set up the -G switch Via the command line

Hi

 

I need to run tests from the command line, to use the a global variable i think

i need to set the -G switch. How do i do this.

 

The Global variable is called Token

The command line is

 

cd C:\Program Files\SmartBear\SoapUI-5.7.0\bin

 

call testrunner.bat "C:\Users\USER1\Desktop\SoapUiReports\A_Token.xml" -s "TestSuite 1" -c "TestCase 1" -f "C:\Users\USER1\Desktop\SoapUiReports\LogFiles\Auth Token" -a

 

This is run from a .bat file

 

Thanks

2 REPLIES 2
jkrolczy
Regular Contributor

I use the -P in my projects but I assume the G should be the same concept.

 

Example:
"C:\Program Files (x86)\SmartBear\SoapUI-5.5.0\bin\testrunner.bat" -e${#Project#Endpoint${#Project#Env}} -s"Project TestSuite" -r -a -fC:\Git.Project\ProjectA\SoapUI\Logs -PEnv=m2 -PRunEnvTestType=OFFICIAL C:\Git.Project\ProjectA\SoapUI\WebServices\Service-Health-Check-soapui-project.xml


So in you command line syntax, add the following
-GToken=<your value>

 

https://www.soapui.org/docs/test-automation/running-from-command-line/functional-tests/


 

 

JamesK

Thanks for replying, would that also be the case for a global variable

 

i.e. -Paccess_token=mm

 

Where mm is the global variable in soapui?

cancel
Showing results for 
Search instead for 
Did you mean: