空手道和黄瓜之间不兼容的黄瓜json报告

空手道和黄瓜之间不兼容的黄瓜json报告

本文介绍了空手道和黄瓜之间不兼容的黄瓜json报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将空手道测试中的json结果导入到 AssertThat Jira插件中.

I am trying to import json results from karate tests into the AssertThat Jira plugin.

在黄瓜js 5.1.0上导入效果很好,但在空手道0.9.2上导入失败

Importing works well with cucumber js 5.1.0, but fails using karate 0.9.2

问题似乎出在Assert那,它使用json中的功能的名称"与其内部功能名称相关,以及空手道和黄瓜js如何使用名称"和描述"字段.

Seems that the problem lies in AssertThat using the Feature's "name" in the json to correlate to its internal Feature names, and a difference between how karate and cucumber js use the "name" and "description" fields .

黄瓜js使用功能文件本身中的功能名称,例如具有功能:测试报告"功能的功能文件将生成带有以下内容的json:

Cucumber js uses the Feature's name from the feature file itself e.g. a feature file with "Feature: test reporting" will generate a json with:

{
    "keyword": "Feature",
    "name": "test reporting",
    "description":"In order to do report tests\n  As a developer\n  I want to do reporting",
     .....
}

空手道将特征文件名用作名称",并将实际特征放入描述"中:

While karate uses the feature file name for the "name" and put the actual Feature in the "description":

{
    "keyword":"Feature"
    "name":"cats.feature",
    "description":"test reporting",
    .....
}

推荐答案

我们添加了一个额外的标志-k,该标志是可选的,默认为'cucumber',但可以将其设置为'karate',以导入空手道类型结果.

We've added an extra flag -k which is optional and defaults to 'cucumber' but can be set to 'karate' for importing karate type results.

已发布新的客户端插件版本(1.3),并更新了文档以供进一步参考 https://assertthat.atlassian.net/wiki/spaces/ABTM/pages/728105165/Integration+with+Test+Automation+Framework

New client plugins version released (1.3) and documentation updated for further reference https://assertthat.atlassian.net/wiki/spaces/ABTM/pages/728105165/Integration+with+Test+Automation+Frameworks

这篇关于空手道和黄瓜之间不兼容的黄瓜json报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 20:36