keczy1992
12 years agoNew Contributor
Java SoapUI Api, applying outgoing WSS to all test steps
Hi there!
I have a huge problem, because i got quite big project with many test suites (about 50), and every TS got about 10 Test Cases wich have about 6 methods.
As u can see that make my project is having about 3000 methods, and i have to add Outgoing WSS to all of them.
Because its realy hard work to get every test step and manualy set Outgoing WSS to it, i want to write a method in Java to automatize that work.
And here is the problem:
in SoapUI api i got class named: ApplyOutgoingWSSToRequestAction(WsdlRequest request, OutgoingWss outgoing), and i know where i can download only the first parameter "request" (tStep.getProperty("request");)
and i really dont know how can i get the outgoing parameter from Java side.
My method now looks like that:
public void addOutgoingWSSToAllTestSteps(){
List<TestSuite> tsList = testRunner.getTestCase().getTestSuite().getProject().getTestSuiteList();
Project project = testRunner.getTestCase().getTestSuite().getProject();
for(TestSuite tSuite : tsList){
if(!tSuite.isDisabled()){
List<TestCase> tcList = tSuite.getTestCaseList();
for(TestCase tCase : tcList){
List<TestStep> tstList = tCase.getTestStepList();
for(TestStep tStep : tstList){
ApplyOutgoingWSSToRequestAction applyOutgoingWSSToRequestAction = new ApplyOutgoingWSSToRequestAction(tStep.getProperty("request"), <here should be OutgoingWSS item>);
}
}
}
}
}
Than U in advance!
Tomasz Kaczyński
I have a huge problem, because i got quite big project with many test suites (about 50), and every TS got about 10 Test Cases wich have about 6 methods.
As u can see that make my project is having about 3000 methods, and i have to add Outgoing WSS to all of them.
Because its realy hard work to get every test step and manualy set Outgoing WSS to it, i want to write a method in Java to automatize that work.
And here is the problem:
in SoapUI api i got class named: ApplyOutgoingWSSToRequestAction(WsdlRequest request, OutgoingWss outgoing), and i know where i can download only the first parameter "request" (tStep.getProperty("request");)
and i really dont know how can i get the outgoing parameter from Java side.
My method now looks like that:
public void addOutgoingWSSToAllTestSteps(){
List<TestSuite> tsList = testRunner.getTestCase().getTestSuite().getProject().getTestSuiteList();
Project project = testRunner.getTestCase().getTestSuite().getProject();
for(TestSuite tSuite : tsList){
if(!tSuite.isDisabled()){
List<TestCase> tcList = tSuite.getTestCaseList();
for(TestCase tCase : tcList){
List<TestStep> tstList = tCase.getTestStepList();
for(TestStep tStep : tstList){
ApplyOutgoingWSSToRequestAction applyOutgoingWSSToRequestAction = new ApplyOutgoingWSSToRequestAction(tStep.getProperty("request"), <here should be OutgoingWSS item>);
}
}
}
}
}
Than U in advance!
Tomasz Kaczyński