JavaPulse

a finger on the pulse of the freelance Java™ market in the Netherlands

jDuchess - Ladies of Java

Together with a few other Java girls that I met along the way, I’ve started a group called jDuchess. jDuchess is meant to be a network for Java girls in the Netherlands. We get together every once in awhile to network/socialize and plan to show up en mass at Java events around the country.
So if [...]

Test Development with TestNG and Maven

Update following the discussion in the comments:
The reason for not running/debugging my tests from within Netbeans is because the Netbeans TestNG plugin is not up-to-date. I’m using TestNG 5.5 while the plugin is written for 4.6 or something like that. I’m sure that if I’m using either Eclipse with TestNG or JUnit with Netbeans, the [...]

Current Class and Method

Current class is easy:

String currentClass() {
return this.getClass().getSimpleName();
}

Current method:

String currentMethod() {
return Thread.currentThread().getStackTrace()[3].getMethodName();
}

The number in the stack trace changes depending on how far down you bury this call.
Really handy for unit testing or debug logging (remember to wrap debug logging with [...]

« go back