|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
com.flexiblewebsolutions.xdriveunit.XDriveTestCase
com.flexiblewebsolutions.xdriveunit.WebXDriveTestCase
public abstract class WebXDriveTestCase
XML Driven Test Case that is used to test web applications.
| Field Summary | |
|---|---|
protected com.gargoylesoftware.htmlunit.WebClient |
_WebClient
|
protected net.sourceforge.jwebunit.WebTester |
_WebTester
Framework Test API clients |
static int |
HTMLUNIT
HTML Unit HTTP Testing API |
static int |
JWEBUNIT
JWEBUnit Http Testing API |
| Fields inherited from class com.flexiblewebsolutions.xdriveunit.XDriveTestCase |
|---|
_TestInput, _ThreadName |
| Constructor Summary | |
|---|---|
WebXDriveTestCase(java.lang.String pName,
java.lang.StringBuffer pTestInput,
java.lang.StringBuffer pTestOptions,
java.lang.String pThreadName)
Constructor for WebXMLTestCase |
|
| Method Summary | |
|---|---|
protected void |
assertTextPresent(java.lang.String pText)
Verify that some text is included on the page |
protected void |
clickButton(java.lang.String pButtonID,
java.lang.String pButtonDesc)
Clicks an html button |
protected void |
clickElementById(java.lang.String pId,
java.lang.String pDescription)
Clicks a variety of html element types that are clickable. |
protected void |
clickLink(java.lang.String pLinkName,
java.lang.String pPageDescription)
Clicks on a link |
protected void |
clickLinkWithImage(java.lang.String pLinkImg,
java.lang.String pLinkDesc)
Clicks the link of an image |
protected void |
clickLinkWithText(java.lang.String pLinkText,
int pIndex,
java.lang.String pLinkDesc)
Clicks the link on a page using text between anchor tag |
protected void |
clickLinkWithText(java.lang.String pLinkText,
java.lang.String pLinkDesc)
Clicks the link on a page using text between anchor tag |
protected void |
dumpResponseToFile(java.io.File pFile)
Captures current page text to specified file |
protected java.lang.StringBuffer |
dumpResponseToString()
Capture current page text to a StringBuffer |
java.lang.String |
getClassName()
|
java.io.File |
getTestDirectory()
|
abstract int |
getTestFramework()
|
java.io.File |
getTestTmpDirectory()
|
protected void |
setCurrentForm(java.lang.String pFormName)
Sets the form to use when assigning values to fields |
protected void |
setUp()
|
protected void |
submit(java.lang.String pSubmitDesc)
Submits the form that has been previously set. |
protected void |
submit(java.lang.String pFormName,
java.lang.String pSubmitDesc)
Submits the form specified by the supplied name |
protected void |
tearDown()
|
| Methods inherited from class com.flexiblewebsolutions.xdriveunit.XDriveTestCase |
|---|
checkBooleanParameter, getFile, getTestOptions, init, init, setupTestOptions |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int HTMLUNIT
public static final int JWEBUNIT
protected net.sourceforge.jwebunit.WebTester _WebTester
protected com.gargoylesoftware.htmlunit.WebClient _WebClient
| Constructor Detail |
|---|
public WebXDriveTestCase(java.lang.String pName,
java.lang.StringBuffer pTestInput,
java.lang.StringBuffer pTestOptions,
java.lang.String pThreadName)
pName - -
Name of test methodpTestInput - -
XML containing test inputpTestOptions - -
XML containing test optionspThreadName - -
Name of thread running test, can be blank| Method Detail |
|---|
protected void setUp()
throws java.lang.Exception
setUp in class junit.framework.TestCasejava.lang.ExceptionTestCase.setUp()
protected void tearDown()
throws java.lang.Exception
tearDown in class junit.framework.TestCasejava.lang.ExceptionTestCase.tearDown()public abstract int getTestFramework()
protected void clickLink(java.lang.String pLinkName,
java.lang.String pPageDescription)
pLinkName - - Name attribute of the linkpPageDescription - - Description of action for logging
protected void clickElementById(java.lang.String pId,
java.lang.String pDescription)
pId - - Id attribute of the elementpDescription - - Description of action for logging
protected void clickButton(java.lang.String pButtonID,
java.lang.String pButtonDesc)
pButtonID - - Id attribute of the buttonpButtonDesc - - Description of action for logging
protected void clickLinkWithImage(java.lang.String pLinkImg,
java.lang.String pLinkDesc)
pLinkImg - - Src attribute of imagepLinkDesc - - Description of action for logging
protected void clickLinkWithText(java.lang.String pLinkText,
java.lang.String pLinkDesc)
pLinkText - - Link text as it appears to user.pLinkDesc - - Description of action for logging
protected void clickLinkWithText(java.lang.String pLinkText,
int pIndex,
java.lang.String pLinkDesc)
pLinkText - - Link text as it appears to user.pIndex - - Numbered occurence in page if more than one LinkpLinkDesc - - Description of action for loggingprotected void submit(java.lang.String pSubmitDesc)
pSubmitDesc - - Description of action for logging
protected void submit(java.lang.String pFormName,
java.lang.String pSubmitDesc)
pFormName - - Name of form to submitpSubmitDesc - - Description of action for loggingprotected void assertTextPresent(java.lang.String pText)
pText - - Any text that is visible on the page.protected void setCurrentForm(java.lang.String pFormName)
pFormName - - value from html protected void dumpResponseToFile(java.io.File pFile)
pFile - -
File to write response toprotected java.lang.StringBuffer dumpResponseToString()
public java.lang.String getClassName()
public java.io.File getTestDirectory()
public java.io.File getTestTmpDirectory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||