Update:

I’m done porting all the JS tests now and they all pass.

Writing new compatible JS query servers should be easier now.

There is some code cleanup that I want to do at some point, but this is good to 
be used.

Best
Jan
-- 

On 17 Feb 2014, at 11:43 , Jan Lehnardt <[email protected]> wrote:

> 
> On 17 Feb 2014, at 11:26 , Alexander Shorin <[email protected]> wrote:
> 
>> Hi Jan.
>> 
>> This is good idea, but I think the implementation should be different.
>> 
>> What's the main problem of Ruby's tests? It isn't reusable. You cannot
>> use it for testing brand new query server done in language X. You'll
>> have to rewrite it completely. That's boring and counter productive.
>> 
>> Instead of this, we could just provide JSON test files: input and
>> output. The work flow for every query server will be trivial: clone
>> repo with test files, read the input.json send it to query server
>> expect the output.json. That's is. And we're all will be sure that
>> every query server in the world shares same behaviour for every cases
>> and especially for edge ones.
> 
> I did this mainly to encourage more people to fix up the Node query
> server. I’m happy to think about how to turn this into a more general
> query server testing framework once we’ve got that, until then, you
> are still welcome to do so, but I’ll focus on something that I know
> I could finish (some help would still be nice though :).
> 
> Best
> Jan
> -- 
> 
> 
> 
>> 
>> 
>> --
>> ,,,^..^,,,
>> 
>> 
>> On Mon, Feb 17, 2014 at 2:14 PM, Jan Lehnardt <[email protected]> wrote:
>>> Hi all,
>>> 
>>> I spent my Sunday hack time on extracting our rather hidden and 
>>> little-exercised query server tests 
>>> (https://github.com/apache/couchdb/blob/master/test/view_server/query_server_spec.rb)
>>>  into a standalone project as well as porting it to node, to finally get 
>>> rid of our Ruby dependency there.
>>> 
>>> I’ve only got the basic framework and two tests ported yet, but it should 
>>> be all set up to be filled in with the rest of the tests. Any help on the 
>>> legwork there would be appreciated :)
>>> 
>>> The basic idea is that we a) shed the tests for the erlang query server, as 
>>> we should move them into the etap tests and b) make this a custom project, 
>>> so other query-server implementations have an easier time testing. I hope 
>>> we can maintain this at the ASF git as the `couchdb-test-couchjs` repo 
>>> (bikesheds welcome).
>>> 
>>> The project is here: https://github.com/janl/couchdb-test-couchjs
>>> 
>>> Tests are written like this: 
>>> https://github.com/janl/couchdb-test-couchjs/blob/master/lib/tests/map.js
>>> 
>>> If you like to help and get stuck, let me know, I’m happy to help and I’d 
>>> love some help on this :)
>>> 
>>> Hope you like this!
>>> 
>>> Best
>>> Jan
>>> --

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to