简体   繁体   中英

Possibility of running karate tests in container

We are trying to run karate tests from docker container and trying to have test dependencies saved locally for security reasons.

Just a couple of questions:

  1. Can we have karate tests under main folder and run it as a java application?
  2. If yes, then what changes are required in build.gradle to facilitate this?

Any further suggestions for this use case would be great for me to make progress.

One easy way to do this is to have Gradle installed in the Docker container, then all you need is the source code like normal.

If you really need to create a JAR, sure that is possible. As you said, move the Karate dependencies out of test scope and have everything under src/main/ .

For examples of others who have done something similar[ (Maven, but you can do similar changes in Gradle), please see this thread: https://github.com/intuit/karate/issues/529

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM