Is there a way to run Karate tests as an integration test suite against a pre-booted spring boot server?

前端 未结 1 1388
忘掉有多难
忘掉有多难 2021-01-15 14:33

Is there any good way to get Karate tests to test a Spring-Boot microservice in the \"integration-test\" phase of a Maven build? What I mean is: is there an anti-pattern/w

1条回答
  •  爱一瞬间的悲伤
    2021-01-15 15:12

    First, this is not Karate.js not sure where that came from :)

    When running from maven-failsafe, Karate will generate .txt and .html files but does not generate .json Cucumber output files.

    Sorry, cannot replicate.

    For failsafe, just use the naming conventions and it will work, e.g. **/IT*.java

    Maven SureFire does not have this capability BUT the maven failsafe plugin does:

    So use failsafe as mentioned above. If you are not able to do that, please change your project to demonstrate the issue and we promise to fix it. Also refer these instructions: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

    Given no good answer, I will just revert to using cucumber-java + resteasy

    That is of course your choice. At least in my (biased :) opinion you will miss all the JSON assertion value that Karate adds, and the parallel execution + aggregation of reports. I am sure you will help as far as possible so that we can make the experience better for all who need this solution - but else, hey - no worries :P

    0 讨论(0)
提交回复
热议问题