|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.testng.Assert
org.apache.tapestry5.test.AbstractIntegrationTestSuite
public class AbstractIntegrationTestSuite
A base class for creating integration tests. Ths encapsulates starting up an in-process copy of Jetty, and in-process
copy of SeleniumServer, and a Selenium client.
Selenium interface, and delegates all those methods to the DefaultSelenium
instance it creates. It also extends the normal exception reporting for any failed command or query to produce a more
detailed report to the main console.
JettyRunner| Field Summary | |
|---|---|
static String |
BASE_URL
|
static String |
DEFAULT_WEB_APP_ROOT
Default directory containing the web application to be tested (this conforms to Maven's default folder). |
static String |
DEFAULT_WEB_BROWSER_COMMAND
Default browser in which to run tests - firefox |
static int |
JETTY_PORT
The port on which the internal copy of Jetty is executed. |
static String |
PAGE_LOAD_TIMEOUT
15 seconds |
static String |
SUBMIT
|
| Constructor Summary | |
|---|---|
|
AbstractIntegrationTestSuite()
Initializes the suite using DEFAULT_WEB_APP_ROOT. |
protected |
AbstractIntegrationTestSuite(String webAppRoot)
|
protected |
AbstractIntegrationTestSuite(String webAppRoot,
String browserCommand)
|
| Methods inherited from class org.testng.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsNoOrder, assertEqualsNoOrder, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_WEB_APP_ROOT
public static final String DEFAULT_WEB_BROWSER_COMMAND
public static final String PAGE_LOAD_TIMEOUT
public static final int JETTY_PORT
public static final String BASE_URL
public static final String SUBMIT
| Constructor Detail |
|---|
public AbstractIntegrationTestSuite()
DEFAULT_WEB_APP_ROOT.
protected AbstractIntegrationTestSuite(String webAppRoot)
webAppRoot - the directory containing the web application to be tested.
protected AbstractIntegrationTestSuite(String webAppRoot,
String browserCommand)
webAppRoot - web application root (default src/main/webapp)browserCommand - browser command to pass to selenium. Default is *firefox, syntax for custom browsers is
*custom <path_to_browser>, e.g. *custom /usr/lib/mozilla-firefox/firefox| Method Detail |
|---|
protected final void assertSourcePresent(String... expected)
protected final void assertAttribute(String locator,
String expected)
locator - identifies the attribute whose value is to be assertedexpected - expected value for the attribute
protected final void assertText(String locator,
String expected)
locator - identifies the element whose text value is to be assertedexpected - expected value for the element's textprotected final void assertTextPresent(String... text)
protected final void assertFieldValue(String locator,
String expected)
protected final void clickAndWait(String link)
protected final void assertTextSeries(String idFormat,
int startIndex,
String... values)
protected final void assertAttributeSeries(String idFormat,
int startIndex,
String... values)
protected final void assertFieldValueSeries(String idFormat,
int startIndex,
String... values)
public void cleanup()
throws Exception
Exception
public void setup()
throws Exception
Exceptionpublic void start()
start in interface com.thoughtworks.selenium.Seleniumpublic void stop()
stop in interface com.thoughtworks.selenium.Seleniumpublic void click(String locator)
click in interface com.thoughtworks.selenium.Seleniumpublic void doubleClick(String locator)
doubleClick in interface com.thoughtworks.selenium.Seleniumpublic void contextMenu(String locator)
contextMenu in interface com.thoughtworks.selenium.Selenium
public void clickAt(String locator,
String coordString)
clickAt in interface com.thoughtworks.selenium.Selenium
public void doubleClickAt(String locator,
String coordString)
doubleClickAt in interface com.thoughtworks.selenium.Selenium
public void contextMenuAt(String locator,
String coordString)
contextMenuAt in interface com.thoughtworks.selenium.Selenium
public void fireEvent(String locator,
String eventName)
fireEvent in interface com.thoughtworks.selenium.Seleniumpublic void focus(String locator)
focus in interface com.thoughtworks.selenium.Selenium
public void keyPress(String locator,
String keySequence)
keyPress in interface com.thoughtworks.selenium.Seleniumpublic void shiftKeyDown()
shiftKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void shiftKeyUp()
shiftKeyUp in interface com.thoughtworks.selenium.Seleniumpublic void metaKeyDown()
metaKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void metaKeyUp()
metaKeyUp in interface com.thoughtworks.selenium.Seleniumpublic void altKeyDown()
altKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void altKeyUp()
altKeyUp in interface com.thoughtworks.selenium.Seleniumpublic void controlKeyDown()
controlKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void controlKeyUp()
controlKeyUp in interface com.thoughtworks.selenium.Selenium
public void keyDown(String locator,
String keySequence)
keyDown in interface com.thoughtworks.selenium.Selenium
public void keyUp(String locator,
String keySequence)
keyUp in interface com.thoughtworks.selenium.Seleniumpublic void mouseOver(String locator)
mouseOver in interface com.thoughtworks.selenium.Seleniumpublic void mouseOut(String locator)
mouseOut in interface com.thoughtworks.selenium.Seleniumpublic void mouseDown(String locator)
mouseDown in interface com.thoughtworks.selenium.Selenium
public void mouseDownAt(String locator,
String coordString)
mouseDownAt in interface com.thoughtworks.selenium.Seleniumpublic void mouseUp(String locator)
mouseUp in interface com.thoughtworks.selenium.Selenium
public void mouseUpAt(String locator,
String coordString)
mouseUpAt in interface com.thoughtworks.selenium.Seleniumpublic void mouseMove(String locator)
mouseMove in interface com.thoughtworks.selenium.Selenium
public void mouseMoveAt(String locator,
String coordString)
mouseMoveAt in interface com.thoughtworks.selenium.Selenium
public void type(String locator,
String value)
type in interface com.thoughtworks.selenium.Selenium
public void typeKeys(String locator,
String value)
typeKeys in interface com.thoughtworks.selenium.Seleniumpublic void setSpeed(String value)
setSpeed in interface com.thoughtworks.selenium.Seleniumpublic String getSpeed()
getSpeed in interface com.thoughtworks.selenium.Seleniumpublic void check(String locator)
check in interface com.thoughtworks.selenium.Seleniumpublic void uncheck(String locator)
uncheck in interface com.thoughtworks.selenium.Selenium
public void select(String selectLocator,
String optionLocator)
select in interface com.thoughtworks.selenium.Selenium
public void addSelection(String locator,
String optionLocator)
addSelection in interface com.thoughtworks.selenium.Selenium
public void removeSelection(String locator,
String optionLocator)
removeSelection in interface com.thoughtworks.selenium.Seleniumpublic void removeAllSelections(String locator)
removeAllSelections in interface com.thoughtworks.selenium.Seleniumpublic void submit(String formLocator)
submit in interface com.thoughtworks.selenium.Seleniumpublic void open(String url)