securityStatus = ResultStatus.UNKNOWN;
}
public void afterRun( TestCaseRunner testRunner, SecurityTestRunContext runContext )
{
SecurityTestRunnerImpl securityRunner = ( SecurityTestRunnerImpl )testRunner;
if( testRunner.getStatus() == SecurityTestRunner.Status.CANCELED )
{
securityTestLog.addText( "SecurityTest canceled [" + testRunner.getReason() + "], time taken = "
+ securityRunner.getTimeTaken() );
functionalTestLog.addText( "FunctionalTest canceled [" + testRunner.getReason() + "], time taken = "
+ securityRunner.getFunctionalTimeTaken() );
}
else if( testRunner.getStatus() == SecurityTestRunner.Status.FAILED )
{
String msg = securityRunner.getReason();
if( securityRunner.getError() != null )
{
if( msg != null )
msg += ":";
msg += securityRunner.getError();
}
securityTestLog
.addText( "SecurityTest failed [" + msg + "], time taken = " + securityRunner.getTimeTaken() );
if( functionalStatus == ResultStatus.OK )
{
functionalTestLog.addText( "FunctionalTest finished with status [" + functionalStatus
+ "], time taken = " + securityRunner.getFunctionalTimeTaken() );
}
else if( functionalStatus == ResultStatus.FAILED )
{
functionalTestLog.addText( "FunctionalTest failed [Failing due to failed test step], time taken = "
+ securityRunner.getFunctionalTimeTaken() );
}
}
else
{
securityTestLog.addText( "SecurityTest finished with status [" + testRunner.getStatus()
+ "], time taken = " + securityRunner.getTimeTaken() );
if( functionalStatus == ResultStatus.OK )
{
functionalTestLog.addText( "FunctionalTest finished with status [" + functionalStatus
+ "], time taken = " + securityRunner.getFunctionalTimeTaken() );
}
else if( functionalStatus == ResultStatus.FAILED )
{
functionalTestLog.addText( "FunctionalTest failed [Failing due to failed test step], time taken = "
+ securityRunner.getFunctionalTimeTaken() );
}
}
lastRunner = runner;
runner = null;