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...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 4248 - 4277 of 24387   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#4248 From: Alain Ravet <alain.ravet.list@...>
Date: Fri Mar 1, 2002 5:32 pm
Subject: Re: Emulating JavaScript in HTTPUnit
alain_ravet
Send Email Send Email
 
We had the same problem, and found a simple solution in a web-based
project :

In a web page, there were many buttons in 1 form, that would, through
javascript, call different servlets. The javascript functions would
ignore the default - hardcoded - action of the form, unlike pure httpUnit.

The buttons were :
       "Save", "Delete", "Reload"...
The javascript functions were :
       "callSaveServlet()", "callDeleteServlet()", ..
The target servlets were :
       SaveServlet, DeleteServlet, ReloadServlet


Using Velocity (http://jakarta.apache.org/velocity/), the simplest way I
found, was to have this hardcoded action linked to a Velocity variable
"$actionTarget".
=>
Before clicking the "Save" button with httpUnit, I would just change,
through Velocity, the value of $actionTarget to "SaveServlet".

Though not the real thing, it was good enough for repetitive unit
testing, as we had one "non-automated" test (read : "manual") test, that
would have trapped typos related error.


Using this trick, I could extensively test my javascript enabled
web-app. with pure and simple httpUnit.

It was good enough for enough for us.
Could be for you.

Alain Ravet

#4249 From: "don_quixada" <xanthus@...>
Date: Fri Mar 1, 2002 6:31 pm
Subject: J2me Unit
don_quixada
Send Email Send Email
 
Has anyone been able to get J2meUnit working and testing midlets?

If so, please offer your advice!

thanks,

dq

#4250 From: "Vogel, Kent" <kvogel@...>
Date: Fri Mar 1, 2002 8:21 pm
Subject: RE: Emulating JavaScript in HTTPUnit
kvogel@...
Send Email Send Email
 
Interesting.  We're using JSP instead of Velocity, but I suppose the same
principal would apply.

> -----Original Message-----
> From: Alain Ravet [mailto:alain.ravet.list@...]
> Sent: Friday, March 01, 2002 12:32 PM
> To: junit@yahoogroups.com
> Subject: Re: [junit] Emulating JavaScript in HTTPUnit
>
>
> We had the same problem, and found a simple solution in a web-based
> project :
>
> In a web page, there were many buttons in 1 form, that would, through
> javascript, call different servlets. The javascript functions would
> ignore the default - hardcoded - action of the form, unlike
> pure httpUnit.
>
> The buttons were :
>       "Save", "Delete", "Reload"...
> The javascript functions were :
>       "callSaveServlet()", "callDeleteServlet()", ..
> The target servlets were :
>       SaveServlet, DeleteServlet, ReloadServlet
>
>
> Using Velocity (http://jakarta.apache.org/velocity/), the
> simplest way I
> found, was to have this hardcoded action linked to a Velocity
> variable
> "$actionTarget".
> =>
> Before clicking the "Save" button with httpUnit, I would just change,
> through Velocity, the value of $actionTarget to "SaveServlet".
>
> Though not the real thing, it was good enough for repetitive unit
> testing, as we had one "non-automated" test (read : "manual")
> test, that
> would have trapped typos related error.
>
>
> Using this trick, I could extensively test my javascript enabled
> web-app. with pure and simple httpUnit.
>
> It was good enough for enough for us.
> Could be for you.
>
> Alain Ravet
>
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-->
> Tiny Wireless Camera under $80!
> Order Now! FREE VCR Commander!
> Click Here - Only 1 Day Left!
> http://us.click.yahoo.com/nuyOHD/7.PDAA/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/
>
>

#4251 From: Brian Button <bbutton01@...>
Date: Sat Mar 2, 2002 1:09 pm
Subject: Re: J2me Unit
bbutton
Send Email Send Email
 
>>>>> "Don" == don quixada <don_quixada> writes:

     Don> Has anyone been able to get J2meUnit working and testing
     Don> midlets?  If so, please offer your advice!

Yes, I was. What would you like to know?

bab

--
Brian Button            bbutton@...
Senior Consultant       Object Mentor, Inc
St. Louis, MO  http://www.objectmentor.com

Extreme Programming in St. Louis - http://groups.yahoo.com/group/xpstl

#4252 From: alex@...
Date: Sat Mar 2, 2002 6:26 pm
Subject: PATCH: assertEquals(String,String) becomes legible
stinkysage
Send Email Send Email
 
I've implemented a patch for a long-standing annoyance of JUnit.

Have you ever had an assertEquals() fail because two strings were not
equal, only to find a not-very-helpful error message like this?

> junit.framework.AssertionFailedError: expected:<Lorem ipsum dolor
> sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
> invidunt ut labore et dolore magna aliquyam erat, sed diam
> voluptua. At vero eos et accusam et justo duo dolores et ea
> rebum. Now is the time for all good men to come to the aid of their
> party. The quick brown fox jumped over the lazy dog, sed diam nonumy
> eirmod tempor invidunt ut labore et dolore magna aliquyam erat.> but
> was:<Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
> diam nonumy eirmod tempor invidunt ut labore et dolore magna
> aliquyam erat, sed diam voluptua. At vero eos et accusam et justo
> duo dolores et ea rebum. Now is the time for all good men to come to
> the aid of their party. The slow brown chicken jumped over the lazy
> dog, sed diam nonumy eirmod tempor invidunt ut labore et dolore
> magna aliquyam erat.>

With this patch, JUnit will find the first character where the strings
start to differ, and display a 60-character window onto that location
in the strings.

junit.framework.AssertionFailedError: strings differ at character 285
Expected: ...of their party. The quick brown fox jumped over the lazy ...
   Actual: ...of their party. The slow brown chicken jumped over the la...

It also does the right thing with ellipses and window size if the diff
is near the beginning or the end of the string. It also escapes
control characters like \n (helpful for tracking down platform newline
mismatches).

You can download the patch from

	 http://www.purpletech.com/junit-patch/

It's available as a patch file against the current CVS, but I've also
built a replacement junit.jar -- just drop it in your classpath and
you're good to go.

viz. the recent "What's the best way to enhance Assert?" discussion on
the JUnit list, I implemented it inside of Assert.java, rather than
making a separate AssertStringDiff.java class.  This is because
conceptually, it does not provide a new type of assertion; it just
changes the behavior of the existing assertEquals(String,String).

Also, practically, this will be most useful to the most people,
requiring no code changes and applying to all existing string compare
asserts.

Anyway, it's easy to refactor if you want to change the design.
Almost all of the behavior is in a separate class (Utils.java).

  - A

--
Alex Chaffee                       mailto:alex@...
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/

#4253 From: Eric Heikkila <ericheikkila@...>
Date: Sat Mar 2, 2002 10:34 pm
Subject: Websphere Advisory Magazine
ericheikkila
Send Email Send Email
 
Hey all,

Does anyone have a copy of the 02/02 edition of this
magazine?  It has an article I'm trying to get (about
Websphere Studio Application Developer and JUnit) ,
but I haven't been able to find it at any of the
bookstores, etc, around here (Michigan).

Thanks,

-Eric

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

#4254 From: "vinitshah76013" <vinitshah76013@...>
Date: Sun Mar 3, 2002 7:53 pm
Subject: Needhelp regarding exception testing
vinitshah76013
Send Email Send Email
 
Hi
I am working on a project for testing java code for exceptions and I
need to automate this process. Does anyone have any idea how I can
use junit to test for exceptions such as FileNotFoundException?
Please reply.

Thanks

Vinit Shah

#4255 From: Brian Button <bbutton01@...>
Date: Sun Mar 3, 2002 8:01 pm
Subject: Re: Needhelp regarding exception testing
bbutton
Send Email Send Email
 
>>>>> "Vinit" == vinitshah76013  <vinitshah76013@...> writes:

     Vinit> Hi I am working on a project for testing java code for
     Vinit> exceptions and I need to automate this process. Does anyone
     Vinit> have any idea how I can use junit to test for exceptions
     Vinit> such as FileNotFoundException?  Please reply.

Look at extensions/ExceptionTestCase.java or use:

public void testFileNotFoundThrown() throws Exception {
         try {
                 code.thatThrowsFileNotFound();
                 fail("FileNotFound not thrown");
         } catch(FileNotFoundException expectedBehavior) {
         }
}

HTH,
bab

--
Brian Button            bbutton@...
Senior Consultant       Object Mentor, Inc
St. Louis, MO  http://www.objectmentor.com

Extreme Programming in St. Louis - http://groups.yahoo.com/group/xpstl

#4256 From: Jeremy Thornton <jeremy@...>
Date: Mon Mar 4, 2002 9:10 am
Subject: RE: J2me Unit
jeremy@...
Send Email Send Email
 
I've got it running, let me know of any specific queries or sticking points,
What I have found is that because it runs as a midlet (i.e. on a real device
or an emulator) I don't find it very useful for running frequent tests.
I have a hunch that compiling a CLDC/MIDP environment on my normal
development machine would provide a more useful framework for running tests
than running j2meUnit under the sun wireless toolkit.

Anybody else had much success with j2me testing ?

J.


  -----Original Message-----
From:  don_quixada [mailto:xanthus@...]
Sent: 01 March 2002 18:31
To: junit@yahoogroups.com
Subject: [junit] J2me Unit

Has anyone been able to get J2meUnit working and testing midlets?

If so, please offer your advice!

thanks,

dq




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/

#4257 From: "Brian Button" <bbutton01@...>
Date: Mon Mar 4, 2002 10:28 am
Subject: Re: J2me Unit
bbutton
Send Email Send Email
 
Actually, we found it very useful for running our tests. We were running
through JBuilder with its J2ME environment set up to let us run there there.
The turnaround time for tests was sufficiently short that we were able to
run our tests very often like this.

The only thing that didn't work for us was the concept of a suite of suites.
We had several different tests suites defined, but we couldn't get J2MEUnit
to run all of the tests. It would only run those tests that were in the
first suite that it found.

bab

----- Original Message -----
From: "Jeremy Thornton" <jeremy@...>
To: <junit@yahoogroups.com>
Sent: Monday, March 04, 2002 3:10 AM
Subject: RE: [junit] J2me Unit


> I've got it running, let me know of any specific queries or sticking
points,
> What I have found is that because it runs as a midlet (i.e. on a real
device
> or an emulator) I don't find it very useful for running frequent tests.
> I have a hunch that compiling a CLDC/MIDP environment on my normal
> development machine would provide a more useful framework for running
tests
> than running j2meUnit under the sun wireless toolkit.
>
> Anybody else had much success with j2me testing ?
>
> J.
>
>
>  -----Original Message-----
> From: don_quixada [mailto:xanthus@...]
> Sent: 01 March 2002 18:31
> To: junit@yahoogroups.com
> Subject: [junit] J2me Unit
>
> Has anyone been able to get J2meUnit working and testing midlets?
>
> If so, please offer your advice!
>
> thanks,
>
> dq
>
>
>
>
> 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/
>
>
>
>
>
>
> 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/
>
>

#4258 From: "daviddench" <d.j.dench@...>
Date: Mon Mar 4, 2002 11:16 am
Subject: Jython with JUnit
daviddench
Send Email Send Email
 
Dear All,
I am having a few niggling problems calling JUnit from Jython.
Does anyone have a ported version of the samples/SimpleTest demos
that I can borrow to get me sorted ? It's the auto suite generation
that is causing problems.
Thanks,
	 David

#4259 From: "\"J. B. Rainsberger\"" <jbr@...>
Date: Mon Mar 4, 2002 1:51 pm
Subject: Re: Needhelp regarding exception testing
nails762
Send Email Send Email
 
Quoting vinitshah76013 <vinitshah76013@...>:

> Hi
> I am working on a project for testing java code for exceptions and I
> need to automate this process. Does anyone have any idea how I can
> use junit to test for exceptions such as FileNotFoundException?
> Please reply.

Is your question: How do I test whether my class throws the right exceptions?
If so, Brian\'s suggestion should give you the answer. http://c2.com/cgi/wiki?
JavaUnitBestPractices also contains examples of good ways to write JUnit test
cases. It covers your question and more.

Is your question: How do I test whether my class handles exceptions thrown by
other classes? If so, you need to understand that it is much easier to SIMULATE
exceptions rather than RECREATE the conditions under which they occur.

For example, suppose your class uses a FileSystem object. Suppose the
FileSystem object throws a DiskFullException whenever you try to write to the
FileSystem and the disk is full. How do you test how your class behaves when
the disk is full?

Option 1: Fill up the disk, run your test and return the disk to normal.
Although this is an option, it\'s not an easy thing (nor a safe thing) to do.

Option 2: Use a MockFileSystem object, which implements the same interface as
FileSystem, to simulate the condition.

Example:

public class MockFileSystem extends FileSystem {
...
     public void setupThrowException(final Throwable throwable) {
         // Remember to throw \"throwable\" on every method call
     }
...
}

...

public void testDiskFull() throws Exception {
     final MockFileSystem mockFileSystem = new MockFileSystem();
     final String expectedFullDisk = \"c:/\";
     mockFileSystem.setupThrowException(new DiskFullException(expectedFullDisk));
     final MyClass myClass = new MyClass(mockFileSystem);
     try {
         myClass.doSomething();
         fail(\"How did you do that with a full disk!?\");
     }
     catch(final MyClassException success) {
         final Throwable enclosedException = success.getSourceThrowable();
         assertTrue(enclosedException instanceof DiskFullException);
         final DiskFullException actualException = (DiskFullException)
enclosedException;
         assertEquals(expectedFullDisk, actualException.getFullDisk());
     }
}

I hope this helps a little.

J. B. (Joe) Rainsberger
President, Diaspar Software Services
http://www.diasparsoftware.com
Let\'s write software that people understand.

#4260 From: Hammonds Nicholas <nicholas.hammonds@...>
Date: Mon Mar 4, 2002 2:41 pm
Subject: java servlet testing
nicholas.hammonds@...
Send Email Send Email
 

hello there,
I would like to use junit to test my java servlets I am creating.  The main servlet object inherits from HttpServlet object in javax.servlet.http package.  The problem is that servlets run under a server, you can't just create standalone servlet objects.  The only way I have to test my servlets now is to run a server and just point my web browser at them and monitor the output. One solution I have is to have one class that handles all communication between client and server, and then a few standalone classes which handle the rest.  The problem is then I will never be able to test the communication class.

Anyhow I am just rambling now, the basic question is "Does anybody know how to java servlets with junit".

cheers
Nic


#4261 From: "Ryan P Ripley" <ryan.ripley@...>
Date: Mon Mar 4, 2002 2:49 pm
Subject: RE: java servlet testing
ryan.ripley@...
Send Email Send Email
 
look into Cactus at http://jakarta.apache.org
 
enjoy!
 
       --Ryan
-----Original Message-----
From: Hammonds Nicholas [mailto:nicholas.hammonds@...]
Sent: Monday, March 04, 2002 9:42 AM
To: junit@yahoogroups.com
Subject: [junit] java servlet testing

hello there,
I would like to use junit to test my java servlets I am creating.  The main servlet object inherits from HttpServlet object in javax.servlet.http package.  The problem is that servlets run under a server, you can't just create standalone servlet objects.  The only way I have to test my servlets now is to run a server and just point my web browser at them and monitor the output. One solution I have is to have one class that handles all communication between client and server, and then a few standalone classes which handle the rest.  The problem is then I will never be able to test the communication class.

Anyhow I am just rambling now, the basic question is "Does anybody know how to java servlets with junit".

cheers
Nic



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.

#4262 From: Eric Jan Malotaux <Eric.Jan.Malotaux@...>
Date: Mon Mar 4, 2002 2:46 pm
Subject: Re: java servlet testing
Eric.Jan.Malotaux@...
Send Email Send Email
 
Try "httpunit".


At 15:41 4-3-2002, you wrote:

hello there,
I would like to use junit to test my java servlets I am creating.  The main servlet object inherits from HttpServlet object in javax.servlet.http package.  The problem is that servlets run under a server, you can't just create standalone servlet objects.  The only way I have to test my servlets now is to run a server and just point my web browser at them and monitor the output. One solution I have is to have one class that handles all communication between client and server, and then a few standalone classes which handle the rest.  The problem is then I will never be able to test the communication class.

Anyhow I am just rambling now, the basic question is "Does anybody know how to java servlets with junit".

cheers
Nic

Yahoo! Groups Sponsor
ADVERTISEMENT
8b0df00.jpg
8b0e022.jpg

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.

--
Eric Jan Malotaux


#4263 From: Kirill Maximov <kir@...>
Date: Mon Mar 4, 2002 2:48 pm
Subject: Re: java servlet testing
maxkir1
Send Email Send Email
 
On  0, Hammonds Nicholas <nicholas.hammonds@...> wrote:
> hello there,
> I would like to use junit to test my java servlets I am creating.  The main
> servlet object inherits from HttpServlet object in javax.servlet.http
> package.  The problem is that servlets run under a server, you can't just
> create standalone servlet objects.  The only way I have to test my servlets
> now is to run a server and just point my web browser at them and monitor the
> output. One solution I have is to have one class that handles all
> communication between client and server, and then a few standalone classes
> which handle the rest.  The problem is then I will never be able to test the
> communication class.
>
> Anyhow I am just rambling now, the basic question is "Does anybody know how
> to java servlets with junit".

    There are two options:
    1. Cactus (I prefer this one) http://jakarta.apache.org/cactus/
    2. ServletUnit http://servletunit.sourceforge.net/

   With best regards,
   KIR


>
> cheers
> Nic

#4264 From: "Steve Freeman" <steve@...>
Date: Mon Mar 4, 2002 6:47 pm
Subject: Re: java servlet testing
smg_freeman
Send Email Send Email
 
From: "Kirill Maximov" <kir@...>
> On  0, Hammonds Nicholas <nicholas.hammonds@...> wrote:
> > hello there,
> > I would like to use junit to test my java servlets I am creating.
The main
> > servlet object inherits from HttpServlet object in
javax.servlet.http
> > package.  The problem is that servlets run under a server, you can't
just
> > create standalone servlet objects.

yes you can...

> >
> > Anyhow I am just rambling now, the basic question is "Does anybody
know how
> > to java servlets with junit".
>
>    There are two options:
>    1. Cactus (I prefer this one) http://jakarta.apache.org/cactus/
>    2. ServletUnit http://servletunit.sourceforge.net/

3. Use mock objects. (http://www.mockobjects.com)

Steve

#4265 From: "Nicholas Lesiecki" <nick@...>
Date: Mon Mar 4, 2002 7:43 pm
Subject: RE: java servlet testing
nick@...
Send Email Send Email
 
You could also use easymock to create a mock implementation of the servlet objects you wish to use.
 
 
But I do recommend Cactus, as it does a lot of the setup work for you, and gives you the opportunity to run your tests in the container you're actually using.
 
For excellent coverage of Cactus, HttpUnit, and when to use each, check out:

Java Tools for Extreme Programming: Mastering Open Source Tools, including Ant, JUnit, and Cactus

http://www.amazon.com/exec/obidos/ASIN/047120708X/

Cheers,
 
Nicholas Lesiecki
 
-----Original Message-----
From: Hammonds Nicholas [mailto:nicholas.hammonds@...]
Sent: Monday, March 04, 2002 7:42 AM
To: junit@yahoogroups.com
Subject: [junit] java servlet testing

hello there,
I would like to use junit to test my java servlets I am creating.  The main servlet object inherits from HttpServlet object in javax.servlet.http package.  The problem is that servlets run under a server, you can't just create standalone servlet objects.  The only way I have to test my servlets now is to run a server and just point my web browser at them and monitor the output. One solution I have is to have one class that handles all communication between client and server, and then a few standalone classes which handle the rest.  The problem is then I will never be able to test the communication class.

Anyhow I am just rambling now, the basic question is "Does anybody know how to java servlets with junit".

cheers
Nic



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.

#4266 From: "Eric Riou du Cosquer" <eri@...>
Date: Tue Mar 5, 2002 5:41 pm
Subject: JUnit and UML...an MDA approach...
eri@...
Send Email Send Email
 
Hi all,

After a few months working on integrating JUnit in a UML case tool, I am
proud to present you my work!
The idea is to generate a test model from the application model and then to
modelize the test methods using UML sequence diagrams. Then the code is
automatically generated and executed in the JUnit framework!

Let's have a look a the pages describing this new approach and send me you
feedback in order to integrate new features in that work...and questions are
welcome,


Best regards,

Eric RIOU

http://www.objecteering.com/p_junit.htm

#4267 From: "numbsafari" <numbsafari@...>
Date: Tue Mar 5, 2002 7:18 pm
Subject: NullPointerException with TestRunner
numbsafari
Send Email Send Email
 
Hi there,

I'm new to JUnit and am having some trouble getting my testsuite to
run using the TestRunner awt and gui tools. Whenever I load either
and type in the name of the test class and then click on "Run", the
following is printed to the console and nothing happens:

W/AWT:

java.lang.NullPointerException
         at java.lang.reflect.Method.invoke(Native Method)
         at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:53)
         at junit.awtui.TestRunner.runSuite(TestRunner.java:393)
         at junit.awtui.TestRunner$6.actionPerformed
(TestRunner.java:181)
         at java.awt.Button.processActionEvent(Button.java:329)
         at java.awt.Button.processEvent(Button.java:302)
         at java.awt.Component.dispatchEventImpl(Component.java:2593)
         at java.awt.Component.dispatchEvent(Component.java:2497)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchTh
read.java:131)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThre
ad.java:98)
         at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:93)
         at java.awt.EventDispatchThread.run
