Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 394417591 for ; Tue, 9 Aug 2011 15:20:19 +0000 (UTC) Received: (qmail 26979 invoked by uid 500); 9 Aug 2011 15:20:18 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 26940 invoked by uid 500); 9 Aug 2011 15:20:18 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 26932 invoked by uid 99); 9 Aug 2011 15:20:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2011 15:20:17 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.220.180 as permitted sender) Received: from [209.85.220.180] (HELO mail-vx0-f180.google.com) (209.85.220.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2011 15:20:11 +0000 Received: by vxh15 with SMTP id 15so117479vxh.11 for ; Tue, 09 Aug 2011 08:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=LVsbHhgjsmd1RNB3B/VFFhAW8+R32ZdKuztBkf5Yl/I=; b=K/W4YlTs4JQsFksm4MpDev+ElVH6+w4Ds+JsAgrzvpSWbUsAyRlWXkLU1xX35XjSz/ rnm1ThmEYM8j70sUJpB9Y3BoztKFSBmPd8ZGnTrQLbQEviUtd1KimyCtk2DRzW1Xxy/H RGMcvrJSyugL2jvz4vYCtwmSG4ON/PKYxZ1uY= Received: by 10.52.65.194 with SMTP id z2mr7355300vds.76.1312903191198; Tue, 09 Aug 2011 08:19:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.167.135 with HTTP; Tue, 9 Aug 2011 08:19:11 -0700 (PDT) In-Reply-To: References: From: Paul Davis Date: Tue, 9 Aug 2011 10:19:11 -0500 Message-ID: Subject: Re: Futon Test Suite To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Aug 9, 2011 at 9:38 AM, Adam Kocoloski wrote: > On Aug 9, 2011, at 4:48 AM, Paul Davis wrote: > >> On Tue, Aug 9, 2011 at 2:40 AM, Robert Dionne >> wrote: >>>> >>>> >>>> Also, I've been thinking more and more about beefing up the JavaScript >>>> test suite runner and moving more of our browser tests over to >>>> dedicated code in those tests. If anyone's interested in hacking on >>>> some C and JavaScript against an HTTP API, let me know. >>> >>> >>> Paul, >>> >>> =A0Jan and I talked about this a few times and I started a branch[1] al= ong that idea. So far all I did was make a copy of the then current Futon t= ests into >>> test/javascript/test =A0and started looking at the small handful that f= ail. >>> >>> =A0 The browser tests are great (any test is good) but they have too ma= ny browser =A0dependent quirks, or at least I assume that because of the pl= easant surprise >>> one gets when they all run. So I think the goal of these runner tests w= ould be some sort of official HTTP API suite that's part of "make check". W= ould you agree? >>> If so I'm happy to take this on. >>> >>> =A0 Also I've found eunit to be helpful in BigCouch and wondering how h= ard it would be to support eunit in couchdb. Having tests in the modules is= very good for not >>> only testing but also to help with reading and understanding what the c= ode does. >>> >>> Bob >>> >>> >>> [1] https://github.com/bdionne/couchdb/tree/cli-tests >>> >>> >> >> Bob, >> >> Exactly what I was thinking. By having our test suite have as little >> code between the socket and the the test as possible we can ensure >> that the tests are testing CouchDB and not some random change in the >> behavior of our favorite web browser. I would definitely expect these >> tests to be part of make check and hence part of the release >> procedure. >> >> My current half formed thoughts are to basically split our test suite >> into two halves. Tests that are in Erlang and are testing internals, >> and tests that go through the HTTP interface. I love me some Erlang, >> but I've not been think of an elegant way to make it easy to run lots >> of HTTP tests. >> >> As to eunit, I'm not sure. I'm really not a huge fan of it, especially >> mixing implementation and test code. I know rebar can separate them, >> so its at least possible to get around that. I'd like to have a >> unified environment for Erlang tests though. And TAP at seems like >> it'd be easier to interface with non-Erlang tooling if we ever get >> around to build matrices and what not. But I'm not opposed to it on >> religious grounds if that's what people want to contribute. > > OTP ships with eunit_surefire[1] so interfacing with general test infrast= ructures isn't really an issue. =A0I had to dig a little deeper to find a d= ecent TAP consumer for Jenkins and ended up executing the tests from a Perl= script using TAP::Harness::JUnit. =A0I'll grant that the TAP output is eas= ier for a human to digest than the eunit output. > > I imagine testing the private module functions is a topic for a good flam= ewar. =A0I find it useful, but maybe that's a sign I've got too much logic = in a particular module. =A0Either way, =A0a viable alternative to writing u= nit tests that execute in the browser is something this project really need= s. =A0Cheers, > > Adam > > [1]: http://www.erlang.org/doc/man/eunit_surefire.html Way to totally destroy on of my last hopes of not using eunit. Thanks for t= hat. Also, yes. I've finally become irritated enough with clearing the browser cache between every test that I feel its time to do something productive about it.