Closed toh2526 closed 6 years ago
This is already possible today by writing a small program or script that generates targets on the fly. I had good experiences using ‘jq’ for that purpose.
You need to use the -lazy
flag in vegeta attack
together with that script.
Does this solution works in cross platform manner ?
Not sure if Windows has any sort of pipes. But Windows 10 has a Linux sub-system with Bash so you can use that. https://docs.microsoft.com/en-us/windows/wsl/install-win10
Yes, windows has pipes. PowerShell pipeline can also 'feed' the app continiously.
Should I really install linux subsystem for load test ? :) No, not at all.
Great, so feel free to test it!
This is already possible today by writing a small program or script that generates targets on the fly. I had good experiences using ‘jq’ for that purpose.
Hi, thanks for this information. But I'm afraid it's not enough for me to begin.
Do you have an example of script to do that ? Very interested by this feature.
Thanks in advance.
@lhauspie: vegeta attack
can consume targets that are generated on the fly by specifying the -lazy
flag. Then any program can produce those targets and write them to a file or pipe that vegeta attack
takes in.
./your_target_generating_program.sh | vegeta attack -lazy ...
You can produce those targets in the JSON format which is much easier to work with than the HTTP format.
Proposal
Customizable/templatable attack batch requests.
Background
Sometimes we have to load test one URL with variety mix of POST body or GET params. Untill all items in the list get consumed. It could help a lot with template requests + CSV/JSON param lists like what's been done in jMeter.
Workarounds
For now? Maybe with parallel command used in here: https://www.simonholywell.com/post/2015/06/parallel-benchmark-many-urls-with-apachebench/