-
Notifications
You must be signed in to change notification settings - Fork 473
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
add the --parallel option to run *.hurl files in parallel instead of sequentially #87
Comments
This feature could be indeed be useful in order to reduce the total test duration. It does not impact the hurl format and any existing semantics. It can not be implemented for the next release but maybe one after. |
Great news :) |
Was about to open this feature request. Hurl has been great and as the number of .hurl files grows it would be great to run them in parallel. |
Yes! On 2023, the big features we plan to work on:
We're going to work in this order as 1. might force us to rewrite the parser code. The parallel thing is (in my mind at least) one of the main feature we should address (it's in our mind since the begining, practically one of the first issues submitted). It's really adapted to a CLI tool like Hurl. We're using Hurl daily ourselves and I'm sure the parallel tests are going not only to improve tests duration but also find bugs on our web app / APIs. |
Workaround I'm using
Spawns one process for each file matching |
Yes, we're really going to take inspiration on |
Was just about to raise this feature request myself. I'm investigating deprecating our Runscope suite and migrating to Hurl and this would be a killer feature! <3 |
It's a high priority in our todo list! |
Would love to to some alpha testing. Let me know if I can be of any help! |
Initialisation of an architecture document here => /docs/spec/runner/parallel.md |
@lepapareil @fabricereix I've done some initial work about how we could render |
https://jcamiel.github.io/parallel/ parallel console output updated after discussion with @lepapareil / @fabricereix |
Hi all, This is much overdue, but we've implemented The model used is similar to
The parallelism used is multithread sync: a thread pool is instantiated for the whole run, each Hurl file is run in its own thread, synchronously . We've not gone through the full multithreaded async route for implementation simplicity. Moreover, there is no additional dependency, only the standard Rust lib. @ppaulweber we've chosen not to expose a kind of "thread affinity" inside a Hurl file, once again for simplicity of implementation. The only user option is Regarding stdout/stderr, we've, once again, followed the One can use debugging for a particular file with
In test mode, the progress bar is a little different from the non-parallel run, it will be harmonised for the official release (the sequential test progress will look like running Regarding report, the HTML, TAP, JUnit reports are not affected: reported tests, in parallel or in sequential mode, are in the same order as execution one. For instance: $ hurl --test --report-tap a.hurl b.hurl c.hurl Will always produced this TAP report, in this order, no matter what file is executed first:
What's next:
@muffl0n I'll be super happy if you could test it, I'm interested to know if this could potentially replace your usage with parallel ! (same announce made on #88) |
My first test looks amazing! I ran our 2520 tests (in 20 files) and the results speak for themselves:
I chose to run 1 job per file cause the default
is too conservative in my opinion. My underpowered test VM only has 1 CPU, so it would use one thread. But it shows that it can easily manage the 20 jobs I use in my test. Tap, junit and html reports look good and in order. Gonna give it a try in our CI tomorrow, but I do not expect any problems here. Thank you very much! This is just awesome! ❤️🔥 PS: I built a docker image for the current
|
Good feedback, we'll certainly adjust it |
Old school async: dump a bunch of threads on the OS and let the scheduler deal with it 🤷. I could be going out on a limb here, but I doubt curl's C api was designed to work with a rust async runtime, and I'd guess that shoehorning it would be non-trivial to say the least. So I'm glad that throwing threads at it seems to work. 👍 |
My tests in our CI also went well: Reports are displayed/parsed like before. |
Thanks a lot for the tests @muffl0n , do you get speed improvement in your CI as well? |
Yes, the speedup is about the same as in my previous tests. |
I'm closing this issue, we'll open new, more specific issues from now. |
Hi guys 😄
Currently when I launch this command
hurl runs each
*.hurl
file sequentially, first a.hurl, then b.hurl, then c.hurl.# tests started sequentially hurl a.hurl b.hurl c.hurl ─ BEGIN ├─ a.hurl ├─ b.hurl ├─ c.hurl ─ END
I propose you to add the
--parallel
option allowing hurl to run*.hurl
files in parallel:# all tests started at same time hurl --parallel a.hurl b.hurl c.hurl ─ BEGIN ├─ a.hurl ├─ b.hurl ├─ c.hurl ─ END
# tests started two at a time hurl --parallel 2 a.hurl b.hurl c.hurl ─ BEGIN ├─ a.hurl ├─ b.hurl ├─ c.hurl ─ END
What do you think about it?
The text was updated successfully, but these errors were encountered: