karatelabs / karate

Test Automation Made Simple

Home Page:https://karatelabs.github.io/karate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

afterScenario hook not running when scenario fails

Liz0206 opened this issue · comments

I am doing an integration between Jira Rest API + karate that allows my team generate Test Cases automatically the first time running a new scenario. I added an after scenario hook in order to send the scenario results to Jira. Each time the scenario fails, the test stopped and afterScenario hook is skipped. Is there any open bug for this? I read the hook section but doesn't said anything related to the Scenario status itself? Is there anything I'm missing?

@Liz0206 very few teams use hooks so my suggestion is please contribute code or work with your leadership to do so. you can see that vendors such as x-ray and report portal document how you can integrate, you may be able to look at their implementation for tips.

https://github.com/reportportal/agent-java-karate
https://docs.getxray.app/display/XRAYCLOUD/Testing+APIs+using+Karate+DSL