Karate Extent Report integrtion

时光毁灭记忆、已成空白 提交于 2021-02-10 03:23:32

问题


Karate -junit will provide Reports as BDD. We have new requirement to push this report to Report server KLOV(Extent Reports). Is this possible to with listener's? please let know the documentation.

Integration Extent Report with Karate frame work.


回答1:


Refer to the documentation here: https://github.com/intuit/karate#karate-info

within a test (or within the afterScenario function if configured) you can access metadata such as the Scenario name

You can add an afterScenario "listener" like this:

* configure afterScenario = 
"""
function(){
  var info = karate.info; 
  karate.log('after', info.scenarioType + ':', info.scenarioName);
  karate.call('after-scenario.feature', { caller: info.featureFileName });
}
"""

Refer to this file for more details hooks.feature



来源:https://stackoverflow.com/questions/51467018/karate-extent-report-integrtion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!