Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

junit · JUnit, the Java unit testing framework written by Kent Beck and Erich Gamma.

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 31224
  • Category: Java
  • Founded: Nov 6, 2000
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 3929 - 3958 of 24384   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#3929 From: "Sylvain Fraisse" <sf@...>
Date: Fri Feb 1, 2002 9:18 am
Subject: RE: Determining which test cases are the slowest
sylv_un
Send Email Send Email
 
Mike,

I am interested by TestMentor and I have downloaded it for evaluation.
In a first hand I would like to execute my JUnit tests within Test mentor.
To be integrated into Test Mentor I think my test cases have to be compiled
using the silverMark junit customization.
But the junit override version is the 3.5. Then all my assertTrue methods
are not recognized (was only assert in the 3.5 version).
Have you planed to provide a 3.7 customization?
Have you planed to provide new customization every time a new release of
junit is delivered.

thanks
sylv1

> -----Original Message-----
> From:
> sentto-2423328-3934-1012478304-sf=gatonero.com@...
> [mailto:sentto-2423328-3934-1012478304-sf=gatonero.com@...
> hoo.com]On Behalf Of Michael Silverstein
> Sent: Thursday, January 31, 2002 12:53 PM
> To: junit@yahoogroups.com
> Subject: RE: [junit] Determining which test cases are the slowest
>
>
> SilverMark's Test Mentor - Java Edition (www.javatesting.com) runs JUnit
> tests. As a side effect, it will tell you how long each JUnit test case
> takes to run, as well as which methods it covers.
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^
> Mike Silverstein
> SilverMark, Inc.
> The object testing company
> http://www.silvermark.com
>

#3930 From: arathi.bhaskar@...
Date: Fri Feb 1, 2002 12:05 pm
Subject: Servlet Testing
arathi.bhaskar@...
Send Email Send Email
 
Hi

I today tried a very simple servlet testing using Junit.

I got the following error in the Junit window.

java.lang.ExceptionInInitializerError: java.util.MissingResourceException:
Can't find bundle for base name cactus, locale en_US
      at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:707)
      at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:679)
      at java.util.ResourceBundle.getBundle(ResourceBundle.java:546)
      at
org.apache.cactus.client.AbstractHttpClient.<clinit>(AbstractHttpClient.java:88)
      at org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:130)
      at
org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:371)

Can anybody tell me what is going wrong?

Thanks & Regards
Arathi

-----------------------Disclaimer------------------------

The views of the author may not necessarily reflect those
of the Company. All liability is excluded to the extent
permitted by law for any claims arising as a result of the
use of this medium to transmit information by or to
IT Solutions (India) Pvt. Ltd.

We have taken precautions to minimize the risk of
transmitting software viruses, but we advise you to
carry out your own virus checks on any attachment to
this message.  We cannot accept liability for any loss or
damage caused by software viruses.

------------------------Disclaimer------------------------

#3931 From: "Vincent Massol" <vmassol@...>
Date: Fri Feb 1, 2002 11:57 am
Subject: RE: Servlet Testing
vmassol
Send Email Send Email
 
Arathi,

This is a Cactus related question - You should ask it on the cactus
mailing list (cactus-user@...), see
http://jakarta.apache.org/cactus/mailinglist.html).

Now, WRT your question, please check the Cactus web site for
documentation and more specifically the FAQ at
http://jakarta.apache.org/cactus/faq.html, which answers your problem.

Thanks
-Vincent

> -----Original Message-----
> From: arathi.bhaskar@... [mailto:arathi.bhaskar@...]
> Sent: 01 February 2002 12:06
> To: junit@yahoogroups.com
> Subject: [junit] Servlet Testing
>
> Hi
>
> I today tried a very simple servlet testing using Junit.
>
> I got the following error in the Junit window.
>
> java.lang.ExceptionInInitializerError:
java.util.MissingResourceException:
> Can't find bundle for base name cactus, locale en_US
>      at
>
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.ja
va
> :707)
>      at
java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:679)
>      at java.util.ResourceBundle.getBundle(ResourceBundle.java:546)
>      at
>
org.apache.cactus.client.AbstractHttpClient.<clinit>(AbstractHttpClient.
ja
> va:88)
>      at
> org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:130)
>      at
> org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:371)
>
> Can anybody tell me what is going wrong?
>
> Thanks & Regards
> Arathi
>
> -----------------------Disclaimer------------------------
>
> The views of the author may not necessarily reflect those
> of the Company. All liability is excluded to the extent
> permitted by law for any claims arising as a result of the
> use of this medium to transmit information by or to
> IT Solutions (India) Pvt. Ltd.
>
> We have taken precautions to minimize the risk of
> transmitting software viruses, but we advise you to
> carry out your own virus checks on any attachment to
> this message.  We cannot accept liability for any loss or
> damage caused by software viruses.
>
> ------------------------Disclaimer------------------------
>
>
> ------------------------ Yahoo! Groups Sponsor
>
> To unsubscribe from this group, send an email to:
> junit-unsubscribe@yahoogroups.com
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>

