StrutsTestCase

StrutsTestCase for JUnit

Doing searching for Mock Testing and In Container Testing, and you'll see a lot of discussion. There are pros and cons to both.

The pro to Mock Testing is that it is quick and you don't need to mess with a container. Long deployment times and constant container restarts make testing in a container a pain.

The pro for In Container testing is that you are actually testing exactly where your code will live. You eliminate some of the variables this way, making a more accurate test environment.

For the sake of speed, though, Mock Testing is the way to go. It's more controllable, too. You can more easily tell when there is an error in your code or the application container.

For testing Struts stuff outside the container, there is Struts Test Case. It also provides implementations of the Servlet classes.

It's pretty slick. With these, the need for writing web tests is greatly diminished.

Popular posts from this blog

The 29 Healthiest Foods on the Planet

Lists and arrays in Dart

Converting Array to List in Scala