The official documentation has moved to http://docs.couchdb.org — The transition is not 100% complete, but http://docs.couchdb.org should be seen as having the latest info. In some cases, the wiki still has some more or older info on certain topics inside CouchDB.

You need to be added to the ContributorsGroup to edit the wiki. But don't worry! Just email any Mailing List or grab us on IRC and let us know your user name.

Summary

This page focuses on how to create a test case for couchdb and run it. Creating failing test cases to identify a problem is a great way to contribute to couchdb.

Context

To run the existing tests

When a test is failing

To create a new test

Steps to run your test

Example

I added these lines to the 'lots_of_docs' method, to make the test fail:

     // Check _all_docs with descending=true again (now that there are many docs)
     var desc = db.allDocs({descending:true});
     T(desc.total_rows == desc.rows.length);

Then I attached the diff to an existing Jira bug that described the issue.

How_to_create_tests (last edited 2011-11-23 15:13:11 by JanLehnardt)