#3932 From: "twoytaszek" <twoytaszek@...>
Date: Fri Feb 1, 2002 12:40 pm
Subject: finally
twoytaszek
Send Email Send Email
 
Is there any mechanism in junit to force tearDown regardless of test
failure/success - kind of like a finally() ?
Thanks,
Tom

#3933 From: "J. B. Rainsberger" <jbr@...>
Date: Fri Feb 1, 2002 1:35 pm
Subject: Re: finally
nails762
Send Email Send Email
 
> Is there any mechanism in junit to force tearDown
> regardless of test
> failure/success - kind of like a finally() ?

JUnit already does that. Look at the source for class
TestCase if you'd like to see it for yourself.

JBR.

______________________________________________________________________
Web-hosting solutions for home and business! http://website.yahoo.ca

#3934 From: Francois Beausoleil <francois_beausoleil@...>
Date: Fri Feb 1, 2002 3:46 pm
Subject: Re: finally
francois_bea...
Send Email Send Email
 
The only problem I have with the way JUnit is setup right now is that an
Exception (even a failed assertion) will mask any Exception in the test case.

I spent a good hour trying to find a problem until I realized this fact :(

Have a nice day !
Francois Beausoleil

  --- "J. B. Rainsberger" <jbr@...> a écrit : >
> > Is there any mechanism in junit to force tearDown
> > regardless of test
> > failure/success - kind of like a finally() ?
>
> JUnit already does that. Look at the source for class
> TestCase if you'd like to see it for yourself.
>
> JBR.
>
> ______________________________________________________________________
> Web-hosting solutions for home and business! http://website.yahoo.ca
>
>
> To unsubscribe from this group, send an email to:
> junit-unsubscribe@yahoogroups.com
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>

__________________________________________________________
Obtenez votre adresse @yahoo.ca gratuite et en français !
courriel.yahoo.ca

#3935 From: "Di Iorio, Matthew (ISS Atlanta)" <mdiiorio@...>
Date: Fri Feb 1, 2002 4:46 pm
Subject: RE: finally
yahoodoo
Send Email Send Email
 
Ah, yes.  I have run into the same problem.  There is a bug report on
SourceForge about this, hopefully it will be fixed.

Matt

-----Original Message-----
From: Francois Beausoleil [mailto:francois_beausoleil@...]
Sent: Friday, February 01, 2002 10:47 AM
To: junit@yahoogroups.com
Subject: Re: [junit] finally


The only problem I have with the way JUnit is setup right now is that an
Exception (even a failed assertion) will mask any Exception in the test
case.

I spent a good hour trying to find a problem until I realized this fact :(

Have a nice day !
Francois Beausoleil

  --- "J. B. Rainsberger" <jbr@...> a écrit : >
> > Is there any mechanism in junit to force tearDown
> > regardless of test
> > failure/success - kind of like a finally() ?
>
> JUnit already does that. Look at the source for class
> TestCase if you'd like to see it for yourself.
>
> JBR.
>
> ______________________________________________________________________
> Web-hosting solutions for home and business! http://website.yahoo.ca
>
>
> To unsubscribe from this group, send an email to:
> junit-unsubscribe@yahoogroups.com
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>

__________________________________________________________
Obtenez votre adresse @yahoo.ca gratuite et en français !
courriel.yahoo.ca


To unsubscribe from this group, send an email to:
junit-unsubscribe@yahoogroups.com


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

#3936 From: David Corbin <dcorbin@...>
Date: Fri Feb 1, 2002 4:55 pm
Subject: Re: finally
david_corbin
Send Email Send Email
 
Francois Beausoleil wrote:

>The only problem I have with the way JUnit is setup right now is that an
>Exception (even a failed assertion) will mask any Exception in the test case.
>
I don't understand.  Can you explain your complaint in more detail?

>
>I spent a good hour trying to find a problem until I realized this fact :(
>
>Have a nice day !
>Francois Beausoleil
>
> --- "J. B. Rainsberger" <jbr@...> a écrit : >
>
>>>Is there any mechanism in junit to force tearDown
>>>regardless of test
>>>failure/success - kind of like a finally() ?
>>>
>>JUnit already does that. Look at the source for class
>>TestCase if you'd like to see it for yourself.
>>
>>JBR.
>>
>>______________________________________________________________________
>>Web-hosting solutions for home and business! http://website.yahoo.ca
>>
>>
>>To unsubscribe from this group, send an email to:
>>junit-unsubscribe@yahoogroups.com
>>
>>
>>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>>
>>
>>
>
>__________________________________________________________
>Obtenez votre adresse @yahoo.ca gratuite et en français !
>courriel.yahoo.ca
>
>
>To unsubscribe from this group, send an email to:
>junit-unsubscribe@yahoogroups.com
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

#3937 From: Vladimir Bossicard <vladimir@...>
Date: Fri Feb 1, 2002 5:22 pm
Subject: Re: finally
vbossica
Send Email Send Email
 
>>The only problem I have with the way JUnit is setup right now is that an
>>Exception (even a failed assertion) will mask any Exception in the test case.
>>
> I don't understand.  Can you explain your complaint in more detail?


If an exception (1) is thrown during the normal execution of the test,
the framework executes the tearDown method (because the tearDown method
is always executed).  If tearDown() throws another exception (2), JUnit
will only report the exception (2) and the (1) is lost into the great
void.  It doesn't help much because what does interest you is really the
   first exception.

The solution is trivial: store any exception that was thrown during the
execution of the 'runTest' method, then execute tearDown and if an
exception is caught, resend the first one.


-Vladimir

--
Vladimir Bossicard
www.bossicard.com

#3938 From: Berin Loritsch <bloritsch@...>
Date: Fri Feb 1, 2002 5:55 pm
Subject: Re: finally
bloritsch
Send Email Send Email
 
Vladimir Bossicard wrote:

>>>The only problem I have with the way JUnit is setup right now is that an
>>>Exception (even a failed assertion) will mask any Exception in the test case.
>>>
>>>
>>I don't understand.  Can you explain your complaint in more detail?
>>
>
>
> If an exception (1) is thrown during the normal execution of the test,
> the framework executes the tearDown method (because the tearDown method
> is always executed).  If tearDown() throws another exception (2), JUnit
> will only report the exception (2) and the (1) is lost into the great
> void.  It doesn't help much because what does interest you is really the
>   first exception.
>
> The solution is trivial: store any exception that was thrown during the
> execution of the 'runTest' method, then execute tearDown and if an
> exception is caught, resend the first one.


Actually, both can be of interest.  If I can see both the exceptions reported,
I can fix both issues at the same time.  Sometimes the exception thrown in
tearDown is unrelated to the runTest exception.  I would adjust the Exception
type
thrown to have an interface like this:

public class TestException extends Exception
{
      private final String    m_message;
      private final Throwable m_runTest;
      private final Throwable m_tearDown;

      TestException( String message, Throwable runTest )
      {
          this( message, runTest, null );
      }

      TestException( String message, Throwable runTest, Throwable tearDown)
      {
          m_message = (null == message) ? "Exception thrown during test" :
message;
          m_runTest = runTest;
          m_tearDown = tearDown;
      }

      Throwable getRunTestThrowable()
      {
          return m_runTest;
      }

      Throwable getTearDownThrowable()
      {
          return m_tearDown;
      }

      void printStackTrace()
      {
          printStackTrace( System.err );
      }

      void printStackTrace( PrintWriter pw )
      {
          pw.println( m_message );
          pw.println("Contains runTest() exception");
          m_runTest.printStackTrace( pw );

          if ( null != m_tearDown )
          {
              System.err.println("Contains tearDown() exception");
              m_tearDown.printStackTrace( pw );
          }
      }
}





--

"They that give up essential liberty to obtain a little temporary safety
   deserve neither liberty nor safety."
                  - Benjamin Franklin

#3939 From: "Morten Grum, PH-Consult" <mg@...>
Date: Fri Feb 1, 2002 6:05 pm
Subject: RE: Testing several implementation of same interface
morten3grum
Send Email Send Email
 
Many thanks for the tips on "Testing several implementation of same
interface"
RESULTS SUMMARY:

1. create a testXXX for instanciating each concrete class and place actual
assertYYY (working on the interface/abstract class) in a separate method
called by each test. Disadvantage: first failed assert stops the execution
of all other asserts.

2. create an abstract TestCase with the actual testXXXs and create concrete
TestCase for each of the subclasses instanciating in their setUp()s.
Eligant. This is just what I was looking for.

3. find the classes by reflection and do 1 or 2. Could be done but I know my
subclasses so I'll keep clear of reflection as long as eligant patterns do
the trick.

Thanks again.

Morten

-----Original Message-----
From: Morten Grum, PH-Consult [mailto:mg@...]
Sent: 31 January 2002 11:07
To: JunitList
Subject: [junit] Testing several implementation of same interface


I have 5 or so different classes with a common interface or abstract super
class. I have a junit TestCase that tests adhearance to the interface or
abstract super class's interface. Could I get JUnit to run the test for each
implementation/subclass? As it is, I'm manually switching between subclass
by commenting lines in and out in the case's setUp() (which isn't
sustainable).

Thank in advance.
Morten
PS: Have checked FAQ and archives (but didn't realy know what words to
search by).

========================================
Morten Grum
PH-Consult
Ordruphøjvej 4
2920 Charlottenlund
Denmark

Tel.: +45 39 96 22 08
Mob.: +45 40 93 43 84
Fax.: +45 39 63 02 72
Mail: mg@...
Web : www.phc.dk
========================================



To unsubscribe from this group, send an email to:
junit-unsubscribe@yahoogroups.com


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

#3940 From: Vladimir Bossicard <vladimir@...>
Date: Fri Feb 1, 2002 6:23 pm
Subject: Re: finally
vbossica
Send Email Send Email
 
> Actually, both can be of interest.  If I can see both the exceptions reported,
> I can fix both issues at the same time.  Sometimes the exception thrown in
> tearDown is unrelated to the runTest exception.


This may be the best solution but chances also are that the tearDown
throws the same exception with another test.  In the worst case, you
have to run your tests twice to correct all errors.

Your solution requires to modify the AssertionFailedException to solve a
problem that appears quite rarely: it's totally faisible (and me be
elegant) but I doubt that it will ever be implemented in JUnit.  The
solution I presented has at least a small chance to be considered :-)

