Contact Information

152 W Park Ave #150
El cajon CA 92020

We Are Available 24/ 7. Call Now.



#Stress #testing #Pest #Stressless #plugin

The PEST team just announced 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 the YouTube video above in which Nuno Maduro, the creator of PEST, demonstrates the Stressless plugin.

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:

./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:

<?php

 

test('black friday', function () {

$result = stress('example.com')

->concurrently(5)

->for(10)->seconds();

 

$requests = $result->requests;

 

expect($requests->failed->count)

->toBe(0);

 

expect($requests->duration->med)

->toBeLessThan(100.0); // 100ms

});

Check the documentation to get started with Stress Testing / Stressless: Stress Testing →.



Share:

administrator

Entrepreneur Creative Designer @al.janahy Founder of @inkhost another face of @aljanahy.fit I hope to stay passionate in what I doing

Leave a Reply

Your email address will not be published. Required fields are marked *