Having already run some promising experiments with Karate-Gatling, we wanted to take it to the next level with Distributed Load Testing across multiple Kubernetes pods and clusters. Following the docs, I tried to explore the karate-gatling-demo and espacially the GatlingDockerJobRunner.
But with the current versions (since v1.2.0) I don't get the code successfully built. No matter which command, mvn clean test, mvn gatling:test or even mvn gatling:test -Dtest=jobtest.GatlingDockerJobRunner - they always return:
Could not resolve dependencies for project com.intuit.karate.examples:examples-gatling:jar:1.0-SNAPSHOT: Failure to find com.intuit.karate:karate-gatling:jar:1.0-SNAPSHOT in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
Up to v1.1.0, on the other hand, it works on my machine (Ubuntu 20.04 inside Windows 11 WSL2).
Seems like the pom.xml is currently no longer valid?
Edit:
BTW: The docs for this example seems very sparse to me, which may be part of the reason why other people (see here) find it difficult to get into. The Maven commands for quick trial don't seem to be documented at all.
Ok, my mistake. Since v1.2.0 you have to hard overwrite the
${karate.version}variable with the correct value in the pom.xml to build the example:But one question remains:
How do I run the
GatlingDockerJobRunnerexample correctly? The commandmvn gatling:test -Dtest=jobtest.GatlingDockerJobRunnerdoes not seem to be right. Because I would expect it to start up worker nodes in Docker containers, which is not the case.Edit:
In the above-mentioned post on distributed Karate-Gatling tests, the questioner had found out for himself in a later comment that he could use this command:
mvn exec:java -Dexec.mainClass="jobtest.GatlingDockerJobRunner" -Dexec.classpathScope="test".In fact, this will launch two karate-chrome containers (the workers?). However, this repeatedly throws errors of this type:
And several minutes later, the process hangs at some point printing
exit status 1; not expected(without terminating and shutting down the containers):Given the lack of hints, I wonder if this error pattern is part of the experimental status of the whole approach that I have to accept, or if I am still doing something wrong?