Skip to end of metadata
Go to start of metadata

If you've made some code changes, or just want to make sure your GeoCouch installation works, it's a good idea to verify it via the tests suite.

There are two different test suites. One test suite is written in Erlang, that tests mostly the data structure. The other one, written in Javascript is to test the API. Both can be run from command line.

Make sure you've run a "make dev" in the couchdb directory, before you run the GeoCouch tests.

Erlang tests

To run the Erlang tests, type "make check" in your GeoCouch source directory. Make sure you've set the COUCH_SRC environment variable (or ERL_COMPILER_OPTIONS correctly) (see the GeoCouch README).

For example:

$ COUCH_SRC=<couchdb>/src/couchdb make check

JavaScript tests

To run the JavaScript test, you need the testrunner from the couchdb directory. It's within the source directory under <couchdb>/test/javascript/run. The tests for GeoCouch are in the GeoCouch directory under <geocouch>/share/www/script/test/. You need to run every test separately.

For example:


for testfile in <geocouch>/share/www/script/test/*.js
    <couchdb>/test/javascript/run $testfile
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.