// flag for detecting if running has been interrupted either by canceling
// securityScanRequest
// or if request result is null(backward compatibility for running
// TestCase )
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() )