Class TestOptimisedUserSearch
java.lang.Object
com.atlassian.jira.functest.framework.BaseJiraFuncTest
com.atlassian.jira.webtests.ztests.project.security.TestOptimisedUserSearch
- Direct Known Subclasses:
TestOptimisedUserSearchInAssignees,TestOptimisedUserSearchInMentions
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enumprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected static final com.atlassian.jira.testkit.client.log.FuncTestLoggerprotected intprotected static final Stringprotected Stringprotected Stringorg.junit.rules.TestNameprotected Longprotected com.atlassian.jira.testkit.client.PermissionSchemesControlprotected static final longprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected UserAnonymizeControlprotected com.atlassian.jira.testkit.client.restclient.WatchersClientFields inherited from class com.atlassian.jira.functest.framework.BaseJiraFuncTest
assertions, backdoor, environmentData, initClass, navigation, tester, testRule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilterOutColdCacheMeasures(List<Long> value) protected static longgetAverage(List<Long> values) protected LonggetCfIdAsLong(String cfIdAsString) protected static longprotected static longprotected static longprotected abstract ProjectPermissionKeyprotected abstract TestOptimisedUserSearch.UserSearchResultsprotected abstract TestOptimisedUserSearch.UserSearchResultsgetUserSearchResults(String query) protected abstract booleanprotected static Stringprotected voidmultiplePermissionsCorrectOrderingAssertion(String admin, String userAndrzej, String userAnkit, String userAntoni, String userDaria, String userJakub, String userKamil, String userKarol, String userMaciej, String userSzymonG, String userSzymonK) static voidprotected voidprotected voidprotected voidprotected voidprotected abstract voidsearchPerformanceWithManyResultsAssertion(List<String> firstNJiraUsers, int expectedMentionsCount) protected voidsetAssignee(String issueKey, String username) protected voidsetCustomFieldValue(String issueKey, String customFieldType, String customFieldId, String... values) protected voidsetReporter(String issueKey, String username) voidsetUp()voidtearDown()voidvoidvoidvoidvoidvoidvoidvoidWe return values ordered case sensitive, but we limit them beforehand case insensitive o_O.voidvoidprotected voidtestSearchPerformance(TestOptimisedUserSearch.TestType testType, org.hamcrest.Matcher expectedUsers) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidThe following two tests are very slow, hence we don't run them automatically.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidThis test shows the greatest regression of the new mentions mechanism.voidvoidvoidMethods inherited from class com.atlassian.jira.functest.framework.BaseJiraFuncTest
getAssertions, getBackdoor, getEnvironmentData, getTester
-
Field Details
-
USER_ALICE
-
USER_BOB
-
USER_ALBERT
-
USER_ANNA
-
PROJECT_KEY
- See Also:
-
PROJECT_ID
protected static final long PROJECT_ID- See Also:
-
permissionSchemesControl
protected com.atlassian.jira.testkit.client.PermissionSchemesControl permissionSchemesControl -
watchersClient
protected com.atlassian.jira.testkit.client.restclient.WatchersClient watchersClient -
userAnonymizeControl
-
issueKey
-
permissionSchemeId
-
maxResults
protected int maxResults -
MULTI_SELECT_CUSTOM_FIELD
- See Also:
-
multiSelectCustomFieldId
-
multiUserPickerCustomFieldId
-
logger
protected static final com.atlassian.jira.testkit.client.log.FuncTestLogger logger -
name
public org.junit.rules.TestName name
-
-
Constructor Details
-
TestOptimisedUserSearch
public TestOptimisedUserSearch()
-
-
Method Details
-
setUp
public void setUp() -
tearDown
public void tearDown() -
printResults
public static void printResults() -
issueAlreadyExists
protected abstract boolean issueAlreadyExists() -
getUserSearchResults
-
getUserSearchResults
-
getPermission
-
testSearchPerformanceWithUsers
public void testSearchPerformanceWithUsers() -
testSearchPerformanceWithGroup
public void testSearchPerformanceWithGroup() -
testSearchPerformanceWithFiveExplicitUsersAndEveryone
public void testSearchPerformanceWithFiveExplicitUsersAndEveryone() -
testSearchPerformanceWithApplicationRole
public void testSearchPerformanceWithApplicationRole() -
testSearchPerformanceWithProjectRoleUsers
public void testSearchPerformanceWithProjectRoleUsers() -
testSearchPerformanceWithProjectRoleGroup
public void testSearchPerformanceWithProjectRoleGroup() -
testSearchPerformanceWithProjectLeadUser
public void testSearchPerformanceWithProjectLeadUser() -
testSearchPerformanceWithProjectLeadUserButNoPermissions
public void testSearchPerformanceWithProjectLeadUserButNoPermissions() -
testSearchPerformanceWithGroupPickerCustomField
public void testSearchPerformanceWithGroupPickerCustomField() -
testSearchPerformanceWithMultiGroupPickerCustomFieldId
public void testSearchPerformanceWithMultiGroupPickerCustomFieldId() -
testSearchPerformanceWithSelectCustomField
public void testSearchPerformanceWithSelectCustomField() -
testSearchPerformanceWithMultiSelectCustomField
public void testSearchPerformanceWithMultiSelectCustomField() -
testSearchPerformanceWithMultiSelectCustomFieldHavingSelectedOptionsThatAreNotAGroup
public void testSearchPerformanceWithMultiSelectCustomFieldHavingSelectedOptionsThatAreNotAGroup() -
testSearchPerformanceWithUserPickerCustomField
public void testSearchPerformanceWithUserPickerCustomField() -
testSearchPerformanceWithMultiUserPickerCustomField
public void testSearchPerformanceWithMultiUserPickerCustomField() -
testSearchPerformanceWithGroupThatHasSixNestedGroups
public void testSearchPerformanceWithGroupThatHasSixNestedGroups() -
testSearchPerformanceWithGroupThatHasManyGroups
public void testSearchPerformanceWithGroupThatHasManyGroups() -
testSearchCorrectnessCaseSensitiveOrder
public void testSearchCorrectnessCaseSensitiveOrder() -
testSearchCorrectnessCaseSensitiveOrderWithLimitedQueriesUserPermissions
public void testSearchCorrectnessCaseSensitiveOrderWithLimitedQueriesUserPermissions()We return values ordered case sensitive, but we limit them beforehand case insensitive o_O. So, when we get 5 results, we get admin, Anna, Zuzanna, albert, zachary, but when we get 3 results, we get admin, Anna, albert. -
testSearchCorrectnessCaseSensitiveOrderUserAndGroupPermissions
public void testSearchCorrectnessCaseSensitiveOrderUserAndGroupPermissions() -
testSearchCorrectnessCaseSensitiveOrderWithLimitedQueriesUserAndGroupPermissions
public void testSearchCorrectnessCaseSensitiveOrderWithLimitedQueriesUserAndGroupPermissions() -
testSearchCorrectnessDifferentFields
public void testSearchCorrectnessDifferentFields() -
testSearchCorrectnessDifferentPartOfDisplayName
public void testSearchCorrectnessDifferentPartOfDisplayName() -
testSearchPerformanceWithManyResults
public void testSearchPerformanceWithManyResults() -
searchPerformanceWithManyResultsAssertion
-
testSearchPerformanceWithThreeLetterQuery
public void testSearchPerformanceWithThreeLetterQuery() -
testSearchPerformanceWithThreeLetterQueryButAllJiraUsersAllowed
public void testSearchPerformanceWithThreeLetterQueryButAllJiraUsersAllowed()This test shows the greatest regression of the new mentions mechanism. It takes invalid input: '<'40ms for the old one and >400ms for the new one. https://bulldog.internal.atlassian.com/browse/UCACHE-71 -
testSearchPerformanceWithGroupAny
public void testSearchPerformanceWithGroupAny() -
testSearchPerformanceWithApplicationRoleAnyLoggedInUser
public void testSearchPerformanceWithApplicationRoleAnyLoggedInUser() -
testMultiplePermissionsCorrectOrdering
public void testMultiplePermissionsCorrectOrdering() -
multiplePermissionsCorrectOrderingAssertion
-
testAnonymizedUserDoesNotAppearInSearch
public void testAnonymizedUserDoesNotAppearInSearch() -
testInactiveUserDoesNotAppearInSearch
public void testInactiveUserDoesNotAppearInSearch() -
testDeletedUserDoesNotAppearInSearch
public void testDeletedUserDoesNotAppearInSearch() -
testUsersFromDeletedGroupDoesNotAppearInSearch
public void testUsersFromDeletedGroupDoesNotAppearInSearch() -
testSearchPerformanceWhenIssueIsUnassigned
public void testSearchPerformanceWhenIssueIsUnassigned() -
searchPerformanceWhenIssueIsUnassignedAssertion
protected void searchPerformanceWhenIssueIsUnassignedAssertion() -
testSearchPerformanceWhenReporterIsNotSet
public void testSearchPerformanceWhenReporterIsNotSet() -
searchPerformanceWhenReporterIsNotSetAssertion
protected void searchPerformanceWhenReporterIsNotSetAssertion() -
testSearchPerformanceWhenUserPickerCustomFieldHasNoValue
public void testSearchPerformanceWhenUserPickerCustomFieldHasNoValue() -
testSearchPerformanceWhenGroupPickerCustomFieldHasNoValue
public void testSearchPerformanceWhenGroupPickerCustomFieldHasNoValue() -
testSearchPerformanceAfterAssigneeIsAnonymized
public void testSearchPerformanceAfterAssigneeIsAnonymized() -
searchPerformanceAfterAssigneeIsAnonymizedAssertion
protected void searchPerformanceAfterAssigneeIsAnonymizedAssertion() -
testSearchPerformanceAfterUserInCustomFieldIsAnonymized
public void testSearchPerformanceAfterUserInCustomFieldIsAnonymized() -
testSearchPerformanceAfterReporterIsAnonymized
public void testSearchPerformanceAfterReporterIsAnonymized() -
searchPerformanceAfterReporterIsAnonymizedAssertion
protected void searchPerformanceAfterReporterIsAnonymizedAssertion() -
testSearchPerformanceForUserWithNoApplicationAccess
public void testSearchPerformanceForUserWithNoApplicationAccess() -
testSearchPerformanceWithManyBigGroups
public void testSearchPerformanceWithManyBigGroups() -
testSearchPerformanceWithManyUserPermissions
public void testSearchPerformanceWithManyUserPermissions()The following two tests are very slow, hence we don't run them automatically. We must add some issue key, because Jira Metrics build is allergic to ignores without a key. -
testSearchPerformanceWithManyUserPermissionsWithPrefix
public void testSearchPerformanceWithManyUserPermissionsWithPrefix() -
testSearchPerformance
protected void testSearchPerformance(TestOptimisedUserSearch.TestType testType, org.hamcrest.Matcher expectedUsers) - Parameters:
expectedUsers- raw Matcher, because sometimes we needMatchers.contains(org.hamcrest.Matcher<? super E>...), while at other times we needMatchers.hasSize(int).
-
setCustomFieldValue
-
setReporter
-
setAssignee
-
getCfIdAsLong
-
ldapUser
-
getAverage
-
getMin
-
getMax
-
getMedian
-
filterOutColdCacheMeasures
-