打印到控制台在空手道中不起作用 [英] Printing to console not working in Karate

查看:48
本文介绍了打印到控制台在空手道中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有测试微服务的方案. 方案大纲:运行对象查询

Scenario Outline: Run Object Queries
    Given url homeLinks.queryUrl
    And header Content-Type =  'application/x-www-form-urlencoded'
    When method post
    Then status 200
    Then print response

打印语句不会在InteliJ编辑器中记录任何要控制台的内容.我也尝试在调试模式下运行.

我提到了 KARATE:看不到打印语句在空手道的控制台上没有帮助.

打印日志需要进行任何配置更改吗?

解决方案

通常人们不会遇到问题.请在此处参考文档: https://github.com/intuit/karate#logging

如果您将空手道混入了具有许多其他依赖项的项目中,则可能会发生这种情况.我建议您尝试使用Maven快速入门,它可以直接使用: https://github.com /intuit/karate#quickstart

然后是将设置与您的项目进行比较的问题.如果仍然遇到问题,请执行以下过程: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

I have scenario which tests an Micro service. Scenario Outline: Run Object Queries

Scenario Outline: Run Object Queries
    Given url homeLinks.queryUrl
    And header Content-Type =  'application/x-www-form-urlencoded'
    When method post
    Then status 200
    Then print response

Print statement is not logging anything to console in InteliJ editor. I tried to run in debug mode as well.

I referred KARATE : can not see print statements on console in karate which didn't help.

Any config changes required to print the logs?

解决方案

Normally people don't run into issues. Refer the docs here: https://github.com/intuit/karate#logging

If you have mixed Karate into a project with a lot of other dependencies this may happen. I suggest you try the Maven quickstart and that will work correctly out of the box: https://github.com/intuit/karate#quickstart

Then it is a matter of comparing the setup with your project. If you still get stuck, follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

这篇关于打印到控制台在空手道中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