Skip to content
New issue

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

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

Already on GitHub? # to your account

adding --body-regex option #42

Merged
merged 3 commits into from
Jun 15, 2020
Merged

adding --body-regex option #42

merged 3 commits into from
Jun 15, 2020

Conversation

hzakher
Copy link
Contributor

@hzakher hzakher commented Jun 9, 2020

Before you submit a pull request, please make sure you have read and followed the contributing guidelines

Description

i added a new option --body-regex. this allows to generate different values (following the regex) at every request.
my use-case where i needed that option, was when i wanted to make 10k user # requests, where each request would have a unique username.

pewpew stress -X POST --body-regex --body '{"username":"test_[a-z]{3,10}@(me|you)\.(org|net)","password":"secret123"}' -H "Content-Type:application/json" https://httpbin.org/post

Does this close any currently open issues?

No.

@coveralls
Copy link

coveralls commented Jun 9, 2020

Coverage Status

Coverage decreased (-0.7%) to 97.751% when pulling a059047 on hzakher:master into bf6525b on bengadbois:master.

Copy link
Owner

@bengadbois bengadbois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! One small request, otherwise this looks great

@bengadbois bengadbois merged commit 57c99d7 into bengadbois:master Jun 15, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants