... +1 Then the trick becomes naming the test well. -- ... Blog: http://dotnetjunkies.com/WebLog/mlevison/ [Non-text portions of this message have been...
... This is an important point. For example, what if you have a method that will throw an IllegalArgumentException if any of its three arguments is null? It's...
... On that note, what conventions does everyone here use to name their test methods? For this example, mine would look like: test_push_emptyStack() ...
... Aside from the underscores (which Sun says are not "according to Hoyle"[1]) my convention broadly similiar. Here are some samples from my current test ...
... I do the same. Sometimes I derive all my test classes from a base test class that converts the test names from CamelCase to spaces and dumps them to a file...
Sounds like you would benefit greatly from TestNG's "description" attribute: @ExpectedExceptions(ElementNotFoundException.class) @Test(description = "Verify...
Cédric, ... For those of us who aren't JDK 1.5- or TestNG-enabled, there's also Plain Old Javadoc comments. Unfortunately, now that we've moved to Maven 1.x,...
Paolo, ... I like this idea. How exactly does the base class implementation work? Does its constructor convert and dump the name to the report file, or is ...
... For me, the trick becomes splitting the tests well into test case classes. EmptyStackTest OneItemStackTest MultipleItemsStackTest FullStackTest ... -- J....
... I would look at moving those tests into a PushStackTest, as a way to remove duplication in the names. That said, I would organize it the other way: a...
Hi, Does any one know how I can test protected method outside a package? Without moving the test class into the package where the method to be tested resides. ...
Kamal Ahmed
KAhmed@...
Mar 1, 2006 9:45 pm
16226
Hi, Is it possible to have BOTH Junit 3.x and 4.0 coexist in eclipse and use @Test , and also the conventional Junit test cases? If this is possible, then what...
Kamal Ahmed
KAhmed@...
Mar 1, 2006 11:08 pm
16227
... Thanks much! Domain-specific PMD rules (junit, jakarta logging, etc.) are pretty cool, I think; even if only a couple of people are using them, they're...
Hi, I recently have started working on in JUNIT.I have few doubts for Data Driven Test Cases. The scenario is as follows 1) I am passing the Input value (as of...
... Hmmmm... I understand the distinction, but personally I find that sticking to this rule in the case of unexpected exceptions makes it *harder* to figure...
i want to know that can i learn junit while i have no knowledge about junit but i know basic java programming and c programming. if yes then please give me an...
Recently I encountered a problem with StrutsTestCase. The following code is my Struts Action and its dependent business logic is injected by Spring. public...
I've been using EMMA for quite a while. When I chose it in early 2004, the landscape of open source coverage tools was pretty sparse. I evaluated EMMA,...
Kamal, Yes, this is possible with Eclipse 3.1 and above. For example: @RunWith(Suite.class) @SuiteClasses(ATest.class, BTest.class) public class AllTests { ...
... Maybe. My point was less about the names getting too long, and more that even pushAddsOneElement still takes more time and effort for me to read than...
Pratush, You may want to look at the Parameterized test runner for JUnit 4. Even in that case, you'd need to write your own driver for reading and writing the...