-Vladimir

--
Vladimir Bossicard
www.bossicard.com

#3941 From: Mark Derricutt <mark@...>
Date: Fri Feb 1, 2002 10:10 pm
Subject: Re: finally
talios2k
Send Email Send Email
 
One thing I saw in DUnit, was the an ExpectException(Exception e) method,
where you'd setup a list of exceptions you were excepting, and if you got
them, or didn't get them, make the test pass/fail.

Is this available in JUnit?

--On Friday, February 01, 2002 10:23:06 -0800 Vladimir Bossicard
<vladimir@...> wrote:

> Your solution requires to modify the AssertionFailedException to solve a
> problem that appears quite rarely: it's totally faisible (and me be
> elegant) but I doubt that it will ever be implemented in JUnit.  The
> solution I presented has at least a small chance to be considered :-)



                                     -- \m/ --
   "...if I seem super human I have been misunderstood." (c) Dream Theater
          mark@... - ICQ: 1934853 JID: talios@...

#3942 From: "archanavardhan" <archanavardhan@...>
Date: Sat Feb 2, 2002 12:00 am
Subject: Help with the integration of JUnit with JBuilder 6 Personal
archanavardhan
Send Email Send Email
 
Would anyone know how to integrate JUnit with JBuilder 6 Personal.
Please let me know how it is done if you are using JUnit with JBiulder
6 Personal. Also, if you could point me to a tutorial on JUnit with
JBuilder, it would be great!

#3943 From: Mike Clark <mike@...>
Date: Sat Feb 2, 2002 12:01 am
Subject: Re: Help with the integration of JUnit with JBuilder 6 Personal
clarkware
Send Email Send Email
 
archanavardhan wrote:

> Would anyone know how to integrate JUnit with JBuilder 6 Personal.
> Please let me know how it is done if you are using JUnit with JBiulder
> 6 Personal. Also, if you could point me to a tutorial on JUnit with
> JBuilder, it would be great!
>

I don't use JBuilder, but there's ample information on integrating JUnit with
JBuilder at...

     http://www.junit.org/ides.htm

Mike

--
Mike Clark
Clarkware Consulting, Inc.
http://www.clarkware.com
720.851.2014

#3944 From: "archanavardhan" <archanavardhan@...>
Date: Sat Feb 2, 2002 12:07 am
Subject: Re: Help with the integration of JUnit with JBuilder 6 Personal
archanavardhan
Send Email Send Email
 
--- In junit@y..., Mike Clark <mike@c...> wrote:
> archanavardhan wrote:
>
> > Would anyone know how to integrate JUnit with JBuilder 6 Personal.
> > Please let me know how it is done if you are using JUnit with
JBiulder
> > 6 Personal. Also, if you could point me to a tutorial on JUnit
with
> > JBuilder, it would be great!
> >
>
> I don't use JBuilder, but there's ample information on integrating
JUnit with
> JBuilder at...
>
>     http://www.junit.org/ides.htm
>
> Mike
>
> --
I saw that, but don't know which one to use. Also, the zip file under
JUnitOpenTool doesn't even work. Would anyone know, which one of the
three (really, only two because one doesn't work) to use?

Thanks!

> Mike Clark
> Clarkware Consulting, Inc.
> http://www.clarkware.com
> 720.851.2014

#3945 From: "archanavardhan" <archanavardhan@...>
Date: Sat Feb 2, 2002 12:08 am
Subject: Re: Help with the integration of JUnit with JBuilder 6 Personal
archanavardhan
Send Email Send Email
 
--- In junit@y..., Mike Clark <mike@c...> wrote:
> archanavardhan wrote:
>
> > Would anyone know how to integrate JUnit with JBuilder 6 Personal.
> > Please let me know how it is done if you are using JUnit with
JBiulder
> > 6 Personal. Also, if you could point me to a tutorial on JUnit
with
> > JBuilder, it would be great!
> >
>
> I don't use JBuilder, but there's ample information on integrating
JUnit with
> JBuilder at...
>
>     http://www.junit.org/ides.htm
>
> Mike
>
> --
I saw that, but don't know which one to use. Also, the zip file under
JUnitOpenTool doesn't even work. Would anyone know, which one of the
three (really, only two because one doesn't work) to use?

Thanks!

> Mike Clark
> Clarkware Consulting, Inc.
> http://www.clarkware.com
> 720.851.2014

#3946 From: "dennis" <d-bekkering@...>
Date: Sat Feb 2, 2002 5:10 am
Subject: Re: Testing several implementation of same interface
d-bekkering@...
Send Email Send Email
 
Hello All,

I was just wondering if there is a frame-work or tool that generates tests
from an xml descriptor. Not classes with empty test-method but test-classes
with filled test-methods.

thanx for any reactions and keep up the good work

Dennis

#3947 From: "dennis" <d-bekkering@...>
Date: Sat Feb 2, 2002 5:15 am
Subject: test class generator from xml-descriptor
d-bekkering@...
Send Email Send Email
 
... hhmm my last message (2-2-2 ;) should have had the subject off this
message , sorry for that ....

Dennis

#3948 From: Robert Watkins <robertdw@...>
Date: Sat Feb 2, 2002 5:18 am
Subject: Re: Testing several implementation of same interface
robertdw26
Send Email Send Email
 
On Sat, 2002-02-02 at 15:10, dennis wrote:
> Hello All,
>
> I was just wondering if there is a frame-work or tool that generates tests
> from an xml descriptor. Not classes with empty test-method but test-classes
> with filled test-methods.

It's not hard to write one. :) I knocked up a tool that used an XML file
to list tests, using reflection to invoke the methods, in less than half
a day.

Note that this was _not_ code generation; rather, the XML file was
parsed at run-time.

--
            "The only way to go over a waterfall is in a barrel"
   Robert Watkins                          email: robertdw@...

#3949 From: "Jason Xu" <xjee@...>
Date: Sat Feb 2, 2002 5:17 am
Subject: ´ð¸´: finally
xjee@...
Send Email Send Email
 

In fact,the basic framework of junit TestCase  run() method implementation is:

 

 

public void run(TestResult result) {

                  

                   result.startTest(this);

                  

                   setUp();

                  

                   try {

                            runTest();

                   } catch (AssertionFailedError e) {

                            result.addFailure(this,e);

                   }

                   catch (Throwablee) {

                            result.addError(this,e);

                   }

                   finally {

                            tearDown();

                   }

}

 

so, the method of tearDown() will be called always.

 

-----ÓʼþÔ­¼þ-----
·¢¼þÈË: J. B. Rainsberger [mailto:jbr@...]
·¢ËÍʱ¼ä: 2002Äê2ÔÂ1ÈÕ 21:36
ÊÕ¼þÈË: junit@yahoogroups.com
Ö÷Ìâ: Re: [junit] finally

 


> Is there any mechanism in junit to force tearDown
> regardless of test
> failure/success - kind of like a finally() ?

JUnit already does that. Look at the source for class
TestCase if you'd like to see it for yourself.

JBR.

______________________________________________________________________
Web-hosting solutions for home and business! http://website.yahoo.ca


To unsubscribe from this group, send an email to:
junit-unsubscribe@yahoogroups.com


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



#3950 From: "dennis" <d-bekkering@...>
Date: Sat Feb 2, 2002 5:41 am
Subject: Re: test class generator from xml-descriptor
d-bekkering@...
Send Email Send Email
 
robert:
> It's not hard to write one. :) I knocked up a tool that used an XML file
> to list tests, using reflection to invoke the methods, in less than half
> a day.

I even think it's fun to build such a tool but i don't want to invent the
wheel again ;) so i wait a little longer for any reactions. Your suggestion
is not really what i'am after.

Dennis

#3951 From: Scott Stirling <sstirling@...>
Date: Sun Feb 3, 2002 7:32 pm
Subject: UML tools mother lode
jrun5
Send Email Send Email
 
Some of you guys might enjoy this:

http://www.objectsbydesign.com/tools/umltools_byPlatform.html

Excellent, up-to-date (1/15/2002) linked and priced list of lots of UML tools,
most of which support Java and many of which are free or under $100.  I'll pay
$80 or even $150 out of my pocket if the tool is nice enough and supports just
the feautres I want (GIF/PNG image saving, XMI import/export, color diagrams,
reverse engineer classes or auto-gen from source).  It's much easier to get
departmental budget money for a $100 - 200 tool than a $500 - 5,000 tool too. 
Prior to finding this list, I only knew of ArgoUML (from Tigris) as a free UML
tool for Java.

Some very good free or cheap ones (I am comparing these to Together 4.2, for
which I have a full license) I've tried and liked today:
   - Fujaba (GPL) -  price: $0
   - Sparx Systems, Enterprise Architect Pro - price: $149

Bad or so-so:
  - Metamill Software - price: $85
  - Jsequence - price: $0
  - Mountfield Computers, mDes - price: $65

Scott Stirling
Macromedia

#3952 From: Vladimir Bossicard <vladimir@...>
Date: Sun Feb 3, 2002 7:33 pm
Subject: Re: finally
vbossica
Send Email Send Email
 
Mark Derricutt wrote:

> One thing I saw in DUnit, was the an ExpectException(Exception e) method,
> where you'd setup a list of exceptions you were excepting, and if you got
> them, or didn't get them, make the test pass/fail.
>
> Is this available in JUnit?


JUnit provides an 'ExceptionTestCase' but this is (I think) not often
used.  A lot prefer to simply manually check for the thrown exception.

-Vladimir

--
Vladimir Bossicard
www.bossicard.com

#3953 From: Scott Stirling <sstirling@...>
Date: Sun Feb 3, 2002 7:40 pm
Subject: MOOSE, JDepend and QA metrics tools for Java
jrun5
Send Email Send Email
 
I am looking for more tools like JDepend and NCSS that will take a set of Java
or class files and generate linguistic and/or structural metrics.  The best
thing I have in this regard is Together 4.2, which is very costly and a gigantic
toolshed/IDE.  I am looking for cheap, small, maybe even open source.  Any
pointers?

Metrics I am looking for include the things NCSS generates (lines of non-comment
source, cyclomatic complexity/McCabe's metric), Halstead's metric and MOOSE
(Metrics for Object-OrientedSoftware Engineering: depth of inheritance tree,
number of children/dependents, coupling between objects, response for class,
lack of cohesion in methods and weighted methods per class).

Scott Stirling
Macromedia

#3954 From: "Hariprakash K.S" <hariprakash.ks@...>
Date: Mon Feb 4, 2002 7:18 am
Subject: Integration of JUnit with Visual Age for Java.
hariprakash.ks@...
Send Email Send Email
 
Hi All,
I would appreciate the help for my following doubts,
1) I wanted to integrate the JUnit with IBM Visual Age for Java 3.02,
the info what is given in www.junit.org is for the 3.5.x, can any one
help me in this.
2) What are the benefits of integrating, except runnning the Test cases
from the IDE, are there any other added advantages?

