I want to write some functional tests for a Java servlet, and I want to make sure that it works with all filters and other random java files that may interfere with the servlet. Is there a good way to do this in java?
I noticed that the gaming system is a really good way to perform 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 this would be great, but I think I hope. :)
source
share