Auth info not used in Commnd-line execution
Hi,
I have a TestSuite with 2 Testcases.
The first TestCase has a groovy step, that creates a Kerberos Ticket Generating Ticket (TGT).
The second TestCase has a REST step, for which Kerberos/SPNEGO AUTH is selected.
When I execute the TestSuite from the UI, it successfully runs (i.e. the first TestCase creates a TGT in my User Profile folder, and the second TestCase uses the TGT while making a REST call). All good here.
But when I run the same TestSuite from Command-line, REST step fails with 401 error.
"C:\Program Files\SmartBear\SoapUI-5.4.0\bin"\testrunner.bat -GpasswordForTGT="passwordHere" -f"C:\Users\userIDHere\Test_Results" -s"My_TestSuite" C:\myProjectName-soapui-project.xml
Ideally, when the server responds with 401 error, the TestCase should have made the second request automatically, with the Kerberos token. But, fiddler shows me that the second request is going without the token, so the REST step fails. Please let me know how can I resolve this.
Thank you
I have noticed one thing. When I open the "TestCase Editor" and click on the run icon, then TestCase properly using the Kerberos TGT that is in my User Profile folder.
But when I use TestRunner to run the same TestCase, I get the Authentication error (ie. it is not using the Kerberos TGT to send a ticket to the Server).
What is the different in executing a TestCase from the Editor Vs executing it from TestRunner?
I found the resolution.
For the Kerberos auth to work correctly from the TestRunner, it needs the following JVM parameter:
-Djavax.security.auth.useSubjectCredsOnly=false