Thanks in Advance
-Hari

**********************************************************
Hariprakash. K.S
Associate Systems Engineer
MphasiS-BFL India Ltd.
139/1,Hosur road,Koramangala
Bangalore - 560 095
India
Phone - 5522713/4
Extn: 2101
The less time I have to work with, the more things I get done.

#3955 From: "Thomas SMETS" <tsmets@...>
Date: Mon Feb 4, 2002 11:29 am
Subject: Prohibited class name !
smetsthomas
Send Email Send Email
 
Before flaming me :-B
I did RTFM (specifically :
http://junit.sourceforge.net/doc/faq/faq.htm#How%20do%20I%20run%20setup%20co
de%20only%20once).  I created a file excluded.properties which I put in the
./libs/junit/runner folder.
The file content is :
<snip item = "file">
         #
         # The list of excluded package paths for the TestCaseClassLoader
         #
         excluded.0=sun.*
         excluded.1=com.sun.*
         excluded.2=org.omg.*
         excluded.3=javax.*
         excluded.4=sunw.*
         excluded.5=org.apache.log4j.BasicConfigurator
</snip>

And the classpath includes before the reference to the "junit.jar", the
references to the "./libs" folder.
I've now an Exception :
             "java.lang.SecurityException: Prohibited package name:
java.lang"
...

