|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase com.atlassian.selenium.SeleniumTest com.atlassian.jira.webtest.selenium.JiraSeleniumTest
public abstract class JiraSeleniumTest
Nested Class Summary | |
---|---|
static interface |
JiraSeleniumTest.Check
|
Field Summary | |
---|---|
static String |
ADMIN_PASSWORD
|
static String |
ADMIN_USERNAME
|
protected Backdoor |
backdoor
|
protected static int |
DROP_DOWN_WAIT
|
protected JIRAEnvironmentData |
environmentData
A member variable back to the Selenium interface |
protected static String |
HSP_1
|
org.apache.log4j.Logger |
logger
|
protected static String |
MKY_1
|
protected static String |
PAGE_LOAD_WAIT
|
protected static long |
PAGE_LOAD_WAIT_TIME
|
protected static int |
PRESENT_TO_VISIBLE_DELAY
|
static String |
VK_DOWN
|
static String |
VK_ESC
|
static String |
VK_UP
|
Fields inherited from class com.atlassian.selenium.SeleniumTest |
---|
assertThat, client, config, recorder |
Constructor Summary | |
---|---|
JiraSeleniumTest()
|
|
JiraSeleniumTest(JIRAEnvironmentData environmentData)
|
Method Summary | |
---|---|
void |
assertFalse(String message,
JiraSeleniumTest.Check assertion)
|
void |
assertFalse(String message,
JiraSeleniumTest.Check assertion,
int timeout)
|
void |
assertTrue(String message,
JiraSeleniumTest.Check assertion)
|
void |
assertTrue(String message,
JiraSeleniumTest.Check assertion,
int timeout)
|
protected void |
backgroundLogout()
|
protected SeleniumContext |
context()
|
Administration |
getAdministration()
|
Backdoor |
getBackdoor()
Deprecated. Use #backdoor# instead. Since v5.0. |
JIRAEnvironmentData |
getEnvironmentData()
|
Navigator |
getNavigator()
|
com.atlassian.selenium.SeleniumConfiguration |
getSeleniumConfiguration()
|
UserPreferences |
getUserPreferences()
|
protected JIRAWebTest |
getWebUnitTest()
|
String |
getXsrfToken()
|
protected GlobalPages |
globalPages()
|
protected void |
internalSetup()
|
protected boolean |
isBeforeJdk15()
Checks the current JDK version from the JIRA system information page. |
protected boolean |
isKickAssEnabled()
|
boolean |
isUserAgentFirefox()
|
void |
log(String msg)
|
void |
onSetUp()
|
protected void |
onTearDown()
|
protected void |
restoreBlankInstance()
|
protected void |
restoreData(String file)
|
protected void |
restoreData(String path,
String file)
|
protected void |
restoreData(String path,
String file,
boolean reloadPlugins)
|
protected void |
restoreDataWithPluginsReload(String file)
|
protected void |
restoreDataWithReplacedTokens(String file,
Map<String,String> replacements)
|
protected void |
restoreI18nData(String file)
|
protected void |
restoreUnsetupJIRA()
|
protected void |
restoreViaBackdoor(String filename)
Restores an XML import file via the Backdoor after confirming that the Selenium session is sane. |
protected void |
restoreViaBackdoorAndGoToDashboard(String filename)
Deprecated. Use the #backdoor# restore method instead, and login as whichever
user is needed for the test. Since v5.0. |
void |
runBare()
The outer most edge of a JUnit Test. |
protected void |
runBareTestCase()
This is a basicly copy and paste of TestCase.runBare(), except we capture a screenshot if the execution of the test fails. |
protected void |
selectMainWindow()
|
void |
setEnvironmentData(JIRAEnvironmentData environmentData)
|
void |
setSeleniumTestListener(JiraSeleniumTestListener listener)
|
protected static junit.framework.Test |
suiteFor(Class testSuiteClass)
If you put a class in your test unit class to this then IDEA can run the test in one suite rather than setting it up and pulling it dfown completely for each test method. |
protected DefaultTimeouts |
timeouts()
|
void |
turnOffProfiling()
|
void |
turnOnProfiling()
|
protected void |
visibleByTimeoutWithDelay(String locator,
long timeout)
Use this instead of visibleByTimeout when waiting for an ajax call to complete. |
void |
waitFor(int millis)
Deprecated. there is always something on the page to wait for (incl. non-existence of something)!!! usage of this method will lead to slow tests with intermittent failures |
protected void |
waitForContentUpdate()
|
protected void |
waitForRestore()
|
Methods inherited from class com.atlassian.selenium.SeleniumTest |
---|
getRecorder, getSeleniumClient, setUp, tearDown |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, 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, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface junit.framework.Test |
---|
countTestCases, run |
Field Detail |
---|
public final org.apache.log4j.Logger logger
protected static final int PRESENT_TO_VISIBLE_DELAY
protected static final int DROP_DOWN_WAIT
public static final String VK_DOWN
public static final String VK_UP
public static final String VK_ESC
public static final String ADMIN_USERNAME
public static final String ADMIN_PASSWORD
protected static final String HSP_1
protected static final String MKY_1
protected JIRAEnvironmentData environmentData
protected Backdoor backdoor
protected static final long PAGE_LOAD_WAIT_TIME
protected static final String PAGE_LOAD_WAIT
Constructor Detail |
---|
public JiraSeleniumTest()
public JiraSeleniumTest(JIRAEnvironmentData environmentData)
Method Detail |
---|
public void log(String msg)
public void onSetUp()
onSetUp
in class com.atlassian.selenium.SeleniumTest
protected void internalSetup()
public void runBare() throws Throwable
runBare
in class junit.framework.TestCase
Throwable
TestCase.runBare()
protected void runBareTestCase() throws Throwable
Throwable
- on errorprotected void onTearDown() throws Exception
onTearDown
in class com.atlassian.selenium.SeleniumTest
Exception
protected void restoreData(String file)
protected final void restoreDataWithPluginsReload(String file)
protected final void restoreData(String path, String file)
protected void restoreData(String path, String file, boolean reloadPlugins)
protected void restoreI18nData(String file)
protected void restoreDataWithReplacedTokens(String file, Map<String,String> replacements)
protected void restoreBlankInstance()
protected void restoreUnsetupJIRA()
protected void restoreViaBackdoor(String filename)
filename
- the XML file to restoreprotected void restoreViaBackdoorAndGoToDashboard(String filename)
#backdoor#
restore method instead, and login as whichever
user is needed for the test. Since v5.0.
Don't use this method! Just go to the first URL needed by your test!
filename
- the XML file to restoreprotected void waitForRestore()
protected static junit.framework.Test suiteFor(Class testSuiteClass)
public static Test suite() { return suiteFor(YourSeleniumUnitTest.class); }
testSuiteClass
- the unit test class to run
SeleniumTestSuiteBuilder
protected boolean isBeforeJdk15()
public JIRAEnvironmentData getEnvironmentData()
public void setEnvironmentData(JIRAEnvironmentData environmentData)
setEnvironmentData
in interface EnvironmentAware
public void setSeleniumTestListener(JiraSeleniumTestListener listener)
protected JIRAWebTest getWebUnitTest()
protected boolean isKickAssEnabled()
protected void waitForContentUpdate()
public Administration getAdministration()
public Backdoor getBackdoor()
#backdoor#
instead. Since v5.0.
public Navigator getNavigator()
public UserPreferences getUserPreferences()
protected final DefaultTimeouts timeouts()
protected final SeleniumContext context()
protected final GlobalPages globalPages()
public void turnOnProfiling()
public void turnOffProfiling()
public boolean isUserAgentFirefox()
@Deprecated public void waitFor(int millis)
SeleniumAssertions
instead!
This method should only be used when asserting the negative case (something doesn't show up after a timeout)
millis
- - how long to waitTimedCondition
public com.atlassian.selenium.SeleniumConfiguration getSeleniumConfiguration()
getSeleniumConfiguration
in class com.atlassian.selenium.SeleniumTest
protected void visibleByTimeoutWithDelay(String locator, long timeout)
PRESENT_TO_VISIBLE_DELAY
), before visibleByTimeout is called.
locator
- Selenium element locatortimeout
- timeout to use for present and visible timeoutspublic void assertFalse(String message, JiraSeleniumTest.Check assertion)
public void assertTrue(String message, JiraSeleniumTest.Check assertion)
public void assertFalse(String message, JiraSeleniumTest.Check assertion, int timeout)
public void assertTrue(String message, JiraSeleniumTest.Check assertion, int timeout)
public String getXsrfToken()
protected final void backgroundLogout() throws Exception
Exception
protected final void selectMainWindow()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |