Functional Testing for Java

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. :)

+3
source share
3 answers

Selenium is one option. It has the ability to export tests to JUnit 3 or 4.

+1
source

Apact Cactus JUnit . , ServletTestCase, , Servlet, FilterTestCase, JspTestCase .. - . . HttpUnit ( ).

+1

I advise you to use Selenium + FluentLenium .

FluentLenium is a Java framework that facilitates the use of Selenium.

It targets many web browsers.

0
source

All Articles