I think this is the right way.
I’m doing it like so:
- let the tests run to the end
- get output.xml and parse it using
ResultVisitor - get all the failed and all the passed testcases
- report this to:
- JIRA as task/subtask (suite/testname)
- send mattermost hook to notify users
- send Email notification to notify users
Of course, you can handle listener, that will send information about failed test right after test fails, but for me is better to just parse output, and do other things with it, not just send email