Forum Discussion

racoliv's avatar
racoliv
New Contributor
13 years ago

How to perform a security scan using the API

Hello.

I'm using soapUI API for integrating it's security scans with one application i'm developing.

I'm having much difficulties understanding SOAPui behaviour from it's Javadoc. Although it is structured, due to it's lack of description is very difficult to know which methods/classes do what...

So basically i have this code sample:


project = MyClass.getInstance().getProject();

WsdlTestSuite wts = new WsdlTestSuite(project, null) ;
WsdlTestCase wtc = wts.addNewTestCase("testcase");
SecurityTest st = wtc.addNewSecurityTest("security");
WsdlTestStep wtstep = wtc.addTestStep("calltestcase", "teststep");

//example to specify a XML BOMB attack
SecurityScan sc= st.addNewSecurityScan(wtstep, "XML Bomb");


So how do i execute the security scan?

is it the run method inside SecurityScan, or will i have to instantiate the attack that i want to use like this...

XmlBombSecurityScan xs = XmlBombSecurityScan( TestStep testStep, SecurityScanConfig config, ModelItem parent, String icon )


and then call execute....

if it is the second option i have to call, i'm having a doubt about what these classes do and what is the best way to instantiate them:

SecurityTestRunner
SecurityTestRunContext

I was hoping that someone could provide me insight how to do this, if possible with insightful code samples.

Thanks in advance.
No RepliesBe the first to reply