Skip to content

Commit

Permalink
fsd
Browse files Browse the repository at this point in the history
  • Loading branch information
goldbergyoni committed Feb 12, 2019
1 parent 7ac6757 commit 130df8d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Binary file added docs/basic-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<br/>

## Don't go to production without 10 minutes of chaos testing
## Don't go to production without 10 minutes of application-level chaos testing

> "A software QA engineer walks into a bar
>
Expand All @@ -20,10 +20,10 @@
>
>Credit @brenankeller
Functional bugs are just a subset of the bad things that happen in production. In reality, unplanned chaos will affect your application reliability. How? your process will crash, many exceptions will not get caught, some unknowns will slow your API, other unknowns will increase your error rate. To name a few.
Functional bugs are just a subset of the bad things that happen in production. In reality, unplanned chaos will affect your application reliability. How? your process will crash, the event loop might get blocked, many exceptions will not get caught, some unknowns will slow your API, other unknowns will increase your error rate. To name a few. **Unlike most chaos tools, our project is focused on application-level chaos and specifically bad things that happen in Node.js applications**.

Deploy like a pro by spending as little as 10 minutes on Chaos Testing:

**1.** Simulate some bad things (e.g. event loop is blocked)

**2.** Approach your APIs to ensure they function correctly
Expand All @@ -32,6 +32,8 @@ Deploy like a pro by spending as little as 10 minutes on Chaos Testing:

**We can seamlessly perform the two first tasks for you using our nit UI or command line**

<img src="./docs/basic-flow.png">


## 3 min start
### Great for quick experiments, some pranks (damage) won't be available
Expand All @@ -46,7 +48,7 @@ C. **Trigger chaos using API or UI**:

This will trigger a random chaos, multiple pranks will get executed (e.g. memory overload, uncaught exceptions). Follow the log or the UI to see whatg happened and whether your app stayed resillience

# 5 min start (full functionality)
## 5 min start (full functionality)
A. **Install:** `npm install node-chaos-monkey`

B. **Add a reference in your code:**
Expand All @@ -55,7 +57,7 @@ Require this package at the very beginning of your app, before registering other

```javascript
const ChaosMonkey = require('chaos-monkey');
//pass in a referrence to express app so the monkey can generate damage also within Express routes. This param is optional //but without it some pranks won't be available
//pass in a reference to express app so the monkey can generate damage also within Express routes. This param is optional //but without it some pranks won't be available
ChaosMonkey.initialize(your-express-app);
```

Expand Down
3 changes: 3 additions & 0 deletions tests/manual-testing-with-simple-web-app/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
//I wish I could drop this line
const ChaosMonkey = require("../..");

const express = require("express");
const app = express();

const port = process.env.PORT || 8080;
app.listen(port);

//I wish I could use also a command line -> chaos-monkey -f app.js --test-command='npm test' -r report.html
ChaosMonkey.initialize(app);

var router = express.Router();
Expand Down

0 comments on commit 130df8d

Please sign in to comment.