eykrehbein / strest

⚡️ CI-ready tests for REST APIs configured in YAML
MIT License
1.74k stars 59 forks source link

Stress testing ? #11

Closed vinyguedess closed 6 years ago

vinyguedess commented 6 years ago

Why don't add a possibility for stress testing permiting tests writer define how much requests per second wants to simulate ?

eykrehbein commented 6 years ago

Love this idea!

vinyguedess commented 6 years ago

How can I contribute ?

eykrehbein commented 6 years ago

@vinyguedess You can fork this repo and create a pull request with your changes

eykrehbein commented 6 years ago

Stress testing

Spengreb commented 6 years ago

Working on this at the moment.

The basic idea is to add 'repeat' and 'threads' into the schema of a request to start with. Firing requests off as quickly as possible and concurrently. Each thread being a user effectively. Though would like this configurable in future with a "ramp-up period" similar to JMeter.

As a side-effect with the repeat function would it be possible to use Faker in the URL too? i.e. repeat request but each time have a bit of Fake or random data in the URL.

Will post a PR when I've got it working, at the moment I only have schema validation done.

Anything you dont agree with let me know!

eykrehbein commented 6 years ago

@Spengreb thanks for contributing! As I said on Twitter, I'm unfortunately unable to work on the project atm so every help is even more appreciated! :D

Your idea sounds good! And to answer your question: you can use the Faker keyword everywhere just like the Value keyword since regex searches every key of each request for those patterns

eykrehbein commented 6 years ago

Added a feature to repeat a request x amount of times in #35. It's not per second but synchronously. Do you think a per-second-stress-test is still in need? @vinyguedess

vinyguedess commented 6 years ago

No, the purpose is check for concorrent connections. I think it satisfies it.