(EventDispatchThread.java:85)


W/SWING:

java.lang.NullPointerException
         at java.lang.reflect.Method.invoke(Native Method)
         at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:53)
         at junit.swingui.TestRunner.runSuite(TestRunner.java:612)
         at junit.swingui.TestRunner$10.actionPerformed
(TestRunner.java:296)
         at javax.swing.AbstractButton.fireActionPerformed
(AbstractButton.java:14
50)
         at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
ctButton.java:1504)
         at javax.swing.DefaultButtonModel.fireActionPerformed
(DefaultButtonModel
.java:378)
         at javax.swing.DefaultButtonModel.setPressed
(DefaultButtonModel.java:250
)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased
(BasicButtonL
istener.java:216)
         at java.awt.Component.processMouseEvent(Component.java:3715)
         at java.awt.Component.processEvent(Component.java:3544)
         at java.awt.Container.processEvent(Container.java:1164)
         at java.awt.Component.dispatchEventImpl(Component.java:2593)
         at java.awt.Container.dispatchEventImpl(Container.java:1213)
         at java.awt.Component.dispatchEvent(Component.java:2497)
         at java.awt.LightweightDispatcher.retargetMouseEvent
(Container.java:2451
)
         at java.awt.LightweightDispatcher.processMouseEvent
