com.scooterframework.test
Class FunctionalTestHelper
java.lang.Object
com.scooterframework.test.FunctionalTestHelper
public class FunctionalTestHelper
- extends java.lang.Object
FunctionalTestHelper class is super class of all functional test classes for
an application. Scooter uses a real, not simulated, web server to run
functional tests.
By default, Scooter starts an embedded web server for functional tests on
port 8080. You can change the default testing server port or use an
existing external server by specifying the system property appPort or
webStarted respectively.
It is very easy to run functional tests with Scooter. Just run one of the
following Ant commands:
Run blog application's functional tests on default port 8080:
>ant app_test_functional -DappPath=webapps/blog
Run blog application's functional tests on port 9999:
>ant app_test_functional -DappPath=webapps/blog -DappPort=9999
Run blog application's functional tests with an existing web server:
>ant app_test_functional -DappPath=webapps/blog -DwebStarted=true
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ac
protected static ApplicationConfig ac
contextName
protected static java.lang.String contextName
wc
protected static EnvConfig wc
FunctionalTestHelper
public FunctionalTestHelper()
setUpBeforeClass
public static void setUpBeforeClass()
tearDownAfterClass
public static void tearDownAfterClass()
setUp
public void setUp()
tearDown
public void tearDown()
refreshHttpConnection
public void refreshHttpConnection()
fireHttpGetRequest
protected HTTPResponse fireHttpGetRequest(java.lang.String uri)
fireHttpPostRequest
protected HTTPResponse fireHttpPostRequest(java.lang.String uri)
fireHttpPostRequest
protected HTTPResponse fireHttpPostRequest(java.lang.String uri,
java.util.Map<java.lang.String,java.lang.String> params)
fireHttpPutRequest
protected HTTPResponse fireHttpPutRequest(java.lang.String uri)
fireHttpPutRequest
protected HTTPResponse fireHttpPutRequest(java.lang.String uri,
java.util.Map<java.lang.String,java.lang.String> params)
fireHttpDeleteRequest
protected HTTPResponse fireHttpDeleteRequest(java.lang.String uri)
assertSuccess
protected static void assertSuccess(HTTPResponse response)
assertRedirectSuccess
protected static void assertRedirectSuccess(HTTPResponse response)