Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 53343 invoked from network); 25 Jan 2006 11:48:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Jan 2006 11:48:43 -0000 Received: (qmail 94481 invoked by uid 500); 25 Jan 2006 11:48:29 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 94411 invoked by uid 500); 25 Jan 2006 11:48:28 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 94400 invoked by uid 99); 25 Jan 2006 11:48:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2006 03:48:28 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mloenko@gmail.com designates 66.249.92.204 as permitted sender) Received: from [66.249.92.204] (HELO uproxy.gmail.com) (66.249.92.204) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2006 03:48:27 -0800 Received: by uproxy.gmail.com with SMTP id m3so129251ugc for ; Wed, 25 Jan 2006 03:48:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dxXHAyi42o4M1Zu1F+wQbvtvfHiIf1qJjaBdUpRzlUQxKdRuB49sCnZEFiV4PuUxSdc7wZ5fSWWlFmpEmzO942HNghY8wHQ7gS6N8Pn3ZI5NzA5sk3nDhzoWeN+ivoRZkMY6t7yD6vcbAAGUfdKbKK4fhIlK/QAG5PovlObOHiU= Received: by 10.67.31.14 with SMTP id i14mr270786ugj; Wed, 25 Jan 2006 03:48:03 -0800 (PST) Received: by 10.66.244.18 with HTTP; Wed, 25 Jan 2006 03:48:03 -0800 (PST) Message-ID: <906dd82e0601250348p7bb5a17bgd30c59b1aced745d@mail.gmail.com> Date: Wed, 25 Jan 2006 17:48:03 +0600 From: Mikhail Loenko To: harmony-dev@incubator.apache.org Subject: Re: [classlib] Unit and performance testing In-Reply-To: <46d21a9a0601250204x4bc129f8u69940700d3522ae2@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <906dd82e0601232340n5de6f561v8bb6db7ac4756f1c@mail.gmail.com> <43D60A4A.7030107@gmail.com> <906dd82e0601240421v507ecc43x75b4d42cd728def7@mail.gmail.com> <43D74548.3020301@gmail.com> <46d21a9a0601250204x4bc129f8u69940700d3522ae2@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N One more reason when logs are necessary: If testing is possible in some configurations only (like set of providers contains something or default encoding is ...), then 1) build failing in all different configs would be annoying 2) One has to be able to scan logs for warnings to verify that functionality is tested when the config is as expected A different exit status for the tests that can test in the given configuration would help. Thanks, Mikhail On 1/25/06, Anton Avtamonov wrote: > On 1/25/06, Thorbj=F8rn Ravn Andersen wrote: > > Mikhail Loenko wrote: > > > > > fail() is not always convinient, for example, how would you print > > > > > >stack trace to fail()? Meanwhile stacktrace is most often enough > > > > > > > > If you need a stacktrace, why not just throw a RuntimeException at that > > point? JUnit will then include the stack trace in the report. > > > > -- > > Thorbj=F8rn > > > > Absolutely agree > As I know 'standard' test case signature is: > > public void testSomeTestName() throws Exception { > } > > So that all checked and runtime exceptions are passed directly to > JUnit framework (which properly logs them). > > I do beleive logging is very useful feature. However I think that the > preferrable place to do logging is code rather than tests. JUnit > provides lots of fucntionality to write well-documented tests and we > don't have to add extra-code for logging (which obviously made test > cases longer and harder for understanding). > > I beleive the right place to use logging are try/catch sections where > catch does nothing (the most ususal case), so that we just silently > ignore some error situations. Having logs there will allow us to > understand the system execution paths and what was going wrong and > where. For such purpose different logging levels work really fine. > > -- > Anton Avtamonov, > Intel Managed Runtime Division >