(Container.java:2216)

         at java.awt.LightweightDispatcher.dispatchEvent
(Container.java:2125)
         at java.awt.Container.dispatchEventImpl(Container.java:1200)
         at java.awt.Window.dispatchEventImpl(Window.java:926)
         at java.awt.Component.dispatchEvent(Component.java:2497)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchTh
read.java:131)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThre
ad.java:98)
         at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:93)
         at java.awt.EventDispatchThread.run
(EventDispatchThread.java:85)


Anyhow, if anybody has any insights, it would be really helpful... My
next step is to try and use the TextUI and figure out the report
formatting, but this would have been nice.

Thanks,


Sam Wilson
ECount, Inc.

#4268 From: "don_quixada" <xanthus@...>
Date: Wed Mar 6, 2002 1:23 am
Subject: Re: J2me Unit
don_quixada
Send Email Send Email
 
Hi, it's great to know that other people are unit testing j2me!

I will try to present my problem:

First of all we're using Ant to build, preverify and test. Ant seems
to be working great; however, the testing is not.

Basically, the gist of what we're doing is testing the methods in a
midlet. We have the midlet (in this case HelloWorld) and the testing
app (TestHelloWorld). All we're trying to in this code is create an
instance of HelloWorld and test that it is not null. Sounds simple,
but it doesn't work. We've tried many, many different ways to get
around this problem but nothing seems to work. The code is appended
to the end of this document.

