Hi,

I recently finished up https://github.com/mercmobily/JsonRestStores. I feel 
a little uneasy as I haven't yet written any unit testing.

The module is tricky at best to test: it allows you to create Json REST 
stores, AND interact with the store using the API directly.

So, the unit test should:

   - 
   
   Start a web server that implements a number of stores. Ideally, I should 
   have one store for each tested feature I suppose
   - 
   
   Test the results while manipulating that store, both using HTTP calls *
   and* direct API calls
   
The problem is that each store can have override a lot of functions. To 
make things more complicated, the store has a range of database drivers it 
can use (well, potentially -- at the moment I only have the MongoDB 
driver). So, wanting to test the module with MongoDB, I would have to first 
create a collection, and then test things using each DB layer...

I mean, it would be a pretty epic task. Can anybody shed some light on how 
to make something like this simpler? It seems to have all of the 
ingredients to make the Unit Testing from hell (API calls, direct calls, 
database, different configurable DB drivers, highly configurable class 
which encourages method overriding...)

Help?

Merc.

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to