Unit testing design documents

41 views
Skip to first unread message

Daniel Nephin

unread,
Oct 15, 2013, 12:31:56 PM10/15/13
to couch...@googlegroups.com
Hello,

I am looking to use couchdbkit for a new project. I'm primarily looking to use the storing design documents and views on the filesystem feature.  I would like to write unit tests for these functions (using something like Jasmine), so that the functions are tested before pushing them up to couchdb.  I looked around the documentation, github issues, and this message board, but couldn't find anything about that kind of workflow (the existing test cases seem to be for integration/end-to-end testing with specific frameworks).

Has this type of testing been discussed before?

If I wanted to add this functionality, do you see any major issues with implementing it, or getting it accepted as a pull request?

Thank you!

Benoit Chesneau

unread,
Oct 15, 2013, 1:27:08 PM10/15/13
to couch...@googlegroups.com
On Tue, Oct 15, 2013 at 6:31 PM, Daniel Nephin <dne...@gmail.com> wrote:
Hello,

I am looking to use couchdbkit for a new project. I'm primarily looking to use the storing design documents and views on the filesystem feature.  I would like to write unit tests for these functions (using something like Jasmine), so that the functions are tested before pushing them up to couchdb.  I looked around the documentation, github issues, and this message board, but couldn't find anything about that kind of workflow (the existing test cases seem to be for integration/end-to-end testing with specific frameworks).

Has this type of testing been discussed before?

There has been some discussion on irc about it bit nothing happened. 

 

If I wanted to add this functionality, do you see any major issues with implementing it, or getting it accepted as a pull request?


I wanted to add such features since a long time. having a way to automatize such tests in couchdbkit would be awesome. So definitely yes! if you want to discuss the design or simply have some questions don't hesitate to join me there or on irc :)


 - benoit

Alexander Shorin

unread,
Oct 15, 2013, 1:38:12 PM10/15/13
to couch...@googlegroups.com
I'd used a bit different technique: I kept test within design document
and provide special show function test which calls all this tests and
prints out the result. Suddenly, my work based on Python query server
and not sure that would fit you, but I hope you got the idea. The
whole workflow was very simple:
1. attach watchdog to your couchapp dir
2. on change call couchapp push
3. after successful push call show function
4.1 if response is 200 OK - replicate ddoc to production server
4.2 if not send xmpp message to me
--
,,,^..^,,,
> --
> You received this message because you are subscribed to the Google Groups
> "couchdbkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to couchdbkit+...@googlegroups.com.
> To post to this group, send email to couch...@googlegroups.com.
> Visit this group at http://groups.google.com/group/couchdbkit.
> For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages