Forum Discussion
PaulDonny
12 years agoRegular Contributor
This was a fun one. I did it with just a groovy script step but it should at least help lead you down the correct path
The following code will build a new project level outgoingWSS and put it into all WSDLTestSteps in the current project:
Change the code as you need but it should lead you down the correct path
The following code will build a new project level outgoingWSS and put it into all WSDLTestSteps in the current project:
def project = testRunner.testCase.testSuite.project;
def WssC = project.getWssContainer();
if (!WssC.getOutgoingWssList().contains("testing")) {
def owss = WssC.addOutgoingWss("testing");
owss.setActor("blah");
owss.setPassword("Test");
owss.setUsername("Test");
owss.setMustUnderstand(true);
}
for (ts in testRunner.testCase.getTestStepList()) {
if (ts instanceof com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep) {
trs = ((com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep)ts);
trs.getTestRequest().setOutgoingWss("testing");
}
}
Change the code as you need but it should lead you down the correct path