Announcing Stressless
We are thrilled to announce the release of a brand new plugin for Pest PHP: Stressless.
It's a fresh new addition to the Pest PHP family, and it brings the power of stress testing to the PHP ecosystem. It integrates seamlessly with Pest PHP, combining the power of stress testing with the simplicity and elegance of Pest's Expectation API.
Check out this YouTube video where we walk you through the installation and setup of the Stressless plugin:
As you can see, it's effortless to get started with Stressless — all you need to do is require the package using Composer, and you're ready to go!
There are two main ways to use Stressless. You may use it to quickly stress test your application from the command line:
1./vendor/bin/pest stress example.com --concurrency=5 --duration=10
Or you can use it to write stress tests in your Pest PHP test files:
1<?php 2 3test('black friday', function () { 4 $result = stress('example.com') 5 ->concurrently(5) 6 ->for(10)->seconds(); 7 8 $requests = $result->requests; 9 10 expect($requests->failed->count)11 ->toBe(0);12 13 expect($requests->duration->med)14 ->toBeLessThan(100.0); // 100ms15});
Check our documentation to get started with Stress Testing / Stressless: Stress Testing →. We hope you enjoy this new addition to the Pest PHP family!
If you're considering a testing framework for your next project, here's why you should give Pest a try: Why Pest →