Skip to content

Commit

Permalink
master<---JCSP-474: Global search (#66)
Browse files Browse the repository at this point in the history
* JCSP-474: Global search

* JCSP-474: wrong  class invocation fixes

Co-authored-by: Nataliia Shavshyna <[email protected]>
  • Loading branch information
NataliiaShavshyna and Nataliia Shavshyna authored Jul 9, 2020
1 parent c014558 commit 168999b
Show file tree
Hide file tree
Showing 11 changed files with 154 additions and 220 deletions.
11 changes: 1 addition & 10 deletions custom-vu/src/main/kotlin/jces1209/vu/JiraCloudScenario.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ class JiraCloudScenario : Scenario {
projectMemory = similarities.projectMemory,
createIssueButtons = listOf(By.id("createGlobalItem"), By.id("createGlobalItemIconButton"))
),
searchWithJql = SearchCloudFilter(
jira = jira,
meter = meter,
filters = similarities.filtersMemory
),
browseProjects = BrowseCloudProjects(
jira = jira,
meter = meter,
Expand All @@ -75,12 +70,8 @@ class JiraCloudScenario : Scenario {
projectKeyMemory = similarities.projectMemory,
browseProjectPage = CloudProjectNavigatorPage(jira.driver)
),
customizeColumns = CustomizeColumns(
jira = jira,
meter = meter,
columnsEditor = CloudColumnsEditor(jira.driver)
),
issueNavigator = CloudIssueNavigator(jira.driver),
columnsEditor = CloudColumnsEditor(jira.driver),
topBar = CloudTopBar(jira.driver)
)
}
Expand Down
16 changes: 3 additions & 13 deletions custom-vu/src/main/kotlin/jces1209/vu/JiraDcScenario.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter
import com.atlassian.performance.tools.jiraactions.api.memories.UserMemory
import com.atlassian.performance.tools.jiraactions.api.scenario.JiraCoreScenario
import com.atlassian.performance.tools.jiraactions.api.scenario.Scenario
import jces1209.vu.action.BrowseProjectIssues
import jces1209.vu.action.CreateAnIssue
import jces1209.vu.action.CustomizeColumns
import jces1209.vu.action.SearchServerFilter
import jces1209.vu.action.*
import jces1209.vu.action.WorkOnDashboard
import jces1209.vu.page.DcIssueNavigator
import jces1209.vu.page.DcIssuePage
import jces1209.vu.page.bars.topBar.dc.DcTopBar
Expand Down Expand Up @@ -55,11 +54,6 @@ class JiraDcScenario : Scenario {
projectMemory = similarities.projectMemory,
createIssueButtons = listOf(By.id("create_link"))
),
searchWithJql = SearchServerFilter(
jira = jira,
meter = meter,
filters = similarities.filtersMemory
),
browseProjects = BrowseProjectsAction(
jira = jira,
meter = meter,
Expand All @@ -77,12 +71,8 @@ class JiraDcScenario : Scenario {
projectKeyMemory = similarities.projectMemory,
browseProjectPage = DcProjectNavigatorPage(jira.driver)
),
customizeColumns = CustomizeColumns(
jira = jira,
meter = meter,
columnsEditor = DcColumnsEditor(jira.driver)
),
issueNavigator = DcIssueNavigator(jira.driver),
columnsEditor = DcColumnsEditor(jira.driver),
topBar = DcTopBar(jira.driver)
)
}
Expand Down
3 changes: 3 additions & 0 deletions custom-vu/src/main/kotlin/jces1209/vu/MeasureType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ class MeasureType {
@JvmField
var OPEN_MEDIA_VIEWER = ActionType("Quick search top bar") { Unit }

@JvmField
var OPEN_GLOBAL_SEARCH = ActionType("Quick search top bar") { Unit }

@JvmField
var VIEW_DASHBOARDS = ActionType("View Dasboards List") { Unit }

Expand Down
50 changes: 25 additions & 25 deletions custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,15 @@ import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter
import com.atlassian.performance.tools.jiraactions.api.memories.adaptive.AdaptiveIssueKeyMemory
import com.atlassian.performance.tools.jiraactions.api.memories.adaptive.AdaptiveJqlMemory
import com.atlassian.performance.tools.jiraactions.api.memories.adaptive.AdaptiveProjectMemory
import jces1209.vu.action.BrowseBoards
import jces1209.vu.action.BrowsePopularFilters
import jces1209.vu.action.ViewBoard
import jces1209.vu.action.WorkAnIssue
import jces1209.vu.action.*
import jces1209.vu.memory.BoardPagesMemory
import jces1209.vu.memory.SeededMemory
import jces1209.vu.page.AbstractIssuePage
import jces1209.vu.page.IssueNavigator
import jces1209.vu.page.JiraTips
import jces1209.vu.page.bars.topBar.TopBar
import jces1209.vu.page.boards.browse.BrowseBoardsPage
import jces1209.vu.action.*
import jces1209.vu.memory.BoardPagesMemory
import jces1209.vu.memory.SeededMemory
import jces1209.vu.page.customizecolumns.ColumnsEditor
import jces1209.vu.page.filters.FiltersPage
import java.net.URI
import java.util.*
Expand All @@ -42,19 +39,16 @@ class ScenarioSimilarities(
filtersPage: FiltersPage,
browseBoardsPage: BrowseBoardsPage,
createIssue: Action,
searchWithJql: Action,
browseProjects: Action,
workOnDashboard: Action,
browseProjectIssues: Action,
customizeColumns: Action,
issueNavigator: IssueNavigator,
columnsEditor: ColumnsEditor,
topBar: TopBar
): List<Action> = assembleScenario(
createIssue = createIssue,
customizeColums = customizeColumns,
workOnDashboard = workOnDashboard,
searchWithJql = searchWithJql,
workAnIssue = WorkAnIssue(
workAnIssue = WorkOnIssue(
issuePage = issuePage,
jira = jira,
meter = meter,
Expand All @@ -63,7 +57,7 @@ class ScenarioSimilarities(
editProbability = 0.00f, // 0.10f if we can mutate data
commentProbability = 0.00f, // 0.04f if we can mutate data
linkIssueProbability = 0.00f, // 0.10f if we can mutate data
attachScreenShotProbability = 0.00f,
attachScreenShotProbability = 0.05f,
changeAssigneeProbability = 0.00f,
mentionUserProbability = 0.00f,
transitionProbability = 0.00f,
Expand Down Expand Up @@ -96,11 +90,6 @@ class ScenarioSimilarities(
configureBoardProbability = 0.05f,
contextOperationProbability = 0.05f
),
workOnSearchResults = WorkOnSearchResults(
issueNavigator = issueNavigator,
jira = jira,
meter = meter
),
workOnSprint = WorkOnSprint(
meter = meter,
backlogsMemory = boardsMemory.backlog,
Expand All @@ -112,13 +101,26 @@ class ScenarioSimilarities(
topBar = topBar,
jira = jira,
meter = meter
),
workOnSearch = WorkOnSearch(
issueNavigator = issueNavigator,
jira = jira,
meter = meter,
columnsEditor = columnsEditor,
random = seededRandom,
filters = filtersMemory,
jqlMemory = jqlMemory,
issueKeyMemory = issueKeyMemory,
searchFilterProbability = 0.50f,
searchJclProbability = 0.05f,
globalSearchProbability = 0.05f,
customizeColumnsProbability = 0.05f,
switchBetweenIssuesProbability = 0.05f
)
)

private fun assembleScenario(
createIssue: Action,
customizeColums: Action,
searchWithJql: Action,
workAnIssue: Action,
projectSummary: Action,
browseProjects: Action,
Expand All @@ -128,14 +130,12 @@ class ScenarioSimilarities(
workOnDashboard: Action,
workOnSprint: WorkOnSprint,
browseProjectIssues: Action,
workOnSearchResults: Action,
workOnSearch: Action,
workOnTopBar: Action
): List<Action> {
val exploreData = listOf(browseProjects, browseFilters, browseBoards)
val spreadOut = mapOf(
createIssue to 0, // 5 if we can mutate data
customizeColums to 30,
searchWithJql to 20,
workAnIssue to 55,
projectSummary to 5,
browseProjects to 5,
Expand All @@ -144,8 +144,8 @@ class ScenarioSimilarities(
workOnDashboard to 5,
workOnSprint to 10,
browseProjectIssues to 5,
workOnSearchResults to 10,
workOnTopBar to 5
workOnTopBar to 5,
workOnSearch to 5
)
.map { (action, proportion) -> Collections.nCopies(proportion, action) }
.flatten()
Expand Down
29 changes: 0 additions & 29 deletions custom-vu/src/main/kotlin/jces1209/vu/action/CustomizeColumns.kt

This file was deleted.

26 changes: 0 additions & 26 deletions custom-vu/src/main/kotlin/jces1209/vu/action/SearchCloudFilter.kt

This file was deleted.

40 changes: 0 additions & 40 deletions custom-vu/src/main/kotlin/jces1209/vu/action/SearchCloudJql.kt

This file was deleted.

49 changes: 0 additions & 49 deletions custom-vu/src/main/kotlin/jces1209/vu/action/SearchServerFilter.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import org.apache.logging.log4j.Logger
/**
* Works for both Cloud and Data Center.
*/
class WorkAnIssue(
class WorkOnIssue(
private val issuePage: AbstractIssuePage,
private val jira: WebJira,
private val meter: ActionMeter,
Expand Down
Loading

0 comments on commit 168999b

Please sign in to comment.