it.com.atlassian.studio.haup.functests
Class HaupFuncTestBase

java.lang.Object
  extended by it.com.atlassian.studio.haup.functests.HaupFuncTestBase
Direct Known Subclasses:
AccessRightTest, AddUserWithAppPermissionsPageTest, ApplicationAccessPageTest, BulkAddApplicationAccessPageTest, EditDefaultAccessPageTest, ExceededLicencesTest, RevokeAccessWarningMessageTest, ViewUserWithAppPermissionsPageTest

public class HaupFuncTestBase
extends Object


Nested Class Summary
static class HaupFuncTestBase.FailureListener
           
 
Field Summary
protected static com.atlassian.crowd.pageobjects.CrowdTestedProduct CROWD_PRODUCT
           
protected static String JIRA_ADMIN_PASSWORD
           
protected static String JIRA_ADMIN_USERNAME
           
protected static int LICENSE_COUNT_BAMBOO
           
protected static int LICENSE_COUNT_CONFLUENCE
           
protected static int LICENSE_COUNT_FECRU
           
protected static int LICENSE_COUNT_JIRA
          The license counts must match those defined in Studio's StudioEnvironmentData.STUDIO_HAUP_TEST_LICENSE.
protected static String LICENSE_COUNT_UNLIMITED
           
protected static JiraTestedProduct PRODUCT
           
 
Constructor Summary
HaupFuncTestBase()
           
 
Method Summary
protected  void assertMessages(AbstractHaupPage page, String... expectedMessageExcerpts)
          Asserts the page contains some messages.
protected  String getCrowdBackupFileName()
          Returns the name of the crowd backup file to restore when the test is being setup.
protected static String getCrowdSysadminPassword()
          Get crowd sysadmin password as will be used in test.
protected static String getCrowdSysadminUsername()
          Get crowd sysadmin username as will be used in test.
protected static String getJiraSysadminPassword()
          Get jira sysadmin password as will be used in test.
protected static String getJiraSysadminUsername()
          Get jira sysadmin username as will be used in test.
protected  void loginToJira(String username, String password)
          Login to jira.
protected  void restoreJiraState(String backupFilename)
          Restores Jira state using the given backup file.
 void setupTest()
           
 void tearDownTest()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LICENSE_COUNT_JIRA

protected static final int LICENSE_COUNT_JIRA
The license counts must match those defined in Studio's StudioEnvironmentData.STUDIO_HAUP_TEST_LICENSE.

See Also:
Constant Field Values

LICENSE_COUNT_CONFLUENCE

protected static final int LICENSE_COUNT_CONFLUENCE
See Also:
Constant Field Values

LICENSE_COUNT_FECRU

protected static final int LICENSE_COUNT_FECRU
See Also:
Constant Field Values

LICENSE_COUNT_BAMBOO

protected static final int LICENSE_COUNT_BAMBOO
See Also:
Constant Field Values

LICENSE_COUNT_UNLIMITED

protected static final String LICENSE_COUNT_UNLIMITED
See Also:
Constant Field Values

PRODUCT

protected static JiraTestedProduct PRODUCT

CROWD_PRODUCT

protected static com.atlassian.crowd.pageobjects.CrowdTestedProduct CROWD_PRODUCT

JIRA_ADMIN_USERNAME

protected static final String JIRA_ADMIN_USERNAME
See Also:
Constant Field Values

JIRA_ADMIN_PASSWORD

protected static final String JIRA_ADMIN_PASSWORD
See Also:
Constant Field Values
Constructor Detail

HaupFuncTestBase

public HaupFuncTestBase()
Method Detail

setupTest

public void setupTest()

tearDownTest

public void tearDownTest()

getCrowdBackupFileName

protected String getCrowdBackupFileName()
Returns the name of the crowd backup file to restore when the test is being setup.

Returns:
name of the backup filename

loginToJira

protected void loginToJira(String username,
                           String password)
Login to jira.


restoreJiraState

protected void restoreJiraState(String backupFilename)
Restores Jira state using the given backup file. Put the file under haup-plugin/src/test/resources/jira/home/import.

Parameters:
backupFilename - name of the backup file

getJiraSysadminUsername

protected static String getJiraSysadminUsername()
Get jira sysadmin username as will be used in test.

Returns:
jira sysadmin username

getJiraSysadminPassword

protected static String getJiraSysadminPassword()
Get jira sysadmin password as will be used in test.

Returns:
jira sysadmin password

getCrowdSysadminUsername

protected static String getCrowdSysadminUsername()
Get crowd sysadmin username as will be used in test.

Returns:
crowd sysadmin username

getCrowdSysadminPassword

protected static String getCrowdSysadminPassword()
Get crowd sysadmin password as will be used in test.

Returns:
crowd sysadmin password

assertMessages

protected void assertMessages(AbstractHaupPage page,
                              String... expectedMessageExcerpts)
Asserts the page contains some messages. Utility method for the tests. It is based on the CSS class "aui-message".

Parameters:
page - HAUP page
expectedMessageExcerpts - a substring of each message that must be found in the page. Those substrings must be specific enough to prevent from matching 2 messages (otherwise the behaviour is undefined - an AssertionError may be thrown).
Throws:
AssertionError - if the number of messages is different or if one message contains none of the strings given as parameter


Copyright © 2002-2012 Atlassian. All Rights Reserved.