Adds a stress test

This commit is contained in:
Refringe 2024-07-18 00:23:27 -04:00
parent 5f192f9759
commit 0be167572f
Signed by: Refringe
SSH Key Fingerprint: SHA256:t865XsQpfTeqPRBMN2G6+N8wlDjkgUCZF3WGW6O9N/k
3 changed files with 85 additions and 1 deletions

View File

@ -35,6 +35,7 @@
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.1",
"pestphp/pest": "^2.34",
"pestphp/pest-plugin-stressless": "^2.2",
"spatie/laravel-ignition": "^2.8"
},
"autoload": {

76
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "7244c64606d1e9220385bd2f193c0906",
"content-hash": "93542851cf4f8ca963cbb447d144300e",
"packages": [
{
"name": "anourvalar/eloquent-serialize",
@ -11160,6 +11160,80 @@
],
"time": "2024-01-26T09:46:42+00:00"
},
{
"name": "pestphp/pest-plugin-stressless",
"version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/pestphp/pest-plugin-stressless.git",
"reference": "7494c7d9fab9649a0f85f9f04a179f20f1405501"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pestphp/pest-plugin-stressless/zipball/7494c7d9fab9649a0f85f9f04a179f20f1405501",
"reference": "7494c7d9fab9649a0f85f9f04a179f20f1405501",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-zip": "*",
"pestphp/pest": "^2.28",
"pestphp/pest-plugin": "^2.1.1",
"php": "^8.2"
},
"require-dev": {
"pestphp/pest-dev-tools": "^2.16"
},
"type": "library",
"extra": {
"pest": {
"plugins": [
"Pest\\Stressless\\Plugin"
]
}
},
"autoload": {
"files": [
"src/Autoload.php"
],
"psr-4": {
"Pest\\Stressless\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Stressless plugin for Pest",
"keywords": [
"framework",
"pest",
"php",
"plugin",
"test",
"testing",
"unit"
],
"support": {
"issues": "https://github.com/pestphp/pest-plugin-stressless/issues",
"source": "https://github.com/pestphp/pest-plugin-stressless/tree/v2.2.0"
},
"funding": [
{
"url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L",
"type": "custom"
},
{
"url": "https://github.com/nunomaduro",
"type": "github"
},
{
"url": "https://www.patreon.com/nunomaduro",
"type": "patreon"
}
],
"time": "2023-12-06T14:33:21+00:00"
},
{
"name": "phar-io/manifest",
"version": "2.0.4",

View File

@ -0,0 +1,9 @@
<?php
use function Pest\Stressless\stress;
it('homepage has a fast response time', function () {
$result = stress('/');
expect($result->requests()->duration()->med())->toBeLessThan(100);
});