View Post
Development

Unit Testing Servlets Using Jetty

Jetty is a very lightweight servlet container, it starts up in just a handful of milliseconds, and easily allows you to unit test your HTTP Servlets.

Unfortunately, the Jetty API isn’t that easy to navigate. Here is a ServletRunner that will start up a Jetty container, and some useful stuff that is easy to integrate into your unit tests to test the servlets.