The problem is that as soon as a new instance is created an error
happens with j2me unit. Here's the Ant output:

-----
E:\projects\HelloWorld>ant
Buildfile: build.xml

compile:
     [javac] Compiling 1 source file to
E:\projects\HelloWorld\build\tmpclasses

preverify:
[preverify] Preverifying classes to
E:\projects\HelloWorld\build\classes

jar:
       [jar] Building jar:
E:\projects\HelloWorld\build\lib\HelloWorldProject.jar

compiletests:
     [javac] Compiling 1 source file to
E:\projects\HelloWorld\build\tmptestcases

preverifytests:
[preverify] Preverifying classes to
E:\projects\HelloWorld\build\testcases

runtests:
      [java] TestRunner.main()
      [java] .E.E
      [java] Time: 30ms
      [java]
      [java] FAILURES!!!
      [java] Test Results:
      [java] Run: 2 Failures: 0 Errors: 2
      [java] There were 2 errors:
      [java] 1) testNotNull(test.com.ranksix.TestHelloWorld)
      [java] com/ranksix/HelloWorld
      [java] 2) testNull(test.com.ranksix.TestHelloWorld)
      [java] com/ranksix/HelloWorld
      [java]

BUILD FAILED

E:\projects\HelloWorld\build.xml:59: Java returned: -1

