Skip to content

Run Mode: Custom

Peter Thomas edited this page Jul 31, 2023 · 10 revisions

For convenience, the Karate Visual Studio Code extension bundles and embeds the latest version of Karate. Teams maintaining large test-suites using advanced features may want to "lock-down" the version of Karate used, which is important when collaborating within a team and running tests in Continuous Integration.

You can get the specific version of Karate you need by following the instructions here: Standalone JAR.

To use this in Visual Studio Code, you have to switch the "Run Mode" in the extension settings to use "custom" (instead of "bundled") as shown below. For instructions on how to get to the extension settings, refer to this link.

 

This is an example of using karate.jar in the workspace root:

java -cp .;karate.jar com.intuit.karate.Main ${karateArgs}

To add extra JAR files to the classpath such as Karate Robot you can edit the value of the "Run: Mode Custom" to something like this:

java -cp .;karate.jar;karate-robot.jar com.intuit.karate.Main ${karateArgs}

You will need to use : (colon) instead of ; (semicolon) if on Linux or a Mac.

Clone this wiki locally