What am I missing ?

Thomas,







--

Thomas SMETS - Certified Java Programmer
rue J. Wytsmanstraat 62
1050 Brussel - Bruxelles
Tel : +32 (0)2 742. 05. 94.

#3956 From: Mark Meyers <markm@...>
Date: Mon Feb 4, 2002 11:35 am
Subject: RE: Prohibited class name !
markm@...
Send Email Send Email
 
normally excluded.5 is "java"
now the classloader tries to reload all classes in java.lang (such as String
etc...) which the VM does not allow.
Mark

> -----Original Message-----
> From: Thomas SMETS [mailto:tsmets@...]
> Sent: maandag 4 februari 2002 12:30
> To: junit@yahoogroups.com
> Subject: [junit] Prohibited class name !
>
>
> Before flaming me :-B
> I did RTFM (specifically :
> http://junit.sourceforge.net/doc/faq/faq.htm#How%20do%20I%20ru
> n%20setup%20co
> de%20only%20once).  I created a file excluded.properties
> which I put in the
> ./libs/junit/runner folder.
> The file content is :
> <snip item = "file">
>         #
>         # The list of excluded package paths for the
> TestCaseClassLoader
>         #
>         excluded.0=sun.*
>         excluded.1=com.sun.*
>         excluded.2=org.omg.*
>         excluded.3=javax.*
>         excluded.4=sunw.*
>         excluded.5=org.apache.log4j.BasicConfigurator
> </snip>
>
> And the classpath includes before the reference to the
> "junit.jar", the
> references to the "./libs" folder.
> I've now an Exception :
>             "java.lang.SecurityException: Prohibited package name:
> java.lang"
> ...
>
> What am I missing ?
>
> Thomas,
>
>
>
>
>
>
>
> --
>
> Thomas SMETS - Certified Java Programmer
> rue J. Wytsmanstraat 62
> 1050 Brussel - Bruxelles
> Tel : +32 (0)2 742. 05. 94.
>
>
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-->
> Sponsored by VeriSign - The Value of Trust
> Do you need to encrypt all your online transactions? Find
> the perfect solution in this FREE Guide from VeriSign.
> http://us.click.yahoo.com/vCuuSA/UdiDAA/yigFAA/NhFolB/TM
> --------------------------------------------------------------
> -------~->
>
> To unsubscribe from this group, send an email to:
> junit-unsubscribe@yahoogroups.com
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/

