boolean jumpExit = false;
TestStep currentStep = runContext.getCurrentStep();
securityTestStepListeners = securityTest.getTestStepRunListeners( currentStep );
if( !currentStep.isDisabled() && !securityTest.skipTest( currentStep ) )
{
TestStepResult stepResult = runTestStep( currentStep, true, true );
if( stepResult == null )
jumpExit = true;
// if( !isRunning() )
// return -2;
SecurityTestStepResult securityStepResult = new SecurityTestStepResult( currentStep, stepResult );
for( int i = 0; i < securityTestListeners.length; i++ )
{
if( Arrays.asList( getSecurityTest().getSecurityTestRunListeners() ).contains( securityTestListeners[i] ) )
securityTestListeners[i].afterOriginalStep( this, getRunContext(), securityStepResult );
}
for( int i = 0; i < securityTestListeners.length; i++ )
{
if( Arrays.asList( getSecurityTest().getSecurityTestRunListeners() ).contains( securityTestListeners[i] ) )
securityTestListeners[i].beforeStep( this, getRunContext(), stepResult );
}
for( int i = 0; i < securityTestStepListeners.length; i++ )
{
if( Arrays.asList( getSecurityTest().getSecurityTestRunListeners() )
.contains( securityTestStepListeners[i] ) )
securityTestStepListeners[i].beforeStep( this, getRunContext(), stepResult );
}
Map<String, List<SecurityScan>> secScanMap = securityTest.getSecurityScansMap();
if( secScanMap.containsKey( currentStep.getId() ) )
{
List<SecurityScan> testStepScansList = secScanMap.get( currentStep.getId() );
for( int i = 0; i < testStepScansList.size(); i++ )
{
SecurityScan securityScan = testStepScansList.get( i );
// if security scan is disabled skip it.
if( securityScan.isDisabled() || securityScan.isSkipFurtherRunning() )
continue;
//if step is failed and scan not applicable to failed steps just set it to skipped
//run scan otherwise
if( stepResult.getStatus() == TestStepStatus.FAILED && !securityScan.isApplyForFailedStep() )
{
SecurityScanResult securityScanResult = new SecurityScanResult( securityScan );
if( securityScan.getAssertionCount() > 0 )
securityScanResult.setStatus( ResultStatus.OK );
else if( securityScan instanceof AbstractSecurityScanWithProperties )