On Fri, Nov 5, 2010 at 8:47 PM, Chad George <[email protected]> wrote: > Is there any interest (or current work) out there for a test server > environment for couchapps. > > Basically my idea is to prevent having to do a "couchapp push" for every > little change to an attachment on the design document. > Originally I thought about having couchapp auto-push ... but that'll make a > lot of unnecessary pushes (and might leave an actively running server in a > broken state) > > So I've started to write a little python script that runs a local web server > directly on top of the couchapp source directory structure. > The idea is to statically serve all the attachments of the design document > directly from the file system. For everything else (documents, views, shows, > lists, etc) I silently proxy to the running couchdb server. The combined > effect is that the client sees the exact same URL structure on the test > server as the real couchdb server. > > Right now the implementation is very simple, but it has a thread-pooled > request handler and uses 'keep-alive' connections for proxying to couchdb so > the overall load time for a complex page isn't noticeably more than > accessing the same page with couchdb directly. > > And it really makes developing client side couchapps a lot more relaxing :) > > I'm curious if people think this is something worth adding to couchapp > itself?
I think that is a very good idea and I would like to try it myself. Please share that code if you can, because I believe the feedback from more people would be a pre-requisite for integrating something like that into couchapp. In addition, I would like to help with adding support for automated testing. I am addicted to unit tests and it is a good addiction. I haven't yet figured out a simple way to use CouchDB's own testing infrastructure in my projects, so I am using a QUnit test page in _attachments to test functions that I use in my views. You can see my simple setup here: http://reddes.bvsalud.org/projects/isisnbp/browser/sandbox/luciano.ramalho/couchdb/xlilacs/xlil/_attachments/qunit.html BTW, all the code in that repo is LGPL, so feel free to explore and re-use. We are just starting with CouchDB. Cheers, -- Luciano Ramalho programador repentista || stand-up programmer Twitter: @luciano