#3957 From: Jason Rogers <jacaetev@...>
Date: Mon Feb 4, 2002 2:11 pm
Subject: Re: Integration of JUnit with Visual Age for Java.
jacaetev
Send Email Send Email
 
It should be the same procedure for 3.02.  As far as benefits goes, isn't
running the TestCases from the IDE enough of a benefit?  Quick turn-around...

-jason

--- "Hariprakash K.S" <hariprakash.ks@...> wrote:
> Hi All,
> I would appreciate the help for my following doubts,
> 1) I wanted to integrate the JUnit with IBM Visual Age for Java 3.02,
> the info what is given in www.junit.org is for the 3.5.x, can any one
> help me in this.
> 2) What are the benefits of integrating, except runnning the Test cases
> from the IDE, are there any other added advantages?
>
> Thanks in Advance
> -Hari
>
> **********************************************************
> Hariprakash. K.S
> Associate Systems Engineer
> MphasiS-BFL India Ltd.
> 139/1,Hosur road,Koramangala
> Bangalore - 560 095
> India
> Phone - 5522713/4
> Extn: 2101
> The less time I have to work with, the more things I get done.
>
>
>


=====
-----------------------------------------
              Keep it simple...
(1 Corinthians 2:2, Galatians 2:20, 6:14)

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com

#3958 From: Todd Jonker <tvj@...>
Date: Mon Feb 4, 2002 8:21 pm
Subject: Re: How to get fixture from TestSetup
todd15202
Send Email Send Email
 
