public abstract class AutomatedFunctionalTestBase extends Object
Automated Functional Tests should extend this Base class or have it in their class hierarchy, enables bookmark mode for test methods ending in Bookmark and navigation mode for test methods ending in Nav.
The abstract method getBookmarkUrl should be implemented to return the Bookmark URL
of the page under test. The abstract method navigate should be implemented to Navigate
through the UI to the page under test. navigateInternal()
should be called from a setUp.
Runs With AutomatedFunctionalTestRunner
.
Modifier and Type | Field and Description |
---|---|
protected boolean |
shouldNavigate
Set to true by
enableNavigationMode() and false by enableBookmarkMode() . |
protected String |
testUrl
testUrl set by
enableBookmarkMode() and enableNavigationMode() , if there are test methods that
do not end with Bookmark or Nav then testUrl must be defined in the test. |
Constructor and Description |
---|
AutomatedFunctionalTestBase() |
Modifier and Type | Method and Description |
---|---|
protected void |
enableBookmarkMode()
Called by
AutomatedFunctionalTestRunner.methodInvoker(org.junit.runners.model.FrameworkMethod, java.lang.Object) if test method ends with Bookmark. |
protected void |
enableNavigationMode()
Called by
AutomatedFunctionalTestRunner.methodInvoker(org.junit.runners.model.FrameworkMethod, java.lang.Object) if test method ends with Nav. |
protected abstract String |
getBookmarkUrl()
Called by {see #enableBookmarkMode}.
|
protected abstract String |
getNavigationUrl()
Called by {see #enableBookmarkMode}.
|
protected String |
getTestUrl() |
protected abstract void |
navigate()
Called by
navigateInternal() , should navigate from the testUrl. |
protected void |
navigateInternal()
Calls
navigate() if shouldNavigate is true. |
protected String testUrl
enableBookmarkMode()
and enableNavigationMode()
, if there are test methods that
do not end with Bookmark or Nav then testUrl must be defined in the test.protected boolean shouldNavigate
enableNavigationMode()
and false by enableBookmarkMode()
.public AutomatedFunctionalTestBase()
protected abstract String getBookmarkUrl()
protected abstract String getNavigationUrl()
protected abstract void navigate() throws Exception
navigateInternal()
, should navigate from the testUrl.Exception
protected void enableBookmarkMode()
AutomatedFunctionalTestRunner.methodInvoker(org.junit.runners.model.FrameworkMethod, java.lang.Object)
if test method ends with Bookmark.protected void enableNavigationMode()
AutomatedFunctionalTestRunner.methodInvoker(org.junit.runners.model.FrameworkMethod, java.lang.Object)
if test method ends with Nav.protected String getTestUrl()
protected void navigateInternal() throws Exception
navigate()
if shouldNavigate
is true.Exception
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.