Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] CLI works but plugin doesn't #4

Open
lonix1 opened this issue Feb 19, 2019 · 4 comments
Open

[Bug] CLI works but plugin doesn't #4

lonix1 opened this issue Feb 19, 2019 · 4 comments

Comments

@lonix1
Copy link

lonix1 commented Feb 19, 2019

From original issue over here.

latest of everything:
@strest/cli 2.4.0
stREST Client 0.1.1
ubuntu 18.10
vscode 1.31.0

Steps to Reproduce:

  1. Copy-paste official example into foo.strest.yml file
  2. Run from CLI: works
  3. Run from vscode plugin: doesn't work (using all three ways shown in the doc)

Error is a little popup that says

Could not calculate YAML path.

@jgroom33
Copy link
Owner

jgroom33 commented Feb 19, 2019

I think this occurs when there is a comment after the test name

   fooTest:  # some comment

This should be fixed now. Try the latest

@lonix1
Copy link
Author

lonix1 commented Feb 19, 2019

Okay I just tried the new version. It didn't work at first because I needed to reload vscode.

Now I get some action, but still no success. When I click the button, it opens a strest_history.json tab on the right (not sure what that is). And it opens the output in the console in a tab below.

The output is

Successfully parsed YAML. Found YAML Object key testRequest
Found /home/foo/bar/myproject/strest_history.json!
Executing command strest /home/foo/bar/myproject/foo.strest.yml -k testRequest -l /home/foo/bar/myproject/strest_history.json -s /home/foo/bar/myproject/strest_history.json
/bin/sh: 1: strest: not found
error: Error: Command failed: strest /home/foo/bar/myproject/foo.strest.yml -k testRequest -l /home/foo/bar/myproject/strest_history.json -s /home/foo/bar/myproject/strest_history.json
/bin/sh: 1: strest: not found

Note it works when I run strest foo.strest.yml from the shell.

Remember in that other issue I complained about the need to install the cli tool globally... Well I did do that anyway, with sudo and it does work from the shell. However when I do whereis strest it shows me that it's installed at /home/myname/.npm/bin/strest. Maybe the extension is looking in the wrong place?

@jgroom33
Copy link
Owner

jgroom33 commented Feb 19, 2019

I don't think the extension looks anywhere for it. It just tries to execute.

The ideal solution is for strest to have an api so the plug-in doesn't use a cli hack for execution

@VahidN
Copy link

VahidN commented Oct 1, 2020

Same issue here

Successfully parsed YAML. Found YAML Object key loginRequest
Found d:\Prog\strest_history.json!
Executing command strest d:/Prog/JWT.strest.yml -k loginRequest -l d:/Prog/strest_history.json -s d:/Prog/strest_history.json

[ Strest ] Path C:\Users\Vahid\AppData\Local\Programs\Microsoft VS Code\d:\Prog\JWT.strest.yml does not exist
[ Strest ] Failed before finishing all requests

error: Error: Command failed: strest d:/Prog/JWT.strest.yml -k loginRequest -l d:/Prog/strest_history.json -s d:/Prog/strest_history.json

This path "C:\Users\Vahid\AppData\Local\Programs\Microsoft VS Code\d:\Prog\JWT.strest.yml" shouln't be like this. It's just "d:\Prog\JWT.strest.yml".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants