for (TestStep ts : testCase.getTestStepList()) {
SecurityTestStepResult secuTestStepResult = securityTest.getSecurityTestStepResultMap().get(ts);
if (secuTestStepResult != null) {
for (SecurityScanResult scanResult : secuTestStepResult.getSecurityScanResultList()) {
List<SecurityScanRequestResult> resultList = scanResult.getSecurityRequestResultList();
Testcase secTestCase = report.addTestCase(ts.getName() + " - " + scanResult.getSecurityScanName(),
scanResult.getTimeTaken());
secTestCase.setPackage(testCase.getTestSuite().getProject().getName());
for (int i = 0; i < resultList.size(); i++) {
SecurityScanRequestResult scanRequestResult = resultList.get(i);
if (scanRequestResult.getStatus() == ResultStatus.FAILED) {
StringBuffer result = new StringBuffer();
result.append("<pre>")
.append(XmlUtils.entitize(scanRequestResult.getChangedParamsInfo(i + 1)))
.append("</pre>");
for (String message : scanRequestResult.getMessages()) {
result.append("<pre>").append(XmlUtils.entitize(message)).append("</pre>");
}
secTestCase.addNewError().setStringValue(result.toString());
errorCount++;
}
}
}
}