couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <>
Subject command line test runner
Date Thu, 02 Oct 2008 06:59:09 GMT

I've got the tests from couch_tests.js running from the command line.

Here is the git-branch I'm developing in for now:

And here's a diff if you'd rather just apply it to trunk:

To run the tests, checkout the git branch (or download the tarball)
boostrap, configure, and make. Then run:

src/couchdb/couchjs share/server/test.js

from inside the trunk directory.

If all goes well, you'll see something like this:

I could use some help - I've documented the failures with printing to
stdout. Naturally CouchDB should be passing all the tests right now,
but there are some loose ends with the curl integration that are
causing tests to fail in the couchjs context.

TODO to get this solid for inclusion in the build system:

Fix curl issues (C hackers, I know you're out there):
Loading attachments causes couchjs to exit.
Curl support is missing the HEAD, COPY, and MOVE verbs.
No curl support for setting accept headers.

DRY up the code:
Expose the load() method to couchjs, so we can load the other source
files, instead of pasting it all in one file.
Organize the code so that we can maintain just a single version of
couch_tests.js and have it run both in the browser and from the
console. Once load() is available we can probably do this by loading
couch_tests.js and couch.js, and monkey patching a couple of things.

Cleanup / format the output.

Integrate with the build system.

Oh and there's a funky utf8 issue. Hopefully its easy to ask
Spidermonkey to treat its source files as utf8.


Chris Anderson

View raw message