Total time: 3 seconds
-----

What's inside the test methods does not matter. As soon as 'new
HelloWorld()' appears in the test, the errors happen.

If you comment out the hiWorld = new HelloWorld(); in the setUp()
method of TestHelloWorld, the tests will run fine and pass (or fail)
accordingly.

We've tried to use both the textui testrunner and the midp.ui
testrunner, but neither work (of course we'd prefer to use the text
ui so we can do nightly builds etc...).

We've also tried just using junit. It's our feeling that since the
test app (HelloWorldTest) doesn't have anything to do with the kvm,
there shouldn't be any problems with testing since we are just
testing methods and classes of midlets; we're not actually running
the midlets. However, this does not seem to be the case since things
don't work with junit either (we're getting an error that's something
like: java.lang.UnsatisfiedLinkError: getProperty0 -- with a whole
bunch of other error messages).

I hope this is enough info for you to work with. If you want the Ant
build file, I can provide that for you as well (I'll just have to
clean it up a bit).

Thanks in advance,

dq


----------

//:HelloWorld.java

package com.ranksix;

/** This class simply outputs the string: "Hello World!".
   *
   */
import javax.microedition.midlet.MIDlet;

public class HelloWorld extends MIDlet
{

   public HelloWorld()
   {
     String aString = "Hello World!";
   }

   public void startApp() throws
javax.microedition.midlet.MIDletStateChangeException
   {
   }

   public void pauseApp()
   {
   }

   public void destroyApp(boolean unconditional) throws
javax.microedition.midlet.MIDletStateChangeException
   {
   }
}

// End of HelloWorld.java


//:TestHelloWorld.java

package test.com.ranksix;

/** Test cases for the HelloWorld Midlet
   *
   */
import com.ranksix.HelloWorld;
import j2meunit.framework.TestCase;
import j2meunit.framework.AssertionFailedError;
import j2meunit.framework.TestSuite;
import j2meunit.framework.Test;
import j2meunit.framework.TestResult;

public class TestHelloWorld extends TestCase
{
   private HelloWorld hiWorld;

   public void setUp()
   {
     hiWorld = new HelloWorld();
   }

   public void tearDown()
   {
     hiWorld = null;
   }

   public void runTest() throws java.lang.Throwable
   {
     if(getTestMethodName().equals("testNotNull"))
       {
         testNotNull();
       }
     else if(getTestMethodName().equals("testNull"))
       {
         testNull();
       }
   }

   public TestHelloWorld() // default constructor
   {
     super("null");
   }

   public TestHelloWorld(String name)
   {
     super(name);
   }

   public static void main(String[] args)
   {
     String[] runnerArgs = new String[]
{"test.com.ranksix.TestHelloWorld"};
     j2meunit.textui.TestRunner.main(runnerArgs);
   }

   public Test suite()
   {
     return new TestSuite(new TestHelloWorld().getClass(),new String[]
{"testNotNull","testNull"});
   }

   public void testNotNull()
   {
     assertNotNull(hiWorld);
     //assertEquals("should be equal",4,4);
   }

   public void testNull()
   {
     assertNull(hiWorld);
     //assertEquals("should be equal",3,4);
   }

}
// End of TestHelloWorld.java

#4269 From: Robert Martin UncleBob <unclebob@...>
Date: Tue Mar 5, 2002 10:26 pm
Subject: RE: Digest Number 457
rmartinoma
Send Email Send Email
 
