You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(80) |
Nov
(42) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(11) |
Feb
(50) |
Mar
(70) |
Apr
(102) |
May
(28) |
Jun
(45) |
Jul
(14) |
Aug
(75) |
Sep
(17) |
Oct
(15) |
Nov
(11) |
Dec
(4) |
2003 |
Jan
(16) |
Feb
(19) |
Mar
(21) |
Apr
(20) |
May
(29) |
Jun
(7) |
Jul
(5) |
Aug
|
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(3) |
2004 |
Jan
(5) |
Feb
(4) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
(7) |
Aug
(1) |
Sep
(6) |
Oct
(6) |
Nov
(1) |
Dec
(2) |
2005 |
Jan
(4) |
Feb
(4) |
Mar
(15) |
Apr
(1) |
May
|
Jun
(4) |
Jul
(6) |
Aug
(6) |
Sep
|
Oct
(4) |
Nov
(2) |
Dec
(4) |
2006 |
Jan
|
Feb
(91) |
Mar
(47) |
Apr
(7) |
May
(4) |
Jun
(9) |
Jul
(1) |
Aug
|
Sep
(5) |
Oct
(36) |
Nov
(95) |
Dec
(12) |
2007 |
Jan
(11) |
Feb
(31) |
Mar
(45) |
Apr
(11) |
May
(9) |
Jun
(1) |
Jul
(146) |
Aug
(15) |
Sep
|
Oct
(3) |
Nov
(6) |
Dec
(1) |
2008 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(3) |
Jul
(2) |
Aug
(19) |
Sep
(1) |
Oct
(10) |
Nov
|
Dec
(8) |
2009 |
Jan
(3) |
Feb
(1) |
Mar
(4) |
Apr
(8) |
May
(5) |
Jun
(4) |
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
(13) |
Nov
(13) |
Dec
(4) |
2010 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
(2) |
May
|
Jun
(1) |
Jul
(3) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2011 |
Jan
(1) |
Feb
(4) |
Mar
(3) |
Apr
(4) |
May
|
Jun
(12) |
Jul
(16) |
Aug
(4) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
From: ozkan g. <ozk...@ho...> - 2005-12-28 19:49:40
|
Hello, i am using netbeans 4.1 on Linux system, i am trying to write a multithreaded junit test using "Package com.mousepushers.junit" . i have succesfully completed my test in my ide , junit3.8.1 is automaticly comes with my ide , i integrated MTJunit.jar in my test libraries and it's done. BUT when i am trying to do this in the Konsole without using netbeans, i can't do it, after i put the CLASSPATH i can compile my code, but when i write "java -cp <path> MYTEST" it says "Exception in thread "main" java.lang.NoClassDefFoundError: MYTEST" thanks, from a newbie... <html><div><P align=right><FONT color=#000066 size=1><STRONG>Özkan Gümüþ <BR>Galatasaray Üniversitesi <BR>Bilgisayar Mühendisliði, Fit 4</STRONG></FONT></P></div></html> _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ |
From: ozkan g. <ozk...@ho...> - 2005-12-28 19:49:39
|
Hello, i am using netbeans 4.1 on Linux system, i am trying to write a multithreaded junit test using "Package com.mousepushers.junit" . i have succesfully completed my test in my ide , junit3.8.1 is automaticly comes with my ide , i integrated MTJunit.jar in my test libraries and it's done. BUT when i am trying to do this in the Konsole without using netbeans, i can't do it, after i put the CLASSPATH i can compile my code, but when i write "java -cp <path> MYTEST" it says "Exception in thread "main" java.lang.NoClassDefFoundError: MYTEST" thanks, from a newbie... <html><div><P align=right><FONT color=#000066 size=1><STRONG>Özkan Gümüþ <BR>Galatasaray Üniversitesi <BR>Bilgisayar Mühendisliði, Fit 4</STRONG></FONT></P></div></html> _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ |
From: william k. <wil...@re...> - 2005-12-04 07:44:28
|
=A0Hi, =0AI am new to open sources I wish to contribute code to this open = source.=0ACan any let me know where i need to start?=0AThanks in advance=0A= William Kane=0A |
From: Jon S. <Jon...@cl...> - 2005-11-22 14:11:39
|
Hi all, I've been looking through the V4 sources, and have a number of issues with the design. Now, what's in CVS is clearly not in a "finished" state - is it reasonable to assume that things have progressed behind the scenes? Or would a critique of the current CVS tree be useful? I'd really like to try to make a difference *before* V4 becomes more concrete :) Jon Clearswift monitors, controls and protects all its messaging traffic in com= pliance with its corporate email policy using Clearswift products. Find out more about Clearswift, its solutions and services at http://www.cl= earswift.com This communication is confidential and may contain privileged information i= ntended solely for the named addressee(s). It may not be used or disclosed = except for the purpose for which it has been sent. If you are not the inten= ded recipient, you must not copy, distribute or take any action in reliance= on it. Unless expressly stated, opinions in this message are those of the = individual sender and not of Clearswift. If you have received this communic= ation in error, please notify Clearswift by emailing su...@cl...= quoting the sender and delete the message and any attached documents. Clea= rswift accepts no liability or responsibility for any onward transmission o= r use of emails and attachments having left the Clearswift domain. This footnote confirms that this email message has been swept by MIMEsweepe= r for Content Security threats, including computer viruses. |
From: Jon S. <Jon...@cl...> - 2005-11-18 14:10:47
|
I apologise if this has come up before - I've looked through the archives, and can't find anything there... Is anything planned in JUnit4 to mirror the Category attribute in NUnit? For those who haven't used NUnit, this is an attribute which allows you to classify a test fixture (test class). You can then tell NUnit to exclude certain categories or include certain categories. In my job, we're currently experimenting with the best way of developers running tests across many different projects and platforms, and ways of including system tests written using unit test tools. I *think* categories would really help here, although I'm more than willing to be told why there are better alternatives. I haven't had a good look at JUnit4 yet, but I'd be more than willing to help out with the implementation of such a feature - it really shouldn't be particularly hard. Jon Skeet Clearswift monitors, controls and protects all its messaging traffic in com= pliance with its corporate email policy using Clearswift products. Find out more about Clearswift, its solutions and services at http://www.cl= earswift.com This communication is confidential and may contain privileged information i= ntended solely for the named addressee(s). It may not be used or disclosed = except for the purpose for which it has been sent. If you are not the inten= ded recipient, you must not copy, distribute or take any action in reliance= on it. Unless expressly stated, opinions in this message are those of the = individual sender and not of Clearswift. If you have received this communic= ation in error, please notify Clearswift by emailing su...@cl...= quoting the sender and delete the message and any attached documents. Clea= rswift accepts no liability or responsibility for any onward transmission o= r use of emails and attachments having left the Clearswift domain. This footnote confirms that this email message has been swept by MIMEsweepe= r for Content Security threats, including computer viruses. |
From: Patni, S. <san...@hp...> - 2005-10-12 22:41:34
|
I'm new to Junit. Has anyone used Junit with BEA Weblogic workshop IDE. I could not find BEA Weblogic workshop in the IDE list on junit.org. Any pointers would be of good help. Thanks, Sanjay |
From: Vasant M. <VMa...@if...> - 2005-10-11 15:11:46
|
Just a piece of update: I am aware that ANT support JUnit task in which I can format the test = report. But, I am running these test cases in Eclipse and are bundled as plugins. = So, I use the JUnit Eclipse framework for invoking these test cases and = ANT Junit task. What I am looking for is an equivalent of ANT JUnit task for Eclipse = plugin tests which will create a report for me. Thanks, Vasant. >>> "Vasant Marathe" <VMa...@if...> 10/11/2005 9:58:21 AM >>> Hi Everybody, I am running my test cases using a batch ANT file. At the end of the run, = is there a way to create a test report in XML or HTML format? Thanks, Vasant. ----------------------------------------- Email messages cannot be guaranteed to be secure or error-free as transmitted information can be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The Centers for Medicare & Medicaid Services therefore does not accept liability for any error or omissions in the contents of this message which arise as a result of email transmission. ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl=20 _______________________________________________ Junit-devel mailing list Jun...@li...=20 https://lists.sourceforge.net/lists/listinfo/junit-devel |
From: Monica T. <jav...@ya...> - 2005-10-11 15:11:30
|
Hi < Please remove me from your list. Thank you --------------------------------- Yahoo! Music Unlimited - Access over 1 million songs. Try it free. |
From: Vasant M. <VMa...@if...> - 2005-10-11 15:00:52
|
Hi Everybody,=0D=0A=0D=0AI am running my test cases using a batch ANT file= =2E At the end of the run, is there a way to create a test report in XML or= HTML format?=0D=0A=0D=0AThanks,=0D=0AVasant=2E=0D=0A=0D=0A=0D=0A---------= --------------------------------=0D=0AEmail messages cannot be guaranteed t= o be secure or error-free as=0D=0Atransmitted information can be intercepte= d, corrupted, lost, destroyed,=0D=0Aarrive late or incomplete, or contain v= iruses=2E The Centers for=0D=0AMedicare & Medicaid Services therefore does= not accept liability for=0D=0Aany error or omissions in the contents of th= is message which arise as a=0D=0Aresult of email transmission=2E=0D=0A |
From: Stephen K. <Ste...@or...> - 2005-08-16 06:28:52
|
Ok, then part of the fix/change would also be a two-part exception to output setUp and tearDown exceptions in one bundle. I reckon tearDown() is the big finally() block that you'd usually write. You have to figure out what has successfully opened. Other data rollback issues ( that I presume you're talking about), are not really covered in the scope of tearDown() in the docs: "Override tearDown <http://junit.sourceforge.net/javadoc/junit/framework/TestCase.html#tearDown%28%29>() to release any permanent resources you allocated in setUp." In any case, going after that "hell of a bug" would be very much akin to going after the one that currently exists. Both could be non-intuitive, but I think we should at least attempt a tearDown [of course]. Cheers Stephen Dean Hiller wrote: > oh, whoops, I got that issue confused with another one....yes you are > right. > I personally am not sure.....I could go either way on that one....At > least if setUp fails and tearDown is going to fail, the setup > exceptoin would be reported first if the change was made, allowing a > try at teardown which in most cases will probably fail IMO. or at > least, I have many tests that would, but that's okay, because the > setUp exception would be propagated and not the teardown one anyways. > In fact, it may be a false sense of teardown in many cases where you > think it ran through all of teardown when it did not.....that would be > a hell of a bug to go after. I am on fence. > dean > > Stephen Kestle wrote: > >> Does not look like it - I've updated to version 1.18.2.2 (kbeck on 2 >> June 05): >> >> public void runBare() throws *Throwable *{ >> Throwable exception= null; >> * setUp();* >> try { >> runTest(); >> } catch (Throwable running) { >> exception= running; >> } >> *finally *{ >> try { >> *tearDown*(); >> } catch (Throwable tearingDown) { >> if (exception == null) exception= tearingDown; >> } >> } >> if (exception != null) throw exception; >> } >> >> Cheers >> >> Stephen >> >> Dean Hiller wrote: >> >>> I believe this fix is in the head of CVS. It is just not released. >>> You can build your own version of JUnit from CVS which has the fix. >>> dean >>> >>> Stephen Kestle wrote: >>> >>>> This has been partially covered before, but I think the logic was >>>> inadequate. In summary, Dean Hiller had a problem where his >>>> setUp() was failing: >>>> >>>>> I notice the unit test in >>>>> junit.tests.framework.TestCaseTest.testTearDownSetupFails() >>>>> specifically is written to show that an Exception in setUp() does >>>>> not call tearDown(). >>>>> >>>>> Is there a reason for this? >>>> >>>> >>>> >>>> >>>> Kent Beck replied with: >>>> >>>>> Thank you for submitting your patch. The current behavior is >>>>> deliberate. >>>>> My reasoning for the current behavior is that if setUp() fail, >>>>> then tearDown() is useless. SetUp() should never fail. If it does, >>>>> the whole premise of the test is false. Do you have concrete >>>>> examples where tearDown() would be useful even if setUp() fail? >>>> >>>> >>>> >>>> >>>> Dean Hiller then explained about his database problem to ensure >>>> consistency. We have the same problem, and I think that Kent's >>>> position is a bit short-sighted. >>>> >>>> To back up my claim, I searched for what tearDown() is meant for. >>>> It surprised me that it was not used in any of the "test infected" >>>> or "JUnit Cooks tour", or even the "Cookbook" - it is obviously >>>> intended for advanced usage. In the Cookbook however, it states: >>>> >>>> "Override tearDown >>>> <http://junit.sourceforge.net/javadoc/junit/framework/TestCase.html#tearDown%28%29>() >>>> to release any permanent resources you allocated in setUp." >>>> >>>> The problem here is that if you are allocating permanent resources >>>> in setUp, you generally have absolutely no guarantee that they will >>>> be created correctly or without exception. Therefore, you cannot >>>> assume that setUp() will not fail. >>>> >>>> Furthermore, since setUp() is almost always enough for a [unit] >>>> test, tearDown() should be considered advanced usage, and there >>>> will be no ill side-effects of having it run in 99% of test cases. >>>> The tests that the code change will affect will probably want it to >>>> be the case anyhow. >>>> >>>> Essentially, for our database tests, our fixture must ensure that >>>> there are certain records that our tested (persistence) objects are >>>> able to access correctly. >>>> >>>> Please fix this - we can hack around it for the mo, but it's pretty >>>> dumb. >>>> >>>> Cheers >>>> >>>> Stephen >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> SF.Net email is Sponsored by the Better Software Conference & EXPO >>>> September 19-22, 2005 * San Francisco, CA * Development Lifecycle >>>> Practices >>>> Agile & Plan-Driven Development * Managing Projects & Teams * >>>> Testing & QA >>>> Security * Process Improvement & Measurement * >>>> http://www.sqe.com/bsce5sf >>>> _______________________________________________ >>>> Junit-devel mailing list >>>> Jun...@li... >>>> https://lists.sourceforge.net/lists/listinfo/junit-devel >>> >>> >>> >>> > |
From: Dean H. <de...@xs...> - 2005-08-16 05:58:07
|
oh, whoops, I got that issue confused with another one....yes you are right. I personally am not sure.....I could go either way on that one....At least if setUp fails and tearDown is going to fail, the setup exceptoin would be reported first if the change was made, allowing a try at teardown which in most cases will probably fail IMO. or at least, I have many tests that would, but that's okay, because the setUp exception would be propagated and not the teardown one anyways. In fact, it may be a false sense of teardown in many cases where you think it ran through all of teardown when it did not.....that would be a hell of a bug to go after. I am on fence. dean Stephen Kestle wrote: > Does not look like it - I've updated to version 1.18.2.2 (kbeck on 2 > June 05): > > public void runBare() throws *Throwable *{ > Throwable exception= null; > * setUp();* > try { > runTest(); > } catch (Throwable running) { > exception= running; > } > *finally *{ > try { > *tearDown*(); > } catch (Throwable tearingDown) { > if (exception == null) exception= tearingDown; > } > } > if (exception != null) throw exception; > } > > Cheers > > Stephen > > Dean Hiller wrote: > >> I believe this fix is in the head of CVS. It is just not released. >> You can build your own version of JUnit from CVS which has the fix. >> dean >> >> Stephen Kestle wrote: >> >>> This has been partially covered before, but I think the logic was >>> inadequate. In summary, Dean Hiller had a problem where his setUp() >>> was failing: >>> >>>> I notice the unit test in >>>> junit.tests.framework.TestCaseTest.testTearDownSetupFails() >>>> specifically is written to show that an Exception in setUp() does >>>> not call tearDown(). >>>> >>>> Is there a reason for this? >>> >>> >>> >>> Kent Beck replied with: >>> >>>> Thank you for submitting your patch. The current behavior is >>>> deliberate. >>>> My reasoning for the current behavior is that if setUp() fail, then >>>> tearDown() is useless. SetUp() should never fail. If it does, the >>>> whole premise of the test is false. Do you have concrete examples >>>> where tearDown() would be useful even if setUp() fail? >>> >>> >>> >>> Dean Hiller then explained about his database problem to ensure >>> consistency. We have the same problem, and I think that Kent's >>> position is a bit short-sighted. >>> >>> To back up my claim, I searched for what tearDown() is meant for. >>> It surprised me that it was not used in any of the "test infected" >>> or "JUnit Cooks tour", or even the "Cookbook" - it is obviously >>> intended for advanced usage. In the Cookbook however, it states: >>> >>> "Override tearDown >>> <http://junit.sourceforge.net/javadoc/junit/framework/TestCase.html#tearDown%28%29>() >>> to release any permanent resources you allocated in setUp." >>> >>> The problem here is that if you are allocating permanent resources >>> in setUp, you generally have absolutely no guarantee that they will >>> be created correctly or without exception. Therefore, you cannot >>> assume that setUp() will not fail. >>> >>> Furthermore, since setUp() is almost always enough for a [unit] >>> test, tearDown() should be considered advanced usage, and there will >>> be no ill side-effects of having it run in 99% of test cases. The >>> tests that the code change will affect will probably want it to be >>> the case anyhow. >>> >>> Essentially, for our database tests, our fixture must ensure that >>> there are certain records that our tested (persistence) objects are >>> able to access correctly. >>> >>> Please fix this - we can hack around it for the mo, but it's pretty >>> dumb. >>> >>> Cheers >>> >>> Stephen >>> >>> >>> >>> >>> ------------------------------------------------------- >>> SF.Net email is Sponsored by the Better Software Conference & EXPO >>> September 19-22, 2005 * San Francisco, CA * Development Lifecycle >>> Practices >>> Agile & Plan-Driven Development * Managing Projects & Teams * >>> Testing & QA >>> Security * Process Improvement & Measurement * >>> http://www.sqe.com/bsce5sf >>> _______________________________________________ >>> Junit-devel mailing list >>> Jun...@li... >>> https://lists.sourceforge.net/lists/listinfo/junit-devel >> >> >> |
From: Stephen K. <Ste...@or...> - 2005-08-16 05:36:45
|
Does not look like it - I've updated to version 1.18.2.2 (kbeck on 2 June 05): public void runBare() throws *Throwable *{ Throwable exception= null; * setUp();* try { runTest(); } catch (Throwable running) { exception= running; } *finally *{ try { *tearDown*(); } catch (Throwable tearingDown) { if (exception == null) exception= tearingDown; } } if (exception != null) throw exception; } Cheers Stephen Dean Hiller wrote: > I believe this fix is in the head of CVS. It is just not released. > You can build your own version of JUnit from CVS which has the fix. > dean > > Stephen Kestle wrote: > >> This has been partially covered before, but I think the logic was >> inadequate. In summary, Dean Hiller had a problem where his setUp() >> was failing: >> >>> I notice the unit test in >>> junit.tests.framework.TestCaseTest.testTearDownSetupFails() >>> specifically is written to show that an Exception in setUp() does >>> not call tearDown(). >>> >>> Is there a reason for this? >> >> >> >> Kent Beck replied with: >> >>> Thank you for submitting your patch. The current behavior is >>> deliberate. >>> My reasoning for the current behavior is that if setUp() fail, then >>> tearDown() is useless. SetUp() should never fail. If it does, the >>> whole premise of the test is false. Do you have concrete examples >>> where tearDown() would be useful even if setUp() fail? >> >> >> >> Dean Hiller then explained about his database problem to ensure >> consistency. We have the same problem, and I think that Kent's >> position is a bit short-sighted. >> >> To back up my claim, I searched for what tearDown() is meant for. It >> surprised me that it was not used in any of the "test infected" or >> "JUnit Cooks tour", or even the "Cookbook" - it is obviously intended >> for advanced usage. In the Cookbook however, it states: >> >> "Override tearDown >> <http://junit.sourceforge.net/javadoc/junit/framework/TestCase.html#tearDown%28%29>() >> to release any permanent resources you allocated in setUp." >> >> The problem here is that if you are allocating permanent resources in >> setUp, you generally have absolutely no guarantee that they will be >> created correctly or without exception. Therefore, you cannot assume >> that setUp() will not fail. >> >> Furthermore, since setUp() is almost always enough for a [unit] test, >> tearDown() should be considered advanced usage, and there will be no >> ill side-effects of having it run in 99% of test cases. The tests >> that the code change will affect will probably want it to be the case >> anyhow. >> >> Essentially, for our database tests, our fixture must ensure that >> there are certain records that our tested (persistence) objects are >> able to access correctly. >> >> Please fix this - we can hack around it for the mo, but it's pretty >> dumb. >> >> Cheers >> >> Stephen >> >> >> >> >> ------------------------------------------------------- >> SF.Net email is Sponsored by the Better Software Conference & EXPO >> September 19-22, 2005 * San Francisco, CA * Development Lifecycle >> Practices >> Agile & Plan-Driven Development * Managing Projects & Teams * Testing >> & QA >> Security * Process Improvement & Measurement * >> http://www.sqe.com/bsce5sf >> _______________________________________________ >> Junit-devel mailing list >> Jun...@li... >> https://lists.sourceforge.net/lists/listinfo/junit-devel > > > |
From: Dean H. <de...@xs...> - 2005-08-16 05:07:11
|
I believe this fix is in the head of CVS. It is just not released. You can build your own version of JUnit from CVS which has the fix. dean Stephen Kestle wrote: > This has been partially covered before, but I think the logic was > inadequate. In summary, Dean Hiller had a problem where his setUp() > was failing: > >> I notice the unit test in >> junit.tests.framework.TestCaseTest.testTearDownSetupFails() >> specifically is written to show that an Exception in setUp() does not >> call tearDown(). >> >> Is there a reason for this? > > > Kent Beck replied with: > >> Thank you for submitting your patch. The current behavior is deliberate. >> My reasoning for the current behavior is that if setUp() fail, then >> tearDown() is useless. SetUp() should never fail. If it does, the >> whole premise of the test is false. Do you have concrete examples >> where tearDown() would be useful even if setUp() fail? > > > Dean Hiller then explained about his database problem to ensure > consistency. We have the same problem, and I think that Kent's > position is a bit short-sighted. > > To back up my claim, I searched for what tearDown() is meant for. It > surprised me that it was not used in any of the "test infected" or > "JUnit Cooks tour", or even the "Cookbook" - it is obviously intended > for advanced usage. In the Cookbook however, it states: > > "Override tearDown > <http://junit.sourceforge.net/javadoc/junit/framework/TestCase.html#tearDown%28%29>() > to release any permanent resources you allocated in setUp." > > The problem here is that if you are allocating permanent resources in > setUp, you generally have absolutely no guarantee that they will be > created correctly or without exception. Therefore, you cannot assume > that setUp() will not fail. > > Furthermore, since setUp() is almost always enough for a [unit] test, > tearDown() should be considered advanced usage, and there will be no > ill side-effects of having it run in 99% of test cases. The tests > that the code change will affect will probably want it to be the case > anyhow. > > Essentially, for our database tests, our fixture must ensure that > there are certain records that our tested (persistence) objects are > able to access correctly. > > Please fix this - we can hack around it for the mo, but it's pretty dumb. > > Cheers > > Stephen > > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing > & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Junit-devel mailing list > Jun...@li... > https://lists.sourceforge.net/lists/listinfo/junit-devel |
From: Stephen K. <Ste...@or...> - 2005-08-16 05:02:50
|
This has been partially covered before, but I think the logic was inadequate. In summary, Dean Hiller had a problem where his setUp() was failing: > I notice the unit test in > junit.tests.framework.TestCaseTest.testTearDownSetupFails() > specifically is written to show that an Exception in setUp() does not > call tearDown(). > > Is there a reason for this? Kent Beck replied with: > Thank you for submitting your patch. The current behavior is deliberate. > My reasoning for the current behavior is that if setUp() fail, then > tearDown() is useless. SetUp() should never fail. If it does, the > whole premise of the test is false. Do you have concrete examples > where tearDown() would be useful even if setUp() fail? Dean Hiller then explained about his database problem to ensure consistency. We have the same problem, and I think that Kent's position is a bit short-sighted. To back up my claim, I searched for what tearDown() is meant for. It surprised me that it was not used in any of the "test infected" or "JUnit Cooks tour", or even the "Cookbook" - it is obviously intended for advanced usage. In the Cookbook however, it states: "Override tearDown <http://junit.sourceforge.net/javadoc/junit/framework/TestCase.html#tearDown%28%29>() to release any permanent resources you allocated in setUp." The problem here is that if you are allocating permanent resources in setUp, you generally have absolutely no guarantee that they will be created correctly or without exception. Therefore, you cannot assume that setUp() will not fail. Furthermore, since setUp() is almost always enough for a [unit] test, tearDown() should be considered advanced usage, and there will be no ill side-effects of having it run in 99% of test cases. The tests that the code change will affect will probably want it to be the case anyhow. Essentially, for our database tests, our fixture must ensure that there are certain records that our tested (persistence) objects are able to access correctly. Please fix this - we can hack around it for the mo, but it's pretty dumb. Cheers Stephen |
From: J. D. B. <jd...@ge...> - 2005-08-15 21:04:10
|
I peeked at the junit 4 work in progress in CVS. I was glad to see the assertEquals method for arrays of Objects, since I've always added it to my own subclass. I've found it useful to include the differing expected and actual element in the failure message (including String compaction), as well as its index number. For example: public static void assertEquals(String message, Object[] expected, Object[] actual) { if (expected == actual) return; if (expected == null) fail(messageOrNull(message) + "expected array was null"); if (actual == null) fail(messageOrNull(message) + "actual array was null"); assertEquals(messageOrNull(message) + "array length", expected.length, actual.length); for (int i = 0; i < expected.length; i++) { assertEquals(messageOrNull(message) + "array element " + i, expected[i], actual[i]); } } private static String messageOrNull(String message) { return message == null ? "" : message + ": "; } I'd also like to suggest adding assertEquals methods for all primitive array types. Unfortunately having the primitive array signatures requires some duplicate code in the method bodies, but it's better than duplicating that code in the TestCase subclasses. Looking forward to trying out junit 4. Thanks for junit 3! Cheers, 11011011 |
From: Barrie T. <bae...@gm...> - 2005-07-21 21:35:53
|
You would do better asking an eclipse forum not the junit forum. On 7/20/05, andreas140983 <and...@li...> wrote: > Hi, > I'm creating a plugin that in one of its functionalities when an user pus= h a button it create a project in the workspace and inside this project it = create a class Java called TestExample.java. > Now the user can insert here his tests(these test must be consistent to t= he junit code) and in a second moment when the user push another button my = plugin try to execute these test. >=20 > My problem is the way in which sending in execution these tests because I= don't know which command I must insert in my code. >=20 > I try with this code: > IProject iprj=3DResourcesPlugin.getWorkspace().getRoot().getProject(name = of the project); > IContainer container=3D(IContainer)iprj; > IFile f=3Dcontainer.getFile(new Path("TestExample.java")); >=20 > But at this point I must call the JUnit code! >=20 > The JUnit code that I suppose must to be used is: > junit.textui.TestRunner.run(java.lang.Class testClass) >=20 > The problem now is: how obtain the correct class to insert like parameter= inside to the code over? >=20 > It is correct my idea? Can anyone help me? >=20 >=20 >=20 >=20 > ____________________________________________________________ > Libero Flat, sempre a 4 Mega a 19,95 euro al mese! > Abbonati subito su http://www.libero.it >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick > _______________________________________________ > Junit-devel mailing list > Jun...@li... > https://lists.sourceforge.net/lists/listinfo/junit-devel > |
From: Cory F. <Cor...@mo...> - 2005-07-21 20:27:30
|
Hi All, Found a typo in the Test Infected paper. Page 8 for me, close to the Testing Practices section in the testSimplify method: public void testSimplify() { // {[12 CHF][7 USD]} + [-12 CHF] == [7 USD] Money expected= new Money(7, "USD"); Assert.assertEquals(expected, fMS1.add(new Money(-12, "CHF"))); } the fMS1 should be fMB1, since that is the variable declared in setUp(): public void testSimplify() { // {[12 CHF][7 USD]} + [-12 CHF] == [7 USD] Money expected= new Money(7, "USD"); Assert.assertEquals(expected, fMB1.add(new Money(-12, "CHF"))); } Cory |
From: andreas140983 <and...@li...> - 2005-07-21 11:58:15
|
I want to run a test by passing a file. In other words I have a File: =0D = IFile f=3D//file assigned here; File javaFile=3D f.getLocation().toFile(= ); This file is an extension of TestCase class and it contains some te= sts . Now if I use TestRunner for launch this file, I don't say if there = is a method for run these tests by passing a file. I have tried with t= his: TestRunner.run(javaFile.getClass); This code is erroneous becaus= e javaFile.getClass return a java.io.File element and not what I want to = pass! Eclipse when I run this code return me this code: "There was 1 fai= lure: 1) warning(junit.framework.TestSuite$1)junit.framework.AssertionFa= iledError: No tests found in java.io.File" Anyone can help me? How I c= an run my tests passing a file? Thanks, Andrea=0A=0A=0A=0A____________= ________________________________________________=0A6X velocizzare la tua = navigazione a 56k? 6X Web Accelerator di Libero!=0AScaricalo su INTERNET = GRATIS 6X http://www.libero.it=0A |
From: andreas140983 <and...@li...> - 2005-07-20 13:01:58
|
Hi, I'm creating a plugin that in one of its functionalities when an use= r push a button it create a project in the workspace and inside this proj= ect it create a class Java called TestExample.java. Now the user can ins= ert here his tests(these test must be consistent to the junit code) and i= n a second moment when the user push another button my plugin try to exec= ute these test. My problem is the way in which sending in execution th= ese tests because I don't know which command I must insert in my code.=0D = I try with this code: IProject iprj=3DResourcesPlugin.getWorkspace().g= etRoot().getProject(name of the project); IContainer container=3D(IConta= iner)iprj; IFile f=3Dcontainer.getFile(new Path("TestExample.java"));=0D = But at this point I must call the JUnit code! The JUnit code that I = suppose must to be used is: junit.textui.TestRunner.run(java.lang.Class = testClass) The problem now is: how obtain the correct class to insert = like parameter inside to the code over? It is correct my idea? Can any= one help me? =0A=0A=0A=0A_______________________________________________= _____________=0ALibero Flat, sempre a 4 Mega a 19,95 euro al mese! =0AAbb= onati subito su http://www.libero.it=0A=0A |
From: Barrie T. <bae...@gm...> - 2005-07-19 21:26:30
|
There is already a plugin for Eclipse that runs Junit continously in the background. This may not be the plugin but you should be able to find it by going to the Eclipse home page and finding the plugin pages. http://www.eclipseplugincentral.com/Web_Links+index-req-viewlink-cid-294.ht= ml If you still need to write your own plugin you can use this one as guidance= . Bae On 7/19/05, andreas140983 <and...@li...> wrote: > I'm creating a plugin for Eclipse IDE that do this: > - the user write the test inside a class called TestExample (this class e= xtends TestCase class). > This class is located at this path: > C:\eclipse\runtime-workbench-workspace\wd\adaptation\TestExample.java. >=20 > - after the user write his tests my plugin must run these. My problem is = that I don't know how to load this class in my plugin code and after this, = to run all the test written from the user. > The code of my plugin is located at this path: > C:\eclipse\workspace\testing\src\testing\actions\SelfTestingAction.java >=20 > I have tried with the ClassLoaderTestCase with this code: >=20 > TestCaseClassLoader cl=3D new TestCaseClassLoader(Path of file TestExampl= e); >=20 > But in this way the compiler return me that: > java.lang.ClassNotFoundException: TestExample >=20 > My real problem is that I don't say how to use a Class element to run the= test defined from the user!!! > This is the intial code that I had wrote(not correct): >=20 > IFile f=3Dcontainer.getFile(new Path("adaptation/TestExample.java")); > \\this is a command of eclipse for return the file that I would \\run > Class c=3D f.getClass(); > junit.textui.TestRunner.run(c); >=20 > Anyone can help me? >=20 > Excuse me for my bad English but I come from Italy! >=20 > Thanks, Andrea >=20 >=20 >=20 > ____________________________________________________________ > 6X velocizzare la tua navigazione a 56k? 6X Web Accelerator di Libero! > Scaricalo su INTERNET GRATIS 6X http://www.libero.it >=20 >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick > _______________________________________________ > Junit-devel mailing list > Jun...@li... > https://lists.sourceforge.net/lists/listinfo/junit-devel > |
From: andreas140983 <and...@li...> - 2005-07-19 11:12:10
|
I'm creating a plugin for Eclipse IDE that do this: - the user write the= test inside a class called TestExample (this class extends TestCase clas= s). This class is located at this path: C:\eclipse\runtime-workbench-w= orkspace\wd\adaptation\TestExample.java. - after the user write his te= sts my plugin must run these. My problem is that I don't know how to load= this class in my plugin code and after this, to run all the test written= from the user. The code of my plugin is located at this path: C:\eclip= se\workspace\testing\src\testing\actions\SelfTestingAction.java I have= tried with the ClassLoaderTestCase with this code: TestCaseClassLoade= r cl=3D new TestCaseClassLoader(Path of file TestExample); But in this= way the compiler return me that: java.lang.ClassNotFoundException: Test= Example My real problem is that I don't say how to use a Class element= to run the test defined from the user!!! This is the intial code that I= had wrote(not correct): IFile f=3Dcontainer.getFile(new Path("adaptat= ion/TestExample.java")); \\this is a command of eclipse for return the f= ile that I would \\run Class c=3D f.getClass(); junit.textui.TestRunner= .run(c); Anyone can help me? Excuse me for my bad English but I com= e from Italy! Thanks, Andrea=0A=0A=0A=0A______________________________= ______________________________=0A6X velocizzare la tua navigazione a 56k?= 6X Web Accelerator di Libero!=0AScaricalo su INTERNET GRATIS 6X http://w= ww.libero.it=0A |
From: Olivier D. <Oli...@pw...> - 2005-06-30 21:41:13
|
Hi, =20 I am confused too. To the default 3 categories =20 1. passed 2. failed 3. error =20 IMHO we should add =20 4. skipped : I guess this is what Marc is proposing. Based on some = condition (java environment variable or anything else) the test is = skipped. It is neither passed, failed or error so if we have an ANT task = the task does not fail because of a skipped test. The simplest way to = obtain this result as we don't want to use annotation for old JVMs is to = assign one JUnit exception to this, let's call is TestSkippedException. = It is the responsibility of the developer to decide if the test must be = skipped or not =20 5. not implemented. Yes we can use TODOs to mark the tests as to be = coded but having a good summary coming from the test runner can be a = good motivation to do the required work. Once again, the simplest solution is a Junit exception, let's call = is TestNotImplementedException. Same behavior, a the test runner does = not "fail" if a test is not implemented =20 Regarding the other thread = http://sourceforge.net/mailarchive/forum.php?thread_id=3D6440865 = <http://sourceforge.net/mailarchive/forum.php?thread_id=3D6440865&forum_i= d=3D3274> &forum_id=3D3274 I agree that throwing some exeption in the = code is (typically) the best solution to indicate that the code is not = finished. Personally, when my design is finished and the code skeleton = is there, I typically fill it with exceptions (in addition of tests) so = it blows up and the developer have to fix/program the code according to = the design documents. However, sometime you have no time to do all this, = so this would be good to add simple empty tests which fails with a = TestNotImplementedException letting know that they require some work (in = addition of TODO tags). =20 If the test runner/listener could be backward compatible (I have not = looked at the details) this could be fine for existing IDEs and plugins =20 I have never investigated TestNG so far as Junit is good for me but it = has also a way to exclude some tests Olivier =20 >>>>>>>>>>>>>>>>>>>>>>>>>>=20 I am utterly confused. Are you proposing a new category where the=20 categories would be 1. passed 2. failed 3. error 4. unexpected pass =20 Where your proposal is to add #4. dean =20 =20 ----- Original Message -----=20 From: "Marc Guillemot" <mguillemot@ya...> To: <junit-devel@li...> Sent: Tuesday, March 22, 2005 7:31 AM Subject: [Junit-devel] An idea to run individual tests as = "unimplemented" =20 =20 > Hi, > > I"m experimenting a construct that could be interesting for other = persons=20 > or perhaps in junit itself. Having a test testFutureFunctionality = that=20 > fails as it tests something that is known as not yet supported, we = can=20 > remove the test from the normal test run to avoid making the whole = run=20 > fail or enhance the test with something like: > > public void testFutureFunctionality() > { > if (runAsUnimplemented()) > { > return; > } > > .... the real test > > } > > where runAsUnimplemented(): > - puts a flag in the thread to mark that it is called > - looks in the stack to find the unit test from which it is called, > - calls this test again (runAsUnimplemented() returning in this case = false=20 > to have the real test running) catching possible exceptions > - if the real test is successful, throws an exception reporting that = a=20 > test marked as unimplemented already works > - else just return true, to avoid that the real test gets executed = and=20 > that it throws an exception > > This allows tests for future functionality to be incorporated in the = rest=20 > of the unit tests at their "logical" place, to be run and to fail if = the=20 > tests are ... successful. This way "good" side effects are detected. > > The code necessary to "run as unimplemented" could be improved with = an=20 > integration in junit and we could imagine that a javadoc tag like=20 > @notImplemented would be enough when using java 1.5 annotations. > > > Origin of the idea: > > in one open source project on which I work, we try to simulate the=20 > behavior of browsers ( <http://htmlunit.sourceforge.net/> = http://htmlunit.sourceforge.net) and have many junit=20 > tests. We don"t currently do everything like browser do but have = already=20 > some tests for functionalities that we should support but that don"t=20 > currently work. Because the project is already stable, we don"t run = these=20 > tests in our "normal" test run and use a construct like following to = skip=20 > them: > > public void testFutureFunctionality() > { > if (true) > { > log("Functionality not implemented, skipping test"); > return; > } > > .... the real test > } > > Using these construction, the test are located at their normal place = but=20 > only there "for documentation" and are never run until a developer = removes=20 > the lines skipping the execution of the test. With a construct like = the=20 > one proposed before we can run the test "normally" and detect when a=20 > change has an unexpected good side effect. > > > If only one person has been interested and has read this message = until the=20 > end, then I have perhaps not wasted my time ;-) > > Marc. |
From: Poonaam N. <poo...@ya...> - 2005-06-17 05:51:50
|
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Curt S. <cj...@cy...> - 2005-06-07 14:08:35
|
On Thu, 24 Mar 2005, Barrie Treloar wrote: > In our scenario setUp inserts some data and then fails to insert other > data because the database has changed. With the current version > tearDown doesn't get invoked when setUp failed so our database is left > in an inconsistent state. BTW, the most reliable way I've found to deal with this sort of problem is to start a transaction (turn off auto-commit) at the beginning of every unit test and then do a rollback in the teardown. Even if you don't execute the teardown the transaction should be rolled back when the connection goes back into the pool or is closed. This sometimes takes a bit of work to get the DB set up such that unit tests don't need to cross transaction boundaries, but I've found it quite worthwhile because you have a much better guarantee that each test is starting from a consistent state: it's impossible to forget to undo DB changes. cjs -- Curt Sampson <cj...@cy...> +81 90 7737 2974 http://www.NetBSD.org Make up enjoying your city life...produced by BIC CAMERA |
From: Soham S G. <soh...@ya...> - 2005-06-02 10:01:11
|
i have a strange problem. I am using hotspot jvm. i am using test suite to run the junit test cases. when i do so, some of the junit test cases r failing.but when i run them separately, the succeed. if i use Oracle's OJVM then the suite works fine. But my project specification requires hotspot only. how jvm is integrated to junit?? --------------------------------- Yahoo! Mail Stay connected, organized, and protected. Take the tour |