Making screenshots from Selenium with JUnit @Rule’s

When running Selenium tests from JUnit it’s very useful to be able to capture screenshots when something fails. Especially when you run it in a Continuous Integration environment which you aren’t monitoring. A screenshot combined with the stacktrace makes identifying and fixing the error easier. When you combine this with a JUnit @Rule you can make it transparant and use it for every testcaseRead more →

JPA implementation patterns: Using UUIDs as primary keys

Continuing Vincent Partington‘s blog series about JPA implementation patterns, I would like to add the following

The default way in JPA for primary keys is to use the @GeneratedValue annotation with the strategy attribute set to one of AUTO, IDENTITY, SEQUENCE, or TABLE. You pick the most appropriate strategy for your situation and that’s it.
But you can also choose to generate the primary key yourself.
Read more →