Class RestCrowdClientTest
java.lang.Object
com.atlassian.crowd.acceptance.tests.applications.crowd.CrowdWebDriverTest
com.atlassian.crowd.acceptance.utils.CrowdWebTestCase
com.atlassian.crowd.acceptance.tests.applications.crowd.CrowdAcceptanceTestCase
com.atlassian.crowd.acceptance.tests.administration.RestCrowdClientTest
Tests the
RestCrowdClient
.-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.crowd.acceptance.utils.CrowdWebTestCase
CrowdWebTestCase.GenericPage, CrowdWebTestCase.TestContext
-
Field Summary
Fields inherited from class com.atlassian.crowd.acceptance.tests.applications.crowd.CrowdAcceptanceTestCase
ADMIN_PW, ADMIN_USER, BATCHED_TEST_RULE, EXPIRED_MAINTENANCE_KEY, logger, testkitClient, testName, testWatcher, URL_HOME, USER_DETAILS_TABLE_ID
Fields inherited from class com.atlassian.crowd.acceptance.tests.applications.crowd.CrowdWebDriverTest
applinksClient, BACKUP_RESOURCE, COOKIE_ABSENT, i18n, IMMUTABLE_USER_NAME, IMMUTABLE_USER_PW, JSESSIONID_COOKIE, log, REMEMBER_ME_COOKIE, restAdminClient, SSO_COOKIE, TEST_USER_DISPLAYNAME, TEST_USER_NAME, TEST_USER_PW, testedProduct, webDriverRules
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
addUser()
void
void
void
void
void
Tests thatRestCrowdClient
throws anOperationFailedException
if the RestCrowdClient is not communicating with a valid Crowd REST service.void
Tests thatRestCrowdClient
throws anInvalidAuthenticationException
if the application password is invalid.void
void
void
void
Tests thatCrowdClient.getNamesOfParentGroupsForGroup(String, int, int)
retrieves the correct parent group names.void
Tests thatCrowdClient.getNamesOfParentGroupsForGroup(String, int, int)
with an invalid start index will throw an OperationFailedException.void
Tests thatCrowdClient.getNamesOfParentGroupsForGroup(String, int, int)
for a non-existent group returns an empty list.void
Tests thatRestCrowdClient.getMemberships()
returns successfully.void
Tests thatCrowdClient.getParentGroupsForNestedGroup(String, int, int)
returns the correct nested group memberships for a group.void
Tests thatCrowdClient.getParentGroupsForNestedGroup(String, int, int)
returns an empty list for a non-existent group.void
Tests thatCrowdClient.getGroupsForNestedUser(String, int, int)
returns the correct nested group memberships for a user.void
Tests thatCrowdClient.getGroupsForNestedUser(String, int, int)
returns an empty list for a non-existent username.void
Tests thatCrowdClient.getNestedChildGroupsOfGroup(String, int, int)
returns the nested group members of group.void
Tests thatCrowdClient.getNestedChildGroupsOfGroup(String, int, int)
returns an empty list for a non-existent group.void
Tests thatCrowdClient.getNamesOfParentGroupsForNestedGroup(String, int, int)
returns the correct nested group name memberships of a group.void
Tests thatCrowdClient.getNamesOfParentGroupsForNestedGroup(String, int, int)
returns an empty list for a non-existent group.void
Tests thatCrowdClient.getNamesOfGroupsForNestedUser(String, int, int)
returns the correct group names for a nested user membervoid
Tests thatCrowdClient.getNamesOfGroupsForNestedUser(String, int, int)
returns an empty list for a non-existent username.void
Tests thatCrowdClient.getNamesOfNestedChildGroupsOfGroup(String, int, int)
returns the group names of nested group members.void
Tests thatCrowdClient.getNamesOfNestedChildGroupsOfGroup(String, int, int)
returns an empty list for a non-existent group.void
Tests thatCrowdClient.getNamesOfNestedUsersOfGroup(String, int, int)
returns the correct user names of nested members of a group.void
Tests thatCrowdClient.getNamesOfNestedUsersOfGroup(String, int, int)
returns an empty list for a non-existent group.void
void
getUser()
void
void
void
void
void
void
void
void
void
setUp()
void
void
void
tearDown()
void
void
void
void
void
void
Methods inherited from class com.atlassian.crowd.acceptance.tests.applications.crowd.CrowdAcceptanceTestCase
_loginAsUser, _logout, assertAtLoginForm, assertAtLoginForm, assertIsLoggedIn, assertIsLoggedOut, assertMatchInTableBody, assertNoMatchInTableBody, assertPageNotFound, assertUnescapedKeyNotPresent, assertUnescapedKeyPresent, assertUserInTable, assertUserInTable, assertUserNotInTable, disableIPValidation, doBackup, getGroupTableContents, getInstanceProperties, getUserDetailsTableContents, getUsersCount, getUsersForDirectory, gotoAddApplication, gotoAddGroup, gotoAddPrincipal, gotoAdministrationPage, gotoBrowseApplications, gotoBrowseDirectories, gotoBrowseGroups, gotoBrowseGroups, gotoBrowsePrincipals, gotoBrowsePrincipals, gotoCreateDirectory, gotoCurrentApplicationSessions, gotoCurrentPrincipalSessions, gotoGeneral, gotoImporters, gotoLdapConnectionPool, gotoLicensing, gotoLoggingProfiling, gotoMailServer, gotoMailTemplate, gotoRemovePrincipal, gotoRestore, gotoSAMLConfig, gotoSessionConfig, gotoSystemInfo, gotoTrustedProxies, gotoViewApplication, gotoViewApplicationDirectories, gotoViewGroup, gotoViewPrincipal, intendToModifyLdapData, isLoggedIn, isLoggedInAfterRefresh, log, loginAdmin, loginWithRestAndRedirectToStartPage, loginWithRestEndpoint, loginWithRestEndpoint, namesOf, performRequestWithCookieExchange, restGet, restoreCrowdFromXMLWithoutReloggingIn, restPost, userWithDetails, userWithUsernameAndDisplayName
Methods inherited from class com.atlassian.crowd.acceptance.utils.CrowdWebTestCase
addRequestHeader, assertButtonNotPresent, assertCheckboxNotPresent, assertCheckboxNotSelected, assertCheckboxPresent, assertCheckboxSelected, assertCheckboxSelected, assertElementIsDisabled, assertElementIsEnabled, assertElementNotPresent, assertElementNotPresentByXPath, assertElementPresent, assertElementPresentByXPath, assertErrorNotPresent, assertErrorPresent, assertErrorPresentWithKey, assertFieldErrorPresentWithKey, assertInfoPresent, assertKeyInElement, assertKeyNotPresent, assertKeyPresent, assertKeyPresent, assertKeyPresent, assertLinkNotPresent, assertLinkPresent, assertLinkPresentWithKey, assertMatchInTable, assertRadioOptionNotPresent, assertRadioOptionSelected, assertSelectedOptionEquals, assertSelectedOptionValueEquals, assertSelectOptionsEqual, assertSuccessPresent, assertTableNotPresent, assertTablePresent, assertTableRowCountEquals, assertTextFieldEquals, assertTextInElement, assertTextInTable, assertTextInTable, assertTextNotInTable, assertTextNotInTable, assertTextNotPresent, assertTextPresent, assertTitleEquals, assertTitleMatch, assertTitleNotEquals, assertWarningAndErrorNotPresent, assertWarningNotPresent, beginAt, checkCheckbox, checkCheckbox, clearCookies, clickButton, clickButtonWithText, clickElementByXPath, clickLink, clickLinkInNavbar, clickLinkInNavbarDropdown, clickLinkWithExactText, clickLinkWithKey, clickLinkWithText, clickRadioOption, closeBrowser, disableIpAddressValidation, equalToIgnoringWhiteSpace, findElementWithText, getBaseUrlIPv6, getElementById, getElementByXPath, getElementsByXPath, getElementTextById, getElementTextByXPath, getElementValueByID, getFinder, getLinkInNavbar, getLinkInNavbarDropdown, getMessage, getMessage, getName, getPageSource, getPageText, getPoller, getRadiosFromRadioGroup, getRadioWithValue, getRestAssuredCookies, getTable, getTestContext, getText, getTextForList, gotoPage, isElementWithIdPresent, isTextPresent, scrapeTable, scrapeTable, scrapeTable, selectOption, selectOption, selectOptionBy, selectOptionByValue, seleniumCookieToRestAssuredCookie, setRadioButton, setResourceBundleName, setTextField, setWorkingForm, setWorkingForm, submit, submit, uncheckCheckbox, waitForElementById, waitUntilPageLoad
Methods inherited from class com.atlassian.crowd.acceptance.tests.applications.crowd.CrowdWebDriverTest
assertAtRelativePath, assertAtURIContaining, assertAtURIEndingWith, assertAtUrl, assertHasError, assertHasErrorKey, bind, bind, clearAndInvalidateSsoCookieIfPresent, clearAndInvalidateSsoCookieOrFail, deleteAllCookies, deleteCookie, expectState, getBaseUrl, getBaseUrlWithoutPort, getCookie, getCookieOrThrow, getCurrentUrl, getDriver, getSsoCookieOrFail, getTestkitClient, hasCookie, hasSsoCookie, loginAsExpiredPasswordUser, loginAsNonAdmin, loginAsNonAdmin, loginAsSysAdmin, loginAsSysAdmin, loginAsSysAdminWithRememberMe, loginAsUser, loginExpectingFailure, loginImmutableUser, loginImmutableUser, loginTestUser, loginTestUser, logout, manage, navigateToAndBind, navigateToUrl, restoreBaseSetup, restoreCrowdFromXML, restoreCrowdFromXML, waitForUrl, waitUntilAsyncFinished
-
Constructor Details
-
RestCrowdClientTest
public RestCrowdClientTest()
-
-
Method Details
-
setUp
- Overrides:
setUp
in classCrowdAcceptanceTestCase
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
getUser
- Throws:
Exception
-
getUserByKey
- Throws:
Exception
-
getGroupNameMembershipsForGroup
Tests thatCrowdClient.getNamesOfParentGroupsForGroup(String, int, int)
retrieves the correct parent group names.- Throws:
Exception
-
getGroupNameMembershipsForGroup_InvalidStartIndex
Tests thatCrowdClient.getNamesOfParentGroupsForGroup(String, int, int)
with an invalid start index will throw an OperationFailedException.- Throws:
Exception
-
getGroupNameMembershipsForGroup_NonExistentGroup
Tests thatCrowdClient.getNamesOfParentGroupsForGroup(String, int, int)
for a non-existent group returns an empty list.- Throws:
Exception
-
getNestedUserNameMembersOfGroup
Tests thatCrowdClient.getNamesOfNestedUsersOfGroup(String, int, int)
returns the correct user names of nested members of a group.- Throws:
Exception
-
getNestedUserNameMembersOfGroup_NonExistentGroup
Tests thatCrowdClient.getNamesOfNestedUsersOfGroup(String, int, int)
returns an empty list for a non-existent group.- Throws:
Exception
-
getNestedGroupMembersOfGroup
Tests thatCrowdClient.getNestedChildGroupsOfGroup(String, int, int)
returns the nested group members of group.- Throws:
Exception
-
getNestedGroupMembersOfGroup_NonExistentGroup
Tests thatCrowdClient.getNestedChildGroupsOfGroup(String, int, int)
returns an empty list for a non-existent group.- Throws:
Exception
-
getNestedGroupNameMembersOfGroup
Tests thatCrowdClient.getNamesOfNestedChildGroupsOfGroup(String, int, int)
returns the group names of nested group members.- Throws:
Exception
-
getNestedGroupNameMembersOfGroup_NonExistent
Tests thatCrowdClient.getNamesOfNestedChildGroupsOfGroup(String, int, int)
returns an empty list for a non-existent group.- Throws:
Exception
-
getNestedGroupMembershipsForUser
Tests thatCrowdClient.getGroupsForNestedUser(String, int, int)
returns the correct nested group memberships for a user.- Throws:
Exception
-
getNestedGroupMembershipsForUser_NonExistent
Tests thatCrowdClient.getGroupsForNestedUser(String, int, int)
returns an empty list for a non-existent username.- Throws:
Exception
-
getNestedGroupNameMembershipsForUser
Tests thatCrowdClient.getNamesOfGroupsForNestedUser(String, int, int)
returns the correct group names for a nested user member- Throws:
Exception
-
getNestedGroupNameMembershipsForUser_NonExistent
Tests thatCrowdClient.getNamesOfGroupsForNestedUser(String, int, int)
returns an empty list for a non-existent username.- Throws:
Exception
-
getNestedGroupMembershipsForGroup
Tests thatCrowdClient.getParentGroupsForNestedGroup(String, int, int)
returns the correct nested group memberships for a group.- Throws:
Exception
-
getNestedGroupMembershipsForGroup_NonExistent
Tests thatCrowdClient.getParentGroupsForNestedGroup(String, int, int)
returns an empty list for a non-existent group.- Throws:
Exception
-
getNestedGroupNameMembershipsForGroup
Tests thatCrowdClient.getNamesOfParentGroupsForNestedGroup(String, int, int)
returns the correct nested group name memberships of a group.- Throws:
Exception
-
getNestedGroupNameMembershipsForGroup_NonExistent
Tests thatCrowdClient.getNamesOfParentGroupsForNestedGroup(String, int, int)
returns an empty list for a non-existent group.- Throws:
Exception
-
addUser
- Throws:
Exception
-
addUserWithAttributes
- Throws:
Exception
-
userIsReturnedFromServer
- Throws:
Exception
-
addUserWithEncryptedPassword
- Throws:
Exception
-
renameUser
- Throws:
Exception
-
updateUserCredential
- Throws:
Exception
-
updateUserCredentialToNone
- Throws:
Exception
-
updateUserCredentialPasswordDoesNotMatchDirectoryComplexityRequirement
public void updateUserCredentialPasswordDoesNotMatchDirectoryComplexityRequirement() throws Exception- Throws:
Exception
-
connectToInvalidRestService
Tests thatRestCrowdClient
throws anOperationFailedException
if the RestCrowdClient is not communicating with a valid Crowd REST service.- Throws:
Exception
-
connectToRestService_WrongPassword
Tests thatRestCrowdClient
throws anInvalidAuthenticationException
if the application password is invalid.- Throws:
Exception
-
getMemberships
Tests thatRestCrowdClient.getMemberships()
returns successfully. The content of the response is tested byGroupsResourceTest#testGetMembershipsReturnsExactlyExpectedMemberships
in crowd-rest-test.- Throws:
Exception
-
queryForNullFirstNames
- Throws:
Exception
-
searchUsersWithAttributes
- Throws:
Exception
-
searchGroupsWithAttributes
- Throws:
Exception
-
mailUsernamesFailsWithUnknownAddress
- Throws:
Exception
-
updateGroupWithAttributes
- Throws:
Exception
-
SSOUserWithDefaultTokenDuration
- Throws:
Exception
-
SSOUserWithZeroLivedToken
- Throws:
Exception
-
invalidateAllSSOTokensForUser
- Throws:
Exception
-
invalidateAllOtherSSOTokensForUser
- Throws:
Exception
-
findUserFromValidSSOToken
- Throws:
Exception
-
findUserFromInvalidSSOToken
- Throws:
Exception
-
findUserFromNonExistentSSOToken
- Throws:
Exception
-
getNonExistingWebhook
- Throws:
Exception
-
unregisterNonExistingWebhook
- Throws:
Exception
-
addUserToGroup
- Throws:
Exception
-
addUserToGroupWhenMembershipAlreadyExists
- Throws:
Exception
-
addGroupToGroup
- Throws:
Exception
-
addGroupToGroupWhenMembershipAlreadyExists
- Throws:
Exception
-