Open tonyjaimee opened 4 months ago
@ivangsa can you help me on this issue?
hi @tonyjaimee
I'm not sure why it hangs there, that is already delegated to karate-core...
try disabling this setting and see if it helps
My experience is the same. Code generation is successful. Try to run any scenario, Test Results window shows ZenWave Karate IDE spinning forever. VSCode is not my native IDE (much prefer IntelliJ)
VSCode details: Version: 1.94.2 (user setup) Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427 Date: 2024-10-09T16:08:44.566Z Electron: 30.5.1 ElectronBuildId: 10262041 Chromium: 124.0.6367.243 Node.js: 20.16.0 V8: 12.4.254.20-electron.0 OS: Windows_NT x64 10.0.22631
Java details: openjdk version "17.0.12" 2024-07-16 LTS OpenJDK Runtime Environment Zulu17.52+18-SA (build 17.0.12+7-LTS) OpenJDK 64-Bit Server VM Zulu17.52+18-SA (build 17.0.12+7-LTS, mixed mode, sharing)
Tried OpenJDK 21 (I think) per https://stackoverflow.com/questions/78796054/process-hang-after-running-sample-zenwave360-karate-project -- looks like the OP on StackOverflow may be the OP on this question. No change. Still spins with no output of any kind.
Used openapi-generator to generate server code. Build and run the Spring Boot application on port 3000. The server starts and I'm able to get to swagger-ui, submit a request and get the expected 501. Changed karate-config.js baseUrl to point to my localhose:3000. No, trying to run the scenario still spins forever.
Any suggestions? I have a presentation of design-first benefits to code/test coming up and I really, really wanted this to work.
Regards (and thanks for the great work on this extension), Jim
hi @jimcakalic
if you don't get "any output of any kind" is probably because there is no java available in the default PATH
as soon as java is started all output comes from karate itself, but if there is no ouput is probably that..
try running java -version
on a default CMD
Hi @ivangsa,
Your diagnosis was correct. I've been starting VS Code by double-clicking the desktop icon. Started that way, the integrated terminal seems to know all the environment variables (based on response to 'env') but fails to interpolate the value of JAVA_HOME (which is set properly) into PATH (which env shows still references %JAVA_HOME%). As a result, java cannot be found.
Starting VS Code using the 'code' command from an existing shell window (powershell, cmd or git bash), the PATH is constructed correctly, java is found by the integrated terminal, and scenarios are running.
Thanks for the assist. I had noticed before that I couldn't run java directly from the integrated terminal, but maven seemed to run just fine and mvn --version finds the JDK17 referenced by JAVA_HOME.
Apparently, this is a long-standing issue: https://stackoverflow.com/questions/43983718/how-can-i-globally-set-the-path-environment-variable-in-vs-code. One of the recommended fixes there is to set "terminal.integrated.inheritEnv": "true" in defaultSettings.json. When I checked that, it was already set to true with a comment "This has no effect on Windows." :) In the end, I added a path element to my user Windows PATH variable that points to the JDK bin directory without reference to the JAVA_HOME variable.
Regards, Jim
the PATH of the terminal may or may not be the PATH of windows...
just make sure a plain CMD can find java
in the PATH would be enough..
I will try to show a more explicit error message for this..
Hi,
I have cloned your GIT repository into my local VSCode =>https://github.com/ZenWave360/karate-openapi-petstore.git
I simply clicked to run the helloWorld.feature to test it out but it seems the process hanged indefinitely at this line of code:
15:42:54.871 [Thread-0] DEBUG com.intuit.karate.Suite - [config] classpath:karate-config.js
(see attached screenshot)
(Note: I have already installed ZenWave KarateIDE Classpath Jar and configure classpath globally before running the feature file)
Would be great if you could advise how to troubleshoot this issue.
Look forward to hearing from you soon.
Thank you.