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

How to run all tests in the file. Test group file ? #12

Open
ssokolov1 opened this issue Aug 23, 2022 · 2 comments
Open

How to run all tests in the file. Test group file ? #12

ssokolov1 opened this issue Aug 23, 2022 · 2 comments

Comments

@ssokolov1
Copy link

ssokolov1 commented Aug 23, 2022

You have a very promising tool that can save a lot of time. Really happy to find it on JetBrains forum. Great work and let me share my feedback.

I have around 20 HTTP scripts and planning to have xxx more. Each script has some GET/POST/DELETE requests and then some assertions. Is there a way to

a) Run all actions in the http file sequentially until the end and report output in some type of log file (configurable location) - may be but default input_file_name.success if all good and input_file_name.fail if there are arrors.

b) Create a group file that contains a list of http files to run. For example quick_test.http[ (inside a list of script files to run ) and full_regression.http(inside a list of tests to run).
httpx -f quick_test.http -p=local -logfilepath=somepath

If you need a help or accept donations for your work please publish a link. I would be happy to add a tip as your tool is a timesaver.

@ssokolov1
Copy link
Author

Right now it crashes for me on every run

└─[$] <git:(main)>  🔆  httpx -f  rest-api-altRenditions.http -p=docker *     
2022-08-23 17:15:27.063 ERROR 27383 --- [           main] o.m.http.model.HttpRequestParser         : HTX-002-500 - Failed to parse http code!

java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 3

the same test works fine in intellij

@linux-china
Copy link
Collaborator

linux-china commented Aug 28, 2022

Run all actions in the http file sequentially

yes, you can use httpx -f demo.http -a to run all tests.

Now CLI is not 100% compatible with JetBrains http client, especially on script handler. If any problem, please post and I will try to fix it.

2022-08-23 17:15:27.063 ERROR 27383 --- [ main] o.m.http.model.HttpRequestParser : HTX-002-500 - Failed to parse http code!

do you mind post your http file, and it's a bug of parser.

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

2 participants