1

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

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

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 .

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",
    .....
}
Rsf
  • 126
  • 1
  • 6

2 Answers2

2

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.

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

Glib Briia
  • 86
  • 4
1

Yes, this is intentional because Karate is not a BDD framework and is designed for teams that work with API-s. We felt that the file-name was more meaningful and the Feature name can be left blank (although not recommended).

I don't see this as a priority (unless you can convince us otherwise) - so maybe you could try influence the "AssertThat" team to make a change, or expose a settings flag. Please note that there are no issues with other reports such as this and this and also see this thread.

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248