Start and stop chaos
Before you begin
- Role
- Editor or higher.
- You need
- A chaos profile; see Create a chaos profile
A chaos profile affects the project’s responses only while it runs. It always runs for a period you choose and then stops on its own, so a test cannot leave a project misbehaving. One profile runs at a time in each project.
Start a profile
Section titled “Start a profile”-
Open the project’s Chaos tab.
-
Select Start on the profile’s row.
-
In Run for, choose how long it runs, from 15 minutes to 24 hours. The dialog starts at 1 hour.
-
Select Start chaos.
If another profile is running, the dialog says so: starting this one switches the other off.
Stop a profile early
Section titled “Stop a profile early”-
Open the project’s Chaos tab.
-
Select Stop on the profile’s row. A running profile is listed first.
Result
Section titled “Result”After a start, MockHub shows Chaos is live and how long the profile runs before it stops itself. The profile is marked Live, and its row says until when it runs, such as “Misbehaving until Nov 14, 10:42 PM, then stops on its own.” The effects apply from the next request.
After a stop, MockHub shows Chaos stopped, and the project answers normally from the next request. At the end of its period a profile stops the same way by itself. Either way the profile is kept, ready to start again.
Starting and stopping keep every scenario in its state and every response sequence at its place.
Limits
Section titled “Limits”- A profile cannot run without an end. The longest period is 24 hours.
- At the end of the period, requests forwarded to the upstream are answered normally at once; mocks can take a moment longer.
- Chaos can occasionally outlast the time shown by a few minutes.
- Try it in the mock editor never applies chaos, so test a running profile against the project’s address.
- The request log tags each request a running profile shaped: Injected error, Connection cut or Delayed. Insights leave them out and say how many there were, and no alert rule counts them, so a chaos test alerts nobody. While a profile with connection faults runs, a real failure on a path the profile covers is tagged Connection cut too.
- Starting and stopping need the project’s mock server. When it cannot be reached, MockHub says “The mock server for this project could not be reached.” and nothing changes: the profile keeps the state it had, so start or stop it again once the mock server answers.
- A running profile cannot be deleted. Stop it first.