← Zurück zu Business Systems Specialist Collection
Entdecke, wie der Skill hilft
Lasttests sicher ausführen
Begrenzt autorisierte Lasttests durch Umgebung, Ressourcenbudgets und Stoppbedingungen mit anschließender überprüfbarer Bereinigung.
safe-execution-test-cleanup
Teammitglieder mit diesem Skill
Wann ist der Skill hilfreich?
Nutze dies vor Verkehr mit Auswirkungen auf gemeinsame Dienste oder Kosten.
Wobei hilft er dir?
- Bestätigt Zielumfang und feste Zeit-, Verkehrs- und Kostengrenzen.
- Definiert automatische Stoppschwellen und verfolgt eigene Testprozesse.
- Prüft geleerte Warteschlangen und erlaubte Bereinigung unter Belegerhalt.
Das könntest du fragen
Plane einen Staging-Lasttest mit isolierten Daten und Nachweis, dass danach keine Lastworker verbleiben. Löse bei einer kurzen Probe eine Stoppgrenze aus. Dokumentiere beendete Generatoren, abgearbeitete eigene Aufträge und Belege; bereinige nur ausdrücklich zugeordnete Testressourcen.
Ausführliche Dokumentation
Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.
Weniger anzeigen
Safe Execution & Test Cleanup
When to Use
Use before, during, and after executing any load, stress, spike, soak, or benchmark run.
Pre-Flight Safety Gate (Mandatory Before Starting Traffic)
1. Scope Authorization & Environment Boundaries
- Confirm which target environment (
localhost, isolated CI container, dedicated staging, or explicitly authorized target) is under test. - Never run unapproved high-volume load tests against production or shared third-party SaaS endpoints.
- Audit every external side effect triggered by the tested code path before sending load:
- Outbound emails, SMS, push notifications, or webhook deliveries.
- Real payment gateway charges, invoicing API calls, or external government tax reporting.
- Paid LLM / AI provider API calls, embeddings, or metered third-party APIs.
- Route external side effects to local/staging sandboxes or deterministic latency-accurate stubs, and state clearly in the report which dependencies were stubbed vs. live.
2. Hard Resource, Time, and Cost Budgets
Every test run must define explicit caps before launch:
- Maximum Duration (
maxDuration): Hard wall-clock ceiling (e.g., 60s–300s for local/CI load checks) so a hung script never runs indefinitely. - Maximum Request / VU Ceiling (
maxVUs, max RPS): Bounded upper limit on concurrency and arrival rate. - Cost & Token Ceiling (for AI/Cloud runs): Maximum total requests, tokens, or dollar budget allowed before immediate termination.
3. Automated Kill-Switch / Abort Thresholds
Configure automatic abort triggers (abortOnFail: true in k6 thresholds or harness circuit breakers) that halt the test immediately when:
- Error rate (
http_req_failedor5xx/timeout rate) exceeds the safety ceiling (e.g.,> 10%sustained over15sduring a baseline test, or> 35%during a stress test). - Target host health check becomes unreachable or memory/disk approaches critical OS exhaustion.
- Keep a manual stop mechanism (
SIGINT/ PID tracking / cancellation token) ready at all times.
Deterministic Post-Test Cleanup & State Verification
Never leave a test environment degraded or polluted after a run completes or aborts:
- Zero Orphaned Load Processes:
- Verify that all load generator processes (
k6,locust, worker subprocesses, background timers) have exited cleanly (ps/ task check).
- Verify that all load generator processes (
- Queue & Background Worker Drain:
- Confirm that any in-flight jobs enqueued during the test have either drained to
0or been purged from the test queue so background workers do not keep spinning after the test ends.
- Confirm that any in-flight jobs enqueued during the test have either drained to
- Test Data & Tenant Isolation Cleanup:
- Tag all synthetic test records (e.g., dedicated test tenant ID, email prefix
loadtest+..., or run correlation headerX-Load-Test-Run-Id) and clean up temporary test artifacts, uploaded files, or rate-limit keys so subsequent tests start from a clean baseline.
- Tag all synthetic test records (e.g., dedicated test tenant ID, email prefix
- Preserve Reproducible Artifacts:
- Save the exact test script version, target git SHA, environment parameters, and summary JSON/metrics output so post-fix re-runs can be compared apples-to-apples.
Enthaltene Dateien 1
SKILL.md
