How to create tests

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

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.

Ideas for future

last edited 2008-11-02 00:59:00 by MartinCzura