See if you can try this approach. The test case below shows the setup:
The Setup Event Listener step is a JSR-223 step. The code implemented by this step is shown below:
import com.itko.lisa.test.TestEvent;
import com.itko.lisa.test.TestEventListener;
TestEventListener custom_listener = new TestEventListener() {
public void testEvent(TestEvent testevent) {
if ( testevent.getEventId() == TestEvent.EVENT_ASSERT ) {
// tell what to do with the event.
// In this case stores the long message in the flAssertMessage property
testExec.setStateValue( "flAssertMessage", testevent.getLongDesc() );
testExec.setStateValue( "flAssertEvent", testevent.getEvent() );
testExec.setStateValue( "flAssertTestRun", testevent.getTestRun() );
}
}
};
testExec.setStateValue( "Custom_Listener", custom_listener );
testExec.getTestEventMgr().addListener( custom_listener, TestEvent.noFilter );
return 0;
Then perform the side-by-side comparison.
The last step is an output message that prints the three properties identified in the Set Up Event Listener step.
flAssertMessage: {{flAssertMessage}}
flAssertEvent: {{flAssertEvent}}
flAssertTestRun: {{flAssertTestRun}}