Continue reading: Readable Java system tests with good old JUnit

Readable Java system tests with good old JUnit

This article is the third in a series about system testing:

  1. Dockerized testing vs end-to-end testing
  2. How to setup Dockerized testing
  3. Readable Java system tests with good old JUnit

JUnit is poorly named. Given the name, people tend to think that it should only be used to write Java unit tests. And then people feel a bit hesitant about writing their integration tests with JUnit too. When they start with system tests, they often think they need another driver for their tests. Sure, maybe using another abstraction layer and a custom domain specific language (BDD), you can make the tests more readable for a non-programmer. That often comes at the cost of making the tests less readable for the programmers. And if we are honest, who’s going to read the tests the most? Perhaps just naming test classes and methods well and writing readable code can suffice?

Continue reading

Continue reading: JAX-RS: RESTful Web Services

JAX-RS: RESTful Web Services

Draft specen för JAX-RS: The Java API for RESTful Web Services släpptes för någon vecka sedan. Som oftast brukar jag inte orka granska specarna som kommer, men denna gång tog jag mig en titt. It made me go mmmm… som det heter. Kan denna lilla kodsnutt väcka aptiten: @UriTemplate(“widgets”)‏public class WidgetList{ @HttpMethod @UriTemplate(“offers”)‏ WidgetList getDiscounted()

Continue reading