Re: [tap] "Nested TAP" in the draft

Ovid <publiustemp-tapx@yahoo.com> Tue, 02 March 2010 17:20 UTC

Return-Path: <publiustemp-tapx@yahoo.com>
X-Original-To: tap@core3.amsl.com
Delivered-To: tap@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id E9B8828C188 for <tap@core3.amsl.com>; Tue, 2 Mar 2010 09:20:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6DKiiISq6tfX for <tap@core3.amsl.com>; Tue, 2 Mar 2010 09:20:58 -0800 (PST)
Received: from n4b.bullet.mail.ac4.yahoo.com (n4b.bullet.mail.ac4.yahoo.com [76.13.13.74]) by core3.amsl.com (Postfix) with SMTP id 8DBC83A8B16 for <tap@ietf.org>; Tue, 2 Mar 2010 09:20:58 -0800 (PST)
Received: from [76.13.13.26] by n4.bullet.mail.ac4.yahoo.com with NNFMP; 02 Mar 2010 17:20:56 -0000
Received: from [76.13.10.175] by t3.bullet.mail.ac4.yahoo.com with NNFMP; 02 Mar 2010 17:20:56 -0000
Received: from [127.0.0.1] by omp116.mail.ac4.yahoo.com with NNFMP; 02 Mar 2010 17:20:56 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 434925.59516.bm@omp116.mail.ac4.yahoo.com
Received: (qmail 90956 invoked by uid 60001); 2 Mar 2010 17:20:56 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1267550456; bh=SJpP3eAeBYcub+e1UJhzVNAHAnva3QXYwsAr351zuhY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=0UT9+x2yIIdVsFnMbZGnuwD+4ZTe+0hyN3AlZLNpLgklaJXLuVXrr1xyizxbpZpBxlAuUfDpsDyEew2L//UzBVHzxNmh8RhTVm6GorSLPNPkzAYYlUIsaEozDbiPlS2WGxpHRjG+y9SXyyU30m2VBK++wxFVrX5r0qPpnKonXQ8=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=qiwyio0HQVL5wFJvORyJvj+7R7BE5A8gwuYMkWYXdXAHmxilQSi58dSiFH0nTBZssAiDd/iaD8u59sL7OwRd2dn4RcopAV+YSKb7GkQGaDVMHUt9LsrBaWoKSMyXwvWxV0UGSAiJGFgR9gJ2DABDvVL6cfkaTch37R3+iI9xwAk=;
Message-ID: <91803.89490.qm@web65716.mail.ac4.yahoo.com>
X-YMail-OSG: LjUvkq0VM1mGr9_I13vE2dNK.eKHzdeMRoO9eNG9uyARJ0Dp9fDsYWeRCHUduxCaBKg1hmzH1SuiVwIUV305.ikJ0iS6YHTNjOwtIVztH4Gx4QuotKrrT40.2lYbhrBMYeH0R9FjFc5qtH_jwV0Ro5kKBUP4xO0G1vIym9_.ajwQ7oD2p1u9bciP7te8CnHRd3EIsB4Zy_bFkUe0xrWx6NmS5lWRiAgYrUXKinpi8hkSZMDAfRzdAy4WdujKg45SXvT8zElhNZrp73hkNUNY.fWRTPX9eeYNLVYKRsSCpNfHxH0P7CfkjfhVGAZkJPbw7mKCuD1zdIgvnQJ.9xFpVg1dqzAXNg--
Received: from [10.161.48.239] by web65716.mail.ac4.yahoo.com via HTTP; Tue, 02 Mar 2010 09:20:56 PST
X-Mailer: YahooMailClassic/9.2.12 YahooMailWebService/0.8.100.260964
Date: Tue, 02 Mar 2010 09:20:56 -0800
From: Ovid <publiustemp-tapx@yahoo.com>
To: Salve J Nilsen <sjn@pvv.org>
In-Reply-To: <alpine.DEB.1.00.1003021808590.2167@decibel.pvv.ntnu.no>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Cc: TAP <tap@ietf.org>
Subject: Re: [tap] "Nested TAP" in the draft
X-BeenThere: tap@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: publiustemp-tapx@yahoo.com
List-Id: Test Anything Protocol WG discussions <tap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tap>, <mailto:tap-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tap>
List-Post: <mailto:tap@ietf.org>
List-Help: <mailto:tap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tap>, <mailto:tap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Mar 2010 17:21:00 -0000

--- On Tue, 2/3/10, Salve J Nilsen <sjn@pvv.org> wrote:

> From: Salve J Nilsen <sjn@pvv.org>
 
> Could you remind us a little of what the purpose of Nested
> TAP was?

The main purpose is that it allows multiple TAP streams to be combined into a single stream.  It can be nested to arbitrary depths, but all nesting depths must be consistent.  The first "unindented" line under each nest is the pass/fail status of the nest.  A nest is represented as a single pass/fail result for the outer stream.

  1..3
  ok 1
  ok 2
    ok 1
    not ok 2
    not ok 3
    ok 4
    1..4
  not ok 3 - This summarizes above results

So the outer stream has three tests, one of them being the summary line for the preceding nest.

Also, note that the top-level stream has the plan before, but the nest has the plan after.  Some have found this useful when they want a "subtest" where they don't know how many tests are run, but they still want that leading plan.

Conceptually this maps well to xUnit where a test method is a single test with multiple asserts.  With nested TAP, the nest is equivalent to the asserts and the summary test line is equivalent to the test method.

One unanswered question regarding nested TAP: are skip and todo allowed on summary test lines?

Cheers,
Ovid
--
Buy the book         - http://www.oreilly.com/catalog/perlhks/
Tech blog            - http://use.perl.org/~Ovid/journal/
Twitter              - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6