From isis-dev-return-1958-apmail-incubator-isis-dev-archive=incubator.apache.org@incubator.apache.org Sun Jul 3 16:33:13 2011 Return-Path: X-Original-To: apmail-incubator-isis-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-isis-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 39C8E421C for ; Sun, 3 Jul 2011 16:33:13 +0000 (UTC) Received: (qmail 71128 invoked by uid 500); 3 Jul 2011 16:33:13 -0000 Delivered-To: apmail-incubator-isis-dev-archive@incubator.apache.org Received: (qmail 71079 invoked by uid 500); 3 Jul 2011 16:33:12 -0000 Mailing-List: contact isis-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: isis-dev@incubator.apache.org Delivered-To: mailing list isis-dev@incubator.apache.org Received: (qmail 71071 invoked by uid 99); 3 Jul 2011 16:33:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jul 2011 16:33:12 +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 (athena.apache.org: domain of dkhaywood@gmail.com designates 74.125.82.41 as permitted sender) Received: from [74.125.82.41] (HELO mail-ww0-f41.google.com) (74.125.82.41) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jul 2011 16:33:04 +0000 Received: by wwi14 with SMTP id 14so986649wwi.0 for ; Sun, 03 Jul 2011 09:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:organization:user-agent:mime-version :to:subject:references:in-reply-to:content-type; bh=h6ouWF2hNLbFdbr4oeZbrb2L3mXcJlnHc3B5KGx/M5c=; b=W1NrbEsIK5bBFUbSG7vApi+nn6NZBoIIH4lqnxqJMfM6gvidO0X543ecQ3gbq/rG0X wHzbL8MosiE2bwcQTyBWv7UCuAtx4uyZLdzLiMneTccpjzZgDO+YD45L3Wn1tXfTKvPk YKMx9peZMsA62Sq6bRL5t4z4DfyJeLkOghkAQ= Received: by 10.227.198.17 with SMTP id em17mr4775752wbb.4.1309710763380; Sun, 03 Jul 2011 09:32:43 -0700 (PDT) Received: from [192.168.178.66] (host217-42-47-64.range217-42.btcentralplus.com [217.42.47.64]) by mx.google.com with ESMTPS id n18sm3802064wbh.57.2011.07.03.09.32.41 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 03 Jul 2011 09:32:42 -0700 (PDT) Message-ID: <4E1099A8.2080407@gmail.com> Date: Sun, 03 Jul 2011 17:32:40 +0100 From: Dan Haywood Reply-To: dan@haywood-associates.co.uk Organization: Haywood Associates Ltd. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: isis-dev@incubator.apache.org Subject: Re: junit viewer success story References: <4E0CCF13.3024.C013B@kevin.kmz.co.za> In-Reply-To: <4E0CCF13.3024.C013B@kevin.kmz.co.za> Content-Type: multipart/mixed; boundary="------------030903030801020800010403" --------------030903030801020800010403 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Kevin, Thanks for giving this viewer a workout, nice to hear it's been useful. If you get a chance I'd be interested in knowing what you make of the BDD viewer (concordion) also. Cheers Dan On 30/06/2011 20:31, Kevin Meyer - KMZ wrote: > Hi All, (Dan!) > > I just wanted to write a short note to say that I have been using the Isis > junit viewer to write application tests for an application that I have been > contracted to write.. and I think it works quite well! > > Once I realised I had to (and remembered to) wrap the appropriate > domain classes (and services), the junit viewer has helped me confirm > such application domain issues as user rights (only certain users can > see certain properties, access certain methods, etc), and general > application usage (if I can't write a straight-forward "test" to achieve the > required functionality - it's too complicated). > > Combined with ecl-emma, I have reasonable confidence that both the > application and the domain classes are reasonably exercised! > > At some point, though, it seems that I need to look into ensuring that > life-cycle methods are also included - it seems that "validate" is not > being called before persistance - but this is not a blocker if you're > aware of it. > > Anyway - it works, and I'm finding it very useful. > > A simple test looks like: > > public void memberCanNotChangeOwnInitials() throws Exception { > doLogin("voter@saip"); > > try { > wrappedLoggedInMember.setInitials("X"); > fail("Should have been disabled"); > } catch (DisabledException e) { > // this is good! > } > } > > Perhaps someone else'll comment on style, but I think these tests are > quite clear. > > Regards, > Kevin > > PS: I have also written an authenticator to use a SQL database. I will > update the authentication, etc, documentation with HOWTOs shortly. > > > --------------030903030801020800010403--