PHPackages                             craftix/swoole-requester - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. craftix/swoole-requester

ActiveLibrary[Testing &amp; Quality](/categories/testing)

craftix/swoole-requester
========================

A PHP Swoole package to run HTTP request stress tests.

v1.0.0(1y ago)11MITPHP

Since Jan 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mirataollahi/swoole-stress-test)[ Packagist](https://packagist.org/packages/craftix/swoole-requester)[ RSS](/packages/craftix-swoole-requester/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Swoole HTTP Stress Tester
=========================

[](#swoole-http-stress-tester)

A PHP-based HTTP client stress tester built with Swoole. This package allows you to send concurrent requests to an HTTP server for performance testing.

Features
--------

[](#features)

- **Concurrency**: Supports configurable concurrency for sending multiple requests simultaneously.
- **Request Count**: Allows defining the number of requests to be sent in the stress test.
- **Timeouts**: Customizable request timeout settings.
- **SSL Handling**: Option to disable SSL verification for HTTP requests.
- **Performance Metrics**: Tracks success, failure, throughput, and duration of the requests.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.2
- Swoole extension &gt;= 4.5.0
- Composer

Installation
------------

[](#installation)

### Step 1: Install the dependencies

[](#step-1-install-the-dependencies)

Install the project via Composer:

```
 composer require craftix/requester
```

Usage
-----

[](#usage)

### Run test with php

[](#run-test-with-php)

#### Create a PHP file named `stress-test.php` and copy the code below:

[](#create-a-php-file-named-stress-testphp-and-copy-the-code-below)

```
use Craftix\Requester\Config;
use Craftix\Requester\Requester;

$config = Config::create()
    ->setHost('127.0.0.1') // The target host to send requests to (e.g., 'google.com')
    ->setPort(8040) // The target port to use for requests (default is 443 for HTTPS)
    ->setPath('/') // The path for the HTTP request (e.g., '/' for the root page)
    ->setRequestCount(1000) // The total number of requests to send during the stress test
    ->setConcurrency(50) // The number of concurrent requests to send at a time
    ->setRequestTimeout(2) // The timeout duration (in seconds) for each request
    ->disableSsl(); // Disable SSL verification (useful for testing against servers with invalid SSL certificates)

/**
 * Run Stress Test
 */
Requester::run($config);
```

#### Run php test file

[](#run-php-test-file)

```
 php ./stress-test.php
```

### Run test with docker

[](#run-test-with-docker)

#### Run stress test with docker

[](#run-stress-test-with-docker)

```
 docker build -t swoole-requester ./vendor/craftix/
 docker run swoole-requester
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance42

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

477d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fc9a31948086fa7737cfa0438d87a786e1957b9d0b1289c6d6b680b33605a152?d=identicon)[craftix](/maintainers/craftix)

---

Top Contributors

[![mirataollahi](https://avatars.githubusercontent.com/u/44911100?v=4)](https://github.com/mirataollahi "mirataollahi (5 commits)")

### Embed Badge

![Health badge](/badges/craftix-swoole-requester/health.svg)

```
[![Health](https://phpackages.com/badges/craftix-swoole-requester/health.svg)](https://phpackages.com/packages/craftix-swoole-requester)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M679](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M571](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.0k](/packages/orchestra-testbench)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
