org.kuali.rice.testtools.selenium
Class AutomatedFunctionalTestBase

java.lang.Object
  extended by org.kuali.rice.testtools.selenium.AutomatedFunctionalTestBase
Direct Known Subclasses:
JiraAwareAftBase

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.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
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 Summary
AutomatedFunctionalTestBase()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

testUrl

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.


shouldNavigate

protected boolean shouldNavigate
Set to true by enableNavigationMode() and false by enableBookmarkMode().

Constructor Detail

AutomatedFunctionalTestBase

public AutomatedFunctionalTestBase()
Method Detail

getBookmarkUrl

protected abstract String getBookmarkUrl()
Called by {see #enableBookmarkMode}.

Returns:
Bookmark url where test will start.

getNavigationUrl

protected abstract String getNavigationUrl()
Called by {see #enableBookmarkMode}.

Returns:
Navigation url where test will start navigating from.

navigate

protected abstract void navigate()
                          throws Exception
Called by navigateInternal(), should navigate from the testUrl.

Throws:
Exception

enableBookmarkMode

protected void enableBookmarkMode()
Called by AutomatedFunctionalTestRunner.methodInvoker(org.junit.runners.model.FrameworkMethod, java.lang.Object) if test method ends with Bookmark.


enableNavigationMode

protected void enableNavigationMode()
Called by AutomatedFunctionalTestRunner.methodInvoker(org.junit.runners.model.FrameworkMethod, java.lang.Object) if test method ends with Nav.


getTestUrl

protected final String getTestUrl()
Returns:
testUrl

navigateInternal

protected void navigateInternal()
                         throws Exception
Calls navigate() if shouldNavigate is true.

Throws:
Exception


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.