I want to write some functional tests for a java servlet and I want to make sure it works with all the filters and other random java web stuff that might interfere with the servlet. Is there a nice way to do this in java?
I noticed the play framework has a really nice way of doing functional tests.
import play.test.*;
import play.mvc.*;
import play.mvc.Http.*;
import org.junit.*;
public class ApplicationTest extends FunctionalTest {
@Test
public void testTheHomePage() {
Response response = GET("/");
assertStatus(200, response);
}
}
http://www.playframework.org/documentation/1.0/test
Something like that would be great but I guess I'm getting my hopes up. :)