Stess testing added, it wasn't very helpful cause the server could easily handle 100 chrome instances at the same time. May be would be better to stress test with pure http requests instead. Leaving this for later.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-05 23:13:12 +05:00
parent b2c349fc8e
commit c1e1f74557
3 changed files with 254 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
# stress-test-01
C# .NET console app that launches 20 Playwright Chromium instances, navigates to the deployed URL, and clicks a button every 200ms.
## Defaults
- URL: prompted from user input every run
- Instances: `20`
- Interval: `200` ms
- Button selector: `button:visible` (first match)
- Headless: `true`
## Run
```bash
cd Testing/stress-test-01
dotnet restore
dotnet build
./bin/Debug/net10.0/.playwright/node/linux-x64/node ./bin/Debug/net10.0/.playwright/package/cli.js install chromium
dotnet run
```
PowerShell alternative:
```bash
pwsh bin/Debug/net10.0/playwright.ps1 install chromium
```
The app will prompt:
```text
Enter target URL:
```
## Optional overrides
Use either environment variables or CLI args:
- `INSTANCE_COUNT` or `--instances=<value>`
- `CLICK_INTERVAL_MS` or `--intervalms=<value>`
- `BUTTON_SELECTOR` or `--selector=<value>`
- `HEADLESS` or `--headless=<true|false>`
Example:
```bash
INSTANCE_COUNT=20 CLICK_INTERVAL_MS=200 dotnet run
```