On 1/29/2002 at 6:10 PM I wrote:
> Hello, I'm trying to figure out how to properly use TestSetup, but the
> documentation is very sparse and I've found no help on the mailing list
> archive.
>
> I understand how to wrap the appropriate TestCases inside a TestSetup,
> so that the setUp method in the wrapper is called only once for the entire
> set of TestCases.
>
> Presumably, that method (eg MyTestSetup.setUp) will initialize some
> fixture and store in in member variables.
>
> Now how do my nested TestCase instances access that common fixture?  I
> see no way to access it, and can't find any sample code that does it.


J. B. Rainsberger <jbr@...> kindly replied:
> Perhaps this question merits an answer on my web site. If you would
> like to describe the specific thing you're trying to do, I can turn it
> into an article. :)

More specifically, I'm trying to start using JUnit to build Acceptance tests
for a Swing-based GUI application.  The application uses a custom framework
(inspired by the Nucleus framework in ATG Dynamo) that configures all the
components and links them together into the running application.

We already have lots of Unit tests over small parts of the application, at
the frame and panel level, but those tests don't (and can't) really exercise
the the bundles of property files that configure the components.  Thus the
need for Acceptance tests.

(I searched all over for a JUnit addon that can drive A-tests, but had no
luck finding such a beast.  Any pointers?)

Since the application startup takes a non-trivial amount of time, I'd like
to group the A-tests into sets, where each set uses a single invocation of
the application and tests a related area of functionality.  It looked like
and appropriate use of TestSetup... Until I ran into the problem above.

Here's more-or-less what I envision (forgive typos, I'm just making this up
on the fly):


public class ApplicationTestSetup
     extends TestSetup
{
     public void setUp()
     {
         myApplicationRoot = new Application();
         myApplicationRoot.start();
     }

     public void tearDown()
     {
         myApplicationRoot.shutdown();
         myApplicationRoot = null;
     }

     Application myApplicationRoot;
}


/**
     A group of tests that should all run within the same Application
     instance.
*/
public class SchedulingTestSuite
     extends ApplicationTestSetup
{
     public static Test suite()
     {
         return new SchedulingTestSuite();
     }

     public SchedulingTestSuite()
     {
         addTestSuite(ScheduleBookingTest.class);
         addTestSuite(AppointmentEditorTest.class);
         // ...
     }
}

public class ScheduleBookingTest
     extends TestCase
{
     public void testSomething()
     {
         // XXX How to access the current value of myApplicationRoot?
     }
     public void testSomethingElse() { ... }
}


Now the question is:  how do the (implied) instances of ScheduleBookingTest
(etc) access the fixture setup by ApplicationTestSetup.  I don't want to
have to manually name the testcases (since that ALWAYS leads to errors and
missed tests), so I use the reflective version of addTestSuite.


> Is there something you need to do once and only once for the whole
> suite because it's otherwise difficult or expensive to do it for all
> the tests?

Probably once for a subset of the tests, then again for another subset, etc.
The intent is to balance the risk of inter-test interference with the cost
of application startup.  Note that our app connects to a database, which I
believe  must also be wiped and re-populated with the test dataset before
each set of tests is run.


> You could have class-level attributes on the TestCase class and let the
> setUp() and tearDown() methods of the TestSetup assign values to those
> class-level attributes. For example, suppose you want to establish a
> single database connection and use it for all tests. You have two
> choices:

Well, yeah... But!  Forgive me, but that¹s an extremely smelly solution.  I
find it hard to believe the otherwise-brilliant creators of JUnit would give
us a design that forces the use of global variables!


> public class MyDatabaseTestCase extends TestCase {
>   private static Connection connection;
>
>   public static Test suite() {
>       return new TestSetup(new TestSuite(MyDatabaseTestCase.class)) {
>           protected void setUp() throws Exception {
>               connection = DriverManager.getConnection(...);
>           }
>
>           protected void tearDown() throws Exception {
>               connection.close();
>               connection = null;
>           }
>       };
>   }
> }

Ahh... You're using an inner class for the TestSetup.  This is close, but it
still makes me very uncomfortable.


> or, perhaps...
>
> // Danger -- connection not closed! Shutdown hook, perhaps?
> public class MyDatabaseTestCase extends TestCase {
>   private static Connection connection;
>
>   protected void setUp() throws Exception {
>       if (connection == null) {
>           connection = DriverManager.getConnection(...);
>       }
>   }
> }

As you note, this doesn't properly tearDown after the tests are run, which
is where TestSetup.tearDown would come into play.


> Does that help?

Well, it's a workable solution, but there's *got* to be a clean way that
doesn't involve static variables.  Anybody else have ideas?


.T.

Todd V. Jonker
Inpath Solutions, LLC
www.inpathsol.com

Messages 3929 - 3958 of 24384   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help