cynic iconcynic 1.0

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 http://cynic.readthedocs.org

Installation

 [sudo] pip install cynic

Or the bleeding edge version from the git master branch:

 [sudo] pip install git+https://github.com/rspivak/cynic.git#egg=cynic

last updated on:
June 4th, 2012, 13:10 GMT
price:
FREE!
developed by:
Ruslan Spivak
license type:
MIT/X Consortium License 
category:
ROOT \ Programming \ Quality Assurance and Testing

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Add your review!

SUBMIT