Hi User,
I have used Custom listener for this using Assert Event . Whenever Assert event will be fired long description will be captured in Property Specified. Custom listener should be at the start of script (can be first step as well such that listener is active whenever assert even is fired).
Code Snippet - Custom listener
var custom_listener = new com.itko.lisa.test.TestEventListener(){
public void testEvent(com.itko.lisa.test.TestEvent testevent){
if(testevent.getEventId() == com.itko.lisa.test.TestEvent.EVENT_ASSERT){
testExec.setStateValue("EventResponse",testevent.getLongDesc()); //event response property will store the long description(error) in assert event
}
}
};
testExec.setStateValue("Custom_Listener",custom_listener); //Stores a referens to the eventlistener so we can later remove it
testExec.getTestEventMgr().addListener(custom_listener,com.itko.lisa.test.TestEvent.noFilter); //Add the listener to the testcase
Please find below script implemented: Here I am capturing Parse error long info assertion description for ensure XML validation Assertion.
EventResponse Property highlighted below.
Regards
Rahul V