... It is totally relevant. A few weeks (maybe months) after you start using JUnit seriously, you'll realize you need to use data driven test design to...
This is exactly the sort of thing that the Parameterised Test pattern is for. ... Stephen Smith, MEng (Wales). http://www.stephen-smith.co.uk/...
Stephen Smith
steve@...
Jul 2, 2007 7:06 pm
19521
I have a feeling I'm about to bring up a much discussed topic, however, I wasn't able to find any related topics by searching this mailing list. My apologies...
... FYI, TestNG also supports class-level annotations: @Test(groups = "database") public class DatabaseTests { } In this case, all the methods in this class...
I have been playing with Hamcrest a little and I keep running across a problem with generic type being mismatched in assertThat(). Example: Object actual = "a...
Kevin, I don't see why 'actual' is declared as Object? It looks like Hamcrest is written correctly in this respect. Cheers, David ... Matcher<String>) ... ...
... I don't see why 'actual' is declared as Object? It looks like Hamcrest ... How about this example: JTable table = new JTable(); table.setValueAt("a...
Kevin, Yep, that can be a pain. I've only gotten bit by it once every couple weeks, which is about half as often as I appreciate the fact that quick-fix on ...
Hello, I have been reading about mock objects and I would like to use them to develop junits tests for a servlet that I have recently coded . Where would I...
There are a number of different mock frameworks out there, each of which has good points and bad points. If you're using Spring to develop your web application...
Stephen Smith
steve@...
Jul 8, 2007 10:12 am
19531
How about this hack? package org.hamcrest; public class MyMatcherAssert { public static <T> void assertThat(Object actual, Matcher<T> matcher) { assertThat("",...
Christian, Thank you for the feature request. Let's discuss further here, and then summarize to the bug posting--I've indicated as such to the tracker...
... This approach breaks down quickly as soon as you want one of your test methods to belong to more than just one group. For example, how do you express the...
... Thanks Davids, My question was about 30% grumbling and 70% wondering if I was missing something really obvious. I too have been delighted when the quickfix...
Hi, I've been looking into in-container testing and the tools out there look a bit dated - Cactus and Junitee. They handle well junit 3.8.1 but not junit 4.3....
Hi, I've been looking at tools for integration testing for ejb30 applications (container agnostic) and the two tools I bumped into looked a bit dated Cactus...
... As Cedric pointed out, this only works if a test is a member of only one group. As so many others do, many of my tests are annotated to be in multiple...
David, In order to support older JUnit execution environments (Ant, Eclipse) which need the 3.8 hooks, our classes have suite() methods. This appears to be the...
Hello All, We are trying to use the times reported by JUnit as a benchmark value. Is that reasonable? We understand that the setUp() Time is included and have...
Hi Dennis, ... I guess that depends on what you mean by "use as a benchmark value"? ... If setUp() is included then I'd say it's almost certain that tearDown()...
hi... Iam using the JUnit version3.8.1 to test the Struts application version1.2.2,while testing my action class which consist of database connectivity its...
Hello pnprathil, ... Is the directory containing "WEB-INF/struts-config.xml" in classpath while running the unit tests? Otherwise, the Javadocs for ...
Michael, The suite() method is another ball of wax. Given a class that has some JUnit 3 characteristics and some JUnit 4 characteristics, we've been trying to...
... I agree your situation requires multiple groups. It also seems that Christian's original need can be met with what's currently in the current version of...
... build) ... etc) Those are definitely nice benefits. I'm having a hard time visualizing what Nightly.java is, though. A test suite which runs anything ...
... Interesting thought, but an advantage of string groups is that you can run your tests by specifying group regexps (very powerful). For example, some of our...