English 中文(简体)
Karate reports stopped showing server response when I upgraded version
原标题:
  • 时间:2023-08-11 21:24:04
  •  标签:
  • karate

In the previous versions of Karate (before upgrading to 1.3.1) when I had this in the reports:

enter image description here

the "When method post" was clickable and you could see the server response. This was extremely useful for debugging (and to use tests as living documentation as BDD states), but now it is not clickable anymore.

Is there some way to have it back without downgrading to previous version of karate?

Thanks

问题回答

When you mix some dependencies with Karate it can affect the logging system. If logs are not "captured" by Karate correctly, you will have this problem.

Refer to this example and documentation for possible solutions

If you use the quickstart or github template, you will see that you won t have this problem. So for anyone to help, please follow this process.

Hours later I realized the cause of the problem. I have to tell that Karate s reports implementation is a bit weird because it takes the reports input directly from the logs so it depends on your logs configuration.

In one of the latest updates of Karate its package changed from karate.org to intuit.karate, so my log configuration in logback-test.xml got outdated because it was written in terms of karate.org.

Why was I mentioning karate.org in my logs? Because I have to set Karate logs to be at DEBUG level so I can see them, otherwise they will be lost because real systems default log level is INFO. If those logs are required for the reporting tool maybe Karate should set them at INFO level.

Note that Thymeleaf package also changed from karate.thymeleaf to org.thymeleaf because probably you will also want to disable it in a real system (Can I disable the thymeleaf report from the karate log).

PD: I love the tool, but I don t think that downvoting questions or understimate this issues will help real users.





相关问题
How do I get karate-gatling example project to compile?

I downloaded the karate-gatling example project from here: https://github.com/karatelabs/karate/tree/master/karate-gatling I opened the project in IntelliJ and ran the following command: mvn clean ...

Reading Data with from csv file in Karate

Below is the data, I have maintained in the csv file Data "[{ label : Karate is the only open-source tool to combine API test-automation, mocks, performance-testing and even UI automation into ...

Conditional logic for Karate UI

I am trying to add a conditional logic for karate UI feature that I am trying to build. The requirement is this: There are 5 fields; select(‘select[id=currency]’, ‘EUR’) // has a random logic to ...

热门标签