Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/load-testing.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# Load testing

The [ServiceControl Testing Tool](../tools/testing-tool/README.md) is a stateless .NET service that generates error load and real-world failure scenarios against a test ServiceControl instance, to validate error-ingestion performance. It has a web UI for manual control, built-in failure scenarios (third-party outage, timeout spike, poison message, and more), and OpenTelemetry telemetry.
The [ServiceControl Testing Tool](../tools/testing-tool/README.md) is a .NET service that generates error load and real-world failure scenarios against a test ServiceControl instance, to validate error-ingestion performance. It has a web UI for manual control, built-in failure scenarios (third-party outage, timeout spike, poison message, and more), and OpenTelemetry telemetry.

The [testing tool README](../tools/testing-tool/README.md) is the full reference: every scenario, API endpoint, configuration setting, container usage, and scaling notes.

## Quick start: full stack with Aspire

The Aspire AppHost starts the whole system with a single command: the ServiceControl platform (Learning transport), the testing tool, and a complete observability stack (OTel Collector, Jaeger, Prometheus, and Grafana with a prebuilt dashboard).
The Aspire AppHost starts the whole system with a single command: the ServiceControl platform (RabbitMQ by default), the testing tool, and a complete observability stack (OTel Collector, Jaeger, Prometheus, and Grafana with a prebuilt dashboard).

```bash
aspire run tools/testing-tool/TestingTool.AppHost/TestingTool.AppHost.csproj
```

Aspire assigns dynamic ports. Open the web UI of the testing tool through the link in the Aspire dashboard.

The AppHost enables external integration-event publishing on the error instances, so ServiceControl writes and publishes a `MessageFailed` event for each ingested failure. This can change ingestion baselines compared with a run without it.

Useful flags, passed after `--`:

| Flag | Description |
Expand Down Expand Up @@ -43,6 +45,7 @@ Everything is controllable from the web UI, or via the HTTP API:
- Scenarios: the six built-in scenarios (`third-party-outage`, `timeout-spike`, `poison-message`, `deserialization-failure`, `background-noise`, `large-messages`), each producing errors that group naturally. `large-messages` starts at 3 messages per second unless `rate` is set, sends bodies of about 256 KiB (the wire envelope is slightly larger), fails 20% of them to the error queue, and audits the rest. The bypass writer fails every message by design, so it sends the large bodies only as failures. Start with `POST /api/scenarios/{name}/start` (optional `rate` and `durationSeconds`).
- Bypass writer: high-throughput load that writes failed-message envelopes directly to the ServiceControl error queue, skipping the message handler (`POST /api/bypass/start`).
- Jobs: retry, archive, search, retention sweep, and custom-check-failure jobs exercise ServiceControl's recoverability, FTS search, and retention pipelines against the load. Jobs do not start automatically. Start them from the UI or `/api/jobs`.
- Smoke tests: the **Smoke tests** tab runs an API-verified version of the functionality checklist in the [testing scenarios](testing-scenarios.md) against the instance under test, with manual rows for what only a person can verify. Do not confuse it with the load presets: it sends a few messages per check and reads the results back through the ServiceControl APIs. The [testing tool README](../tools/testing-tool/README.md#smoke-tests) lists each check, its prerequisites and its limits.
- Release-test presets: named presets mapped from the [testing scenarios](testing-scenarios.md), for example `POST /api/release-tests/ingestion-load/start`.

## Observing the run
Expand Down
2 changes: 2 additions & 0 deletions docs/testing-scenarios.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ This list is long but not exhaustive. Not every change needs every test.

## Functionality

The **Smoke tests** tab of the [testing tool](../tools/testing-tool/README.md#smoke-tests) automates the API-level part of the custom checks, heartbeats, recoverability, audits, saga auditing, integration events and monitoring items below: it generates the messages and verifies the results through the ServiceControl APIs. The ServicePulse screens, the installation steps, the public integration events sample, chaos testing and performance testing stay manual. The manual rows of the tab list them.

- [ ] Install and run ServiceControl Primary, Audit, and Monitoring instances
- [ ] [Install the ServiceControl.SmokeTesting tool](https://github.com/Particular/ServiceControl.SmokeTest#installing)
- [ ] Start the smoke testing tool, for example `dotnet servicecontrol.smoketest rabbitmq`
Expand Down
6 changes: 5 additions & 1 deletion docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,8 @@ Containers built by a PR and stored on GitHub Container Registry can be tested l
* Audit API
* Monitoring API
* ServicePulse (latest from Docker Hub)
6. Exit the CLI process. Aspire stops the application automatically.
6. Exit the CLI process. Aspire stops the application automatically.

## Smoke tests with the testing tool

The [testing tool](../tools/testing-tool/README.md#smoke-tests) has a **Smoke tests** tab that sends deterministic messages with a run-specific identifier and verifies custom checks, heartbeats, retries, message editing, redirects, audit data, conversations, sagas, integration events and monitoring data through the ServiceControl APIs. Start it with the Aspire AppHost and `--audit-instances 1`, as described in the [load testing](load-testing.md) page. It complements the [testing scenarios](testing-scenarios.md) checklist: the rows it does not automate stay manual.
Loading
Loading