> -----Original Message-----
> From: junit@yahoogroups.com [mailto:junit@yahoogroups.com]
> Sent: Tuesday, March 05, 2002 2:15 PM
> To: junit@yahoogroups.com
> Subject: [junit] Digest Number 457
>
>
> To unsubscribe from this group, send an email to:
> junit-unsubscribe@yahoogroups.com
>
> --------------------------------------------------------------
> ----------
>
> There are 2 messages in this issue.
>
> Topics in this digest:
>
>       1. Re: java servlet testing
>            From: "Steve Freeman" <steve@...>
>       2. RE: java servlet testing
>            From: "Nicholas Lesiecki" <nick@...>
>
>
> ______________________________________________________________
> __________
> ______________________________________________________________
> __________
>
> Message: 1
>    Date: Mon, 4 Mar 2002 18:47:19 -0000
>    From: "Steve Freeman" <steve@...>
> Subject: Re: java servlet testing
>
> From: "Kirill Maximov" <kir@...>
> > On  0, Hammonds Nicholas <nicholas.hammonds@...> wrote:
> > > hello there,
> > > I would like to use junit to test my java servlets I am creating.
> The main
> > > servlet object inherits from HttpServlet object in
> javax.servlet.http
> > > package.  The problem is that servlets run under a
> server, you can't
> just
> > > create standalone servlet objects.
>
> yes you can...
>
> > >
> > > Anyhow I am just rambling now, the basic question is "Does anybody
> know how
> > > to java servlets with junit".
> >
> >    There are two options:
> >    1. Cactus (I prefer this one) http://jakarta.apache.org/cactus/
> >    2. ServletUnit http://servletunit.sourceforge.net/
>
> 3. Use mock objects. (http://www.mockobjects.com)
>
> Steve
>
>
>
>
>
> ______________________________________________________________
> __________
> ______________________________________________________________
> __________
>
> Message: 2
>    Date: Mon, 4 Mar 2002 12:43:15 -0700
>    From: "Nicholas Lesiecki" <nick@...>
> Subject: RE: java servlet testing
>
> java servlet testingYou could also use easymock to create a mock
> implementation of the servlet objects you wish to use.
>
> http://easymock.org
>
> But I do recommend Cactus, as it does a lot of the setup work
> for you, and
> gives you the opportunity to run your tests in the container
> you're actually
> using.
>
> For excellent coverage of Cactus, HttpUnit, and when to use
> each, check out:
>
> Java Tools for Extreme Programming: Mastering Open Source
> Tools, including
> Ant, JUnit, and Cactus
>
> http://www.amazon.com/exec/obidos/ASIN/047120708X/
>
>
> Cheers,
>
> Nicholas Lesiecki
>
> Check out my article on AspectJ:
> http://www-106.ibm.com/developerworks/java/?loc=dwmain
>
>   -----Original Message-----
>   From: Hammonds Nicholas [mailto:nicholas.hammonds@...]
>   Sent: Monday, March 04, 2002 7:42 AM
>   To: junit@yahoogroups.com
>   Subject: [junit] java servlet testing
>
>
>   hello there,
>   I would like to use junit to test my java servlets I am
> creating.  The
> main servlet object inherits from HttpServlet object in
> javax.servlet.http
> package.  The problem is that servlets run under a server,
> you can't just
> create standalone servlet objects.  The only way I have to
> test my servlets
> now is to run a server and just point my web browser at them
> and monitor the
> output. One solution I have is to have one class that handles all
> communication between client and server, and then a few
> standalone classes
> which handle the rest.  The problem is then I will never be
> able to test the
> communication class.
>
>   Anyhow I am just rambling now, the basic question is "Does
> anybody know
> how to java servlets with junit".
>
>   cheers
>   Nic
>
>
>         Yahoo! Groups Sponsor
>               ADVERTISEMENT
>
>
>
>
>   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.
>
>
>
> [This message contained attachments]
>
>
>
> ______________________________________________________________
> __________
> ______________________________________________________________
> __________
>
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/

#4270 From: "geektank" <emeade@...>
Date: Wed Mar 6, 2002 3:35 am
Subject: Re: java servlet testing
geektank
Send Email Send Email
 
#4271 From: Vladimir Bossicard <vladimir@...>
Date: Wed Mar 6, 2002 3:16 am
Subject: Re: NullPointerException with TestRunner
vbossica
Send Email Send Email
 
A really quick search on yahoogroups gives...

a similar question:
http://groups.yahoo.com/group/junit/message/2417

and its answer:
http://groups.yahoo.com/group/junit/message/2442

Please first read the mail you received when you joined the group (today
according to yahoogroups): it gives you useful information on where to
search for information (already asked questions...) before sending an
email to 1,795 users.

-Vladimir

--
Vladimir Bossicard
www.bossicard.com

#4272 From: Robert Martin UncleBob <unclebob@...>
Date: Tue Mar 5, 2002 10:26 pm
Subject: RE: Digest Number 457
rmartinoma
Send Email Send Email
 
> -----Original Message-----
> From: junit@yahoogroups.com [mailto:junit@yahoogroups.com]
> Sent: Tuesday, March 05, 2002 2:15 PM
> To: junit@yahoogroups.com
> Subject: [junit] Digest Number 457
>
>
> To unsubscribe from this group, send an email to:
> junit-unsubscribe@yahoogroups.com
>
> --------------------------------------------------------------
> ----------
>
> There are 2 messages in this issue.
>
> Topics in this digest:
>
>       1. Re: java servlet testing
>            From: "Steve Freeman" <steve@...>
>       2. RE: java servlet testing
>            From: "Nicholas Lesiecki" <nick@...>
>
>
> ______________________________________________________________
> __________
> ______________________________________________________________
> __________
>
> Message: 1
>    Date: Mon, 4 Mar 2002 18:47:19 -0000
>    From: "Steve Freeman" <steve@...>
> Subject: Re: java servlet testing
>
> From: "Kirill Maximov" <kir@...>
> > On  0, Hammonds Nicholas <nicholas.hammonds@...> wrote:
> > > hello there,
> > > I would like to use junit to test my java servlets I am creating.
> The main
> > > servlet object inherits from HttpServlet object in
> javax.servlet.http
> > > package.  The problem is that servlets run under a
> server, you can't
> just
> > > create standalone servlet objects.
>
> yes you can...
>
> > >
> > > Anyhow I am just rambling now, the basic question is "Does anybody
> know how
> > > to java servlets with junit".
> >
> >    There are two options:
> >    1. Cactus (I prefer this one) http://jakarta.apache.org/cactus/
> >    2. ServletUnit http://servletunit.sourceforge.net/
>
> 3. Use mock objects. (http://www.mockobjects.com)
>
> Steve
>
>
>
>
>
> ______________________________________________________________
> __________
> ______________________________________________________________
> __________
>
> Message: 2
>    Date: Mon, 4 Mar 2002 12:43:15 -0700
>    From: "Nicholas Lesiecki" <nick@...>
> Subject: RE: java servlet testing
>
> java servlet testingYou could also use easymock to create a mock
> implementation of the servlet objects you wish to use.
>
> http://easymock.org
>
> But I do recommend Cactus, as it does a lot of the setup work
> for you, and
> gives you the opportunity to run your tests in the container
> you're actually
> using.
>
> For excellent coverage of Cactus, HttpUnit, and when to use
> each, check out:
>
> Java Tools for Extreme Programming: Mastering Open Source
> Tools, including
> Ant, JUnit, and Cactus
>
> http://www.amazon.com/exec/obidos/ASIN/047120708X/
>
>
> Cheers,
>
> Nicholas Lesiecki
>
> Check out my article on AspectJ:
> http://www-106.ibm.com/developerworks/java/?loc=dwmain
>
>   -----Original Message-----
>   From: Hammonds Nicholas [mailto:nicholas.hammonds@...]
>   Sent: Monday, March 04, 2002 7:42 AM
>   To: junit@yahoogroups.com
>   Subject: [junit] java servlet testing
>
>
>   hello there,
>   I would like to use junit to test my java servlets I am
> creating.  The
> main servlet object inherits from HttpServlet object in
> javax.servlet.http
> package.  The problem is that servlets run under a server,
> you can't just
> create standalone servlet objects.  The only way I have to
> test my servlets
> now is to run a server and just point my web browser at them
> and monitor the
> output. One solution I have is to have one class that handles all
> communication between client and server, and then a few
> standalone classes
> which handle the rest.  The problem is then I will never be
> able to test the
> communication class.
>
>   Anyhow I am just rambling now, the basic question is "Does
> anybody know
> how to java servlets with junit".
>
>   cheers
>   Nic
>
>
>         Yahoo! Groups Sponsor
>               ADVERTISEMENT
>
>
>
>
>   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.
>
>
>
> [This message contained attachments]
>
>
>
> ______________________________________________________________
> __________
> ______________________________________________________________
> __________
>
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/

#4273 From: "Bhanu Prakash,ilabs ltd" <bhanu_sistla@...>
Date: Wed Mar 6, 2002 11:08 am
Subject: about teardown
bhanu_sistla@...
Send Email Send Email
 
Hi

My name is Bhanu prakash. i have follwing clarifications.

1) why actuall teardown() method is required.

2) when i call tearDown() method it is making objects as null. though
i am not making the objects as null. what is the reason.

