Return-Path: X-Original-To: apmail-trafficserver-dev-archive@www.apache.org Delivered-To: apmail-trafficserver-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 047721066E for ; Tue, 31 Dec 2013 22:45:09 +0000 (UTC) Received: (qmail 27313 invoked by uid 500); 31 Dec 2013 22:45:08 -0000 Delivered-To: apmail-trafficserver-dev-archive@trafficserver.apache.org Received: (qmail 27211 invoked by uid 500); 31 Dec 2013 22:45:08 -0000 Mailing-List: contact dev-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@trafficserver.apache.org Delivered-To: mailing list dev@trafficserver.apache.org Received: (qmail 27201 invoked by uid 99); 31 Dec 2013 22:45:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Dec 2013 22:45:08 +0000 X-ASF-Spam-Status: No, hits=0.3 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of list@toolazydogs.com does not designate 209.85.160.46 as permitted sender) Received: from [209.85.160.46] (HELO mail-pb0-f46.google.com) (209.85.160.46) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Dec 2013 22:45:02 +0000 Received: by mail-pb0-f46.google.com with SMTP id md12so12902642pbc.5 for ; Tue, 31 Dec 2013 14:44:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to; bh=YkcbzSfEmdE6pOhnw7GrmT8eCc3Ai12mhgH4vP5iDD4=; b=i8CDpAuSK4D0pMuB4EdQffIPedbg69bD/n4MPq9yt3goyMsYM+PXTUT4T5ysWNwFYN tN581OvIMmDQKIbR+PVx+6PrUTA5ob8e69m/pdsbaJBgtkX3P1isD1T904NTxhvUAFTM Hrr3U8ddsDMl7vycvwraDkRxF2GxkRPlOGZFDqqAqJdApdbcfgbFSWyDlivNxyYFL1Qb HqyESZK/xpZToCLNyhCq7k9RNvkcRNY5IA9gNV46wPi6WiVDcQPzsrClxasMQTp4Gap0 2XRTnI842nkXgocqY3toHAe7o11MKO8lxgwA0ooZtV7METhrOXq9/0mYxlaM5fufTlRf fdIw== X-Gm-Message-State: ALoCoQm2iQ/gE3EY8l5FZtHHcpEYz9u6HdAGqef1keENEsM4XSZRQbEfivlyS+VorRGKE4r0Vsio X-Received: by 10.68.136.34 with SMTP id px2mr77967224pbb.113.1388529880363; Tue, 31 Dec 2013 14:44:40 -0800 (PST) Received: from [10.0.1.21] (c-76-103-244-129.hsd1.ca.comcast.net. [76.103.244.129]) by mx.google.com with ESMTPSA id m2sm90905140pbn.19.2013.12.31.14.44.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 31 Dec 2013 14:44:39 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: TDD/Unit testing ATS plugins From: "Alan D. Cabrera" In-Reply-To: <6D2D1D8D-8E6F-4DF9-AF28-2AB6DB58EA19@apache.org> Date: Tue, 31 Dec 2013 14:44:37 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <17F6A4B1-B2D6-433D-A65A-A5029E4FFDF9@toolazydogs.com> <6D2D1D8D-8E6F-4DF9-AF28-2AB6DB58EA19@apache.org> To: dev@trafficserver.apache.org X-Mailer: Apple Mail (2.1510) X-Virus-Checked: Checked by ClamAV on apache.org On Dec 31, 2013, at 1:53 PM, James Peach wrote: > On Dec 31, 2013, at 8:44 AM, Alan D. Cabrera = wrote: >=20 >> I'm looking for an example of an ATS plugin that has extensive unit = tests. >=20 > There are none. >=20 >> I'm having problems linking my Boost unit tests against the plugin = library for obvious reasons, it's a module not a shared library. >>=20 >> I tried setting up an internal static library that the tests would = link against but can't seem to get the object files directly included = into the ATS plugin. >=20 > There's no reason, in principle, that this would not work. For many = plugins it would be reasonable to separate core functions from the = Traffic Server bindings, and use a TDD approach for developing the core. Yes, but Autotools is getting in the way. I can't seem to get those = core functions, which are in the static library that's shared by the = plugin and tests, into the ATS plugin module. This is the Autotools = "example" that I'm looking for. The dearth of specific replies tells me that everyone likely does = integration testing only. That, or everyone is getting ready for the = new year's eve festivities. ;) > For the remainder of the tests, I'd recommend an integration testing = approach. There is a very simple integration test harness in the ci/tsqa = directory on master. You can use that to set up an independent ATS = installation and drive integration tests through it. I'll take a look at that. > Finally, the core has the concept of "action tags", which are useful = for testing, but not exposed through the API. Action tags would let you = test corner cases, by setting tags to force particular APIs to fail, for = example. Interesting. Where can I see examples of this form of testing? Regards, Alan