When intent assertion fails, Botium returns a verbose error message that is good for console logging or general reporting. However, I need to run some post processing to analyze what intents were triggered and what were expected.
Here is an example of the verbose message:
Error: INTENT_NAME/INTENT_NAME_input-L2/Line 6: assertion error - Line 6: Expected intent "INTENT_NAME" but found nothing
#ASSERTION FAILED in IntentAsserter - Expected: "INTENT_NAME" - Actual: empty
INPUT: What is your name?
{"type":"asserter","source":"IntentAsserter","context":{"params":{"args":["INTENT_NAME"]}},"cause":{"expected":"INTENT_NAME","actual":null},"message":"INTENT_NAME/INTENT_NAME_input-L2/Line 6: assertion error - Line 6: Expected intent \" INTENT_NAME\" but found nothing","input":{"sender":"me","channel":null,"messageText":"What is your name?","stepTag":"Line 3","not":false,"asserters":[],"logicHooks":[],"userInputs":[]}}
If I could retrieve just the json in the example above, it would satisfy my requirement.