1.0 MIT/X Consortium License    
  not rated
Test harness to make your system under test cynical




These days almost any application has several integration points like database, gateway, payment, or some Web service that it consumes over HTTP.

All communication with the remote systems happens over the network and both networks and those systems often go wonky.

If we do not test the behavior of our system when the remote end operates out of spec and goes haywire the only place for testing becomes in production which is, as we all know, for some systems is less than acceptable.

Because the calls to the remote systems use network, the socket connection can have different failure scenarios, for example:

- The remote end resets the connection by sending a TCP RST packet
- The connection may be established, but the response is never sent back and the connection is not closed (If you don't use socket timeouts in your app you may be in trouble at some point).
- The remote end can send garbage data as the response
- The service can send HTML over HTTP instead of the expected JSON response
- The HTTP service can send one byte of the response data every 30 seconds
- The remote HTTP service sends only headers and no body
- The service can send megabytes of data instead of expected kilobytes
- Etc.

It would be good to be able to test the behavior of our application when some of those conditions happen.

Cynic tries to help with that testing. Basically it's a test harness (test double) that can be used to simulate crafty and devious remote systems right from your command-line.

Cynic will try hard to cause injury to your system.

It's goal is to make your system under test cynical.

Read the formatted docs at


 [sudo] pip install cynic

Or the bleeding edge version from the git master branch:

 [sudo] pip install git+
Last updated on June 4th, 2012

0 User reviews so far.