3) how to write a log file if any of them have the code to make the log
file please forword to me.

regards Bhanu

__________________________________________________
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com

#4274 From: Leon Moonen <Leon.Moonen@...>
Date: Wed Mar 6, 2002 11:10 am
Subject: CFP: Workshop on Testing in XP (WTiXP 2002)
leonmoonen
Send Email Send Email
 
[We apologize if you receive multiple copies of this message.]


                   CALL FOR POSITION PAPERS / PARTICIPATION


           Workshop on Testing in Extreme Programming (WTiXP 2002)
                                 May 27, 2002
                           Alghero, Sardinia, Italy

                         http://www.cwi.nl/wtixp2002/

      Workshop in conjunction with the Third International Conference on
       eXtreme Programming and Agile Processes in Software Engineering
                       (XP2002, http://www.xp2002.org)


BACKGROUND

``If there is a technique at the heart of extreme programming (XP), it
is
unit testing'' [1]. As part of their programming activity, XP developers
write and maintain (white box) unit tests continually. These tests are
automated, written in the same programming language as the production
code,
considered an explicit part of the code, and put under revision control.
The XP process encourages writing a test class for every class in the
system. Methods in these test classes are used to verify complicated
functionality and unusual circumstances. Moreover, they are used to
document
code by explicitly indicating what the expected results of a method
should
be for typical cases. Last but not least, tests are added upon receiving
a
bug report to check for the bug and to check the bug fix.

And there is more than unit testing: Acceptance tests (also known as
functional tests in XP terms) are used to prove that the application
works
as the customer wishes. They help the customers to gain confidence that
the
whole product is progressing in the right direction.  Acceptance tests
operate from the customer perspective, they don't test every possible
path
in the code (unit tests take care of that), but demonstrate that the
business value is present. Furthermore, they allow the programmer to
track
the state of implementation in relation to the user written story cards.

OBJECTIVES

The purpose of this workshop is to bring together practitioners,
researchers, academics, and students to discuss the state-of-the-art of
testing in extreme software development projects. The goal is to share
experience, consolidate successful techniques, collect guidelines, and
identify open issues for future work.

Workshop topics include, but are not limited to:
  - Bad smells in testing          - Testing patterns
  - Refactoring test code          - Test first design
  - Automated acceptance testing   - Dealing with testing conflicts
  - Experience reports

SUBMISSIONS

Participants are asked to submit a two page position paper detailing
their
perspective on one or more of the above topics. Detailed technical
descriptions of a special testing technique might be longer, if needed.
Position papers that focus on acceptance testing should include an
overview of the attempted solution strategy, whether it was successful
or
not, what level of automation was reached, how test results are
reported,
how tests are implemented and maintained and who is specifying,
implementing
and running the tests (customer, dedicated tester, developer, automated
build).

The organizers will accept position statements based on originality,
relevance, and suitability for triggering discussion.  Please mail your
submission (in PDF or PS) to Leon Moonen (Leon.Moonen@...).

IMPORTANT DATES

Deadline for submission of position papers:   April 22, 2002
Notification of acceptance:                   May 3, 2002
Workshop date:                                May 27, 2002

WORKSHOP FORMAT

The workshop will be lively and entertaining. It aims at discussion and
interaction rather than presentations. However, all participants will be
given a chance to give a short presentation. These presentations will
serve
to introduce a case study, provoke discussion by presenting a
controversial
point of view, or introduce new points of view. Live presentations of
testing techniques are also highly welcome (in addition to a position
paper). This would open the possibility to take a look at the
implementation, if needed, and discuss the nuts & bolts in more detail.

The workshop opens with an introduction session where participants can
raise
the questions they would like to get addressed in the workshop; in the
concluding wrap up we'll evaluate how far we got in answering these
questions.

All accepted position papers will be published on the workshop page
prior to
the workshop and the participants will be asked to read the papers
before
the workshop.

WORKSHOP ORGANIZERS

Leon Moonen
CWI, the Netherlands
Leon.Moonen@...

Martin Lippert
University of Hamburg & Apcon WPS, Germany
lippert@...

PROGRAM COMMITTEE

There is a small program committee to review the position papers,
give feedback and support the workshop at XP2002

Arie van Deursen (CWI, the Netherlands)
Steve Freeman (M3P, United Kingdom)
Tim Mackinnon (Connextra, United Kingdom)
Gerard Meszaros (ClearStream Consulting, Canada)
Joseph Pelrine (MetaProg, Switzerland)
Stefan Roock (University of Hamburg & Apcon WPS, Germany)
Shaun Smith (ClearStream Consulting, Canada)


References
[1]  K. Beck. Embracing change with extreme programming.
      IEEE Computer, 32(10):70-77, October 1999.

#4275 From: "Ryan P Ripley" <ryan.ripley@...>
Date: Wed Mar 6, 2002 2:07 pm
Subject: RE: about teardown
ryan.ripley@...
Send Email Send Email
 
Hey Bhanu,

Hopefully this helps a bit, my comments are inline with your questions.

1) why actuall teardown() method is required.

