... Yes. What could you do to avoid that problem? -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes:...
In my test class, when I try to instantiate this certain class I get ExceptionInInitializerError. The superclass of this class has a static block. I can...
Chris, I could guess. But if you could try to boil down the example to 100 lines of code or less which exhibits the error, and post it here, it would be a...
Surround the code in the static initializer with a try/catch and print a stack trace: static { try { // original code from static initializer } catch(Throwable...
Is it possible to run some test case of testclasss in one go? For example, say I have10 testcases in MyTest.java class. I want to run say 4 of them which...
Hi Rain, What are the Limitations of JUnit or Disadvantages of JUnit. Accordfing to the research i have done. I have found few limitation.They are JUnit has...
... The biggest limitation, in my view, is that the tests are written in Java. As a consequence, they are hard to understand by non-technical people, and ...
Hi, I am trying to test the createService method of an mbean as it contains code to load the persisted attributes from the database. I am trying to obtain an...
... The following search returned some pretty good hits: http://www.google.com/search?q=junit+best+practices Good luck! -- Joe Schmetzer .:. Renaissance...
I have been given the task at my workplace to be the junit guru for our development team. While we have the basic shell in place to make use of it, no one has,...
<trite>Keep the bar green, keep the code clean!</trite> -- Stephen Smith, MEng (Wales). http://www.stephen-smith.co.uk/...
Stephen Smith
steve@...
Jul 4, 2006 7:01 pm
17067
Thankyou Brett and David, I have resolved it. I put try, catch around the static initializer and found out it was a null pointer exception. I had a try, catch...
Hello all, I just want to know whether we can test XML APIs using junit. Thanks and regards, AmudhaK...
Amudha Karuppannan
akaruppannan@...
Jul 5, 2006 4:10 pm
17069
... Yes. See http://www.cafeconleche.org/slides/sdbestpractices2005/testingxml/ -- Elliotte Rusty Harold elharo@... Java I/O 2nd Edition Just...
Elliotte Harold
elharo@...
Jul 5, 2006 4:26 pm
17070
AmudhaK, By XML API, you mean XML Documents? Or java code which generates XML. If you can give us sample code then we would have a better idea of its ...
Kamal Ahmed
KAhmed@...
Jul 5, 2006 5:56 pm
17071
Having worked out (I think) all the kinks from running junitdoclet as an external program in my eclipse, I have tried generating some junit test classes for...
Does Junit has any feature called nightly build feature ? Which will run everynight & will identify the issues if any from newly developed code? If not then is...
Kshitija, That's an excellent thing to do. Google for "continuous integration": popular tools include Cruise Control and Continuum. Good luck, David Saff...
Write tests and code,...write an Ant script to run all the tests,...schedule the ant script to run nightly. ... From: "akshitija" <akshitija@...> Does...
You might want to take a look at TestNG which allows among many other features "tagging" test cases and then running those by groups. www.testng.org...
I am using Junit 4.1 with new style of writing Tests using @Test annotations etc. I have written following class --> EmployeeTest to Test Employee class. ...
... I read the first hit article. It had so many errors in it, I got sick. -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software...
Thanks for your reply Kamal. XML API i meant is ,an actually a method which when called will call a CLI command(this command will be executed in my switch )and...
Amudha Karuppannan
akaruppannan@...
Jul 6, 2006 9:33 am
17079
In case you are interested in testing XML generated by your Java applications, I can recommend XmlUnit. It compare a given XML against an expected XML. ...
Pradeep, Which version of Eclipse are you using? The following should work in Eclipse 3.2 without change. Two more questions, if I may: 1) This doesn't look...
Andreas, How different is it from comparing two DOM objects? -Thanks Harshal ... -- http://shahharshal.blogspot.com/ [Non-text portions of this message have...
Pradeep, I'm sorry my last message was not more action-oriented. You have two options: A) Upgrade to Eclipse 3.2 B) For your test to work in Eclipse 3.1, you...