karatelabs / vscode-extension

Karate Visual Studio Code Extension
https://marketplace.visualstudio.com/items?itemName=karatelabs.karate
9 stars 1 forks source link

[Question] Who to setup Karate extension on monorepo #15

Closed ciandt-crodrigues closed 1 year ago

ciandt-crodrigues commented 1 year ago

I have a monorepo but I'm unable to run the karate on vscode, because it does not recognize my karate-config.js file on the project I'm running. Is this something that needs implementation or I'm doing things wrong?

22:02:44.615 [main]  INFO  com.intuit.karate - Karate version: 1.4.0-SNAPSHOT
22:02:45.183 [main]  INFO  com.intuit.karate.Suite - backed up existing 'target\karate-reports' dir to: target\karate-reports_1689296565180
22:02:45.199 [main]  INFO  c.intuit.karate.core.FeatureRuntime - found scenario at line: 7
22:02:45.978 [main]  ERROR com.intuit.karate - <ProjectPath>/src/test/java/<feature>.feature:4
* url baseUrl
js failed:
>>>>
01: baseUrl
<<<<
org.graalvm.polyglot.PolyglotException: ReferenceError: "baseUrl" is not defined
- <js>.:program(Unnamed:1)

 <ProjectPath>/src/test/java/<feature>.feature:4
---------------------------------------------------------
feature:  <ProjectPath>/src/test/java/<feature>.feature:
scenarios:  1 | passed:  0 | failed:  1 | time: 0,0647
---------------------------------------------------------
ptrthomas commented 1 year ago

if this is a maven project, switch to the run mode maven.

else you should be able to adjust the classpath using this extension setting. this will be relative to the workspace root

image