cancel
Showing results for 
Search instead for 
Did you mean: 

How to set authorization header in SoapUIProTestCaseRunner?

New Contributor

How to set authorization header in SoapUIProTestCaseRunner?

While integrating ReadyAPI tests with Java code, how to set authorization? I get error:

#status# : HTTP/1.1 403 Forbidden in java console
SoapUIProTestCaseRunner runner = new SoapUIProTestCaseRunner();runner.setProjectFile("C://APILOcal//activations.xml");runner.setTestSuite("ServiceSOAP TestSuite");runner.setTestCase("createContractBundle TestCase");runner.setTestStepCount(3);
//runner.setGlobalProperties(new String[]{"Authorization: Basic admin=admin"});
//runner.setCustomHeaders(new String[]{"Authorization: Basic admin=admin"});
//runner.setUsername("admin");
//runner.setPassword("admin");
//runner.setWssPasswordType("PasswordText");runner.run();

I have set username and password in readyAPI Tool and can successfully run the test in the tool.

Please guide.

3 REPLIES 3
New Contributor

Re: How to set authorization header in SoapUIProTestCaseRunner?

any pointer?

Super Contributor

Re: How to set authorization header in SoapUIProTestCaseRunner?

Community Hero

Re: How to set authorization header in SoapUIProTestCaseRunner?

You need to use Events feature, beforeSubmit, add the header.


Regards,
Rao.
New Here?
Join us and watch the welcome video:
Top Kudoed Authors