e483bf73e7
Co-authored-by: Copilot <copilot@github.com>
49 lines
985 B
Markdown
49 lines
985 B
Markdown
# 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
|
|
```
|