Teardown() is used to "clean up" any objects created in the setup().
These objects are generally called fixtures.

Example:

	 void setup() {
		 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
		 myDBConnection =
DriverManager.getConnection("jdbc:odbc:YourDB");
		 mySqlStatement = myDBConnection.createStatement();
		 myResults = mySqlStatement.executeQuery("select * from
foo");
	 }

	 void tearDown() {
		 myDBConnection.close();
		 mySqlStatement.close();
		 myResults.close();
	 }

You are basically just cleaning up objects, note:  this is not only
limited to db connections, this is just an example usage.

2) when i call tearDown() method it is making objects as null. though i
am not making the objects as null. what is the reason.

This is what tearDown() is for.  Object cleanup.  I'm not sure that I
exactly follow the behavior you are seeing...

3) how to write a log file if any of them have the code to make the log
file please forword to me.

I'm currently working on a logging system for JUNIT using log4j.  The
plan is to use this to get the output to a standard log file for metrics
reporting.  I'll keep you posted.

Hope this helps!

	 --Ryan

BTW:  Java Tools For Extreme Programming by Hightower and Lesiecki has a
great introduction to junit, as does the junit site, www.junit.org.

Good luck.

#4276 From: Jason Rogers <jacaetev@...>
Date: Wed Mar 6, 2002 2:21 pm
Subject: Re: about teardown
jacaetev
Send Email Send Email
 
Bhanu,

There is something called an archive search on all Yahoo! groups (to which you
have access for any group you are signed onto, like JUnit --
http://groups.yahoo.com/group/junit) and came up with the following emails from
you...

None of the questions in your emails are dumb questions... in fact they have
all been asked numerous times (some more than others).  The reason I am going
to all of this trouble to point out your various posts is to make it clear to
you that you can search the archives as well.  There is a wealth of knowledge
there!  Asking a question is never "bad" per se, it's just that it would be
more considerate of you to search the archives (and even the Wiki --
http://c2.com/cgi/wiki?JavaUnit) first, rather than reposting the same old
questions to the list every time.

I hope you aren't offended by this, but rather that you take the opportunity to
learn how to more effectively use the list.  You can also read about how to ask
questions the smart way at http://www.tuxedo.org/~esr/faqs/smart-questions.html

=jason

************************************

Hi

My name is Bhanu prakash. i have follwing clarifications.

1) why actuall teardown() method is required.

2) when i call tearDown() method it is making objects as null. though
i am not making the objects as null. what is the reason.

3) how to write a log file if any of them have the code to make the log
file please forword to me.

regards Bhanu

----

hello
my name is bhanu. i have following clarifications
1) is their any tool for unit testing other than junit. which is free
2) is their any tool which can be used system testing
regarads
Bhanu

----

hi friends

i have not able to do the following task which are as follows.

1) how to catch errors in junit. what i mean is how to create a log file.
if any body have the code please mail to me its urgent.
2) how to check the private methods in java. for example i have a
private int a()
{}
private int b()
{}
public void c ()
{
a();
b();
}
how to write a test case.

3) are their any web testing tools which are free,
4) are their any testing tools for integrating test, stress testing in
fact system testing
regards
Bhanu
--
Bhanu Prakash

----

hi friends
just i have a small things to ask
1) how to test private methods
2) how to catch test result and store in the file. please if any body
have the program please send me as attachment.
3) how to test the methods with return the arraylist and object

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

__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

#4277 From: Sam Wilson <numbsafari@...>
Date: Wed Mar 6, 2002 3:55 pm
Subject: Re: NullPointerException with TestRunner
numbsafari
Send Email Send Email
 
Hey,

Thanks for the reply and the results. I think this'll
help.

I did do a search on Yahoo groups, and I did read the
e-mail I received when I first signed up. However, my
search results did not return the two messages you
sent to me. I think we were using two different search
criteria. I first searched for NullPointerException
which returns far too many messages to read. I then
searched for "java.lang.reflect.Method.invoke" which,
while it is contained in both of the messages you
listed, returns a list that does not include either of
the messages. Oh well...

Anyhow, it looks as though the issue was resolved way
back in August... I don't know if you're involved with
J/Unit development, but I'm curious why if it is known
that a particular use-case causes a
NullPointerException to be thrown, a better error
message is not returned (such as, "Please make sure
suiteMethod is static in class XXX"). That would make
things a little more robust, and definately more user
friendly.

Once again, thanks for the reference.


Sam W

--- Vladimir Bossicard <vladimir@...> wrote:
> A really quick search on yahoogroups gives...
>
> a similar question:
> http://groups.yahoo.com/group/junit/message/2417
>
> and its answer:
> http://groups.yahoo.com/group/junit/message/2442
>
> Please first read the mail you received when you
> joined the group (today
> according to yahoogroups): it gives you useful
> information on where to
> search for information (already asked questions...)
> before sending an
> email to 1,795 users.
>
> -Vladimir
>
> --
> Vladimir Bossicard
> www.bossicard.com
>
>


__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

Messages 4248 - 4277 of 24387   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