From 6afd4416707b204d3ca225b2292082145cfcfed2 Mon Sep 17 00:00:00 2001 From: Nataliia Shavshyna Date: Wed, 17 Jun 2020 15:09:17 +0300 Subject: [PATCH 01/14] JCSP-474: Global search --- .../kotlin/jces1209/vu/JiraCloudScenario.kt | 13 +- .../main/kotlin/jces1209/vu/JiraDcScenario.kt | 16 +-- .../main/kotlin/jces1209/vu/MeasureType.kt | 3 + .../jces1209/vu/ScenarioSimilarities.kt | 55 ++++---- .../jces1209/vu/action/CustomizeColumns.kt | 29 ----- .../jces1209/vu/action/SearchCloudFilter.kt | 26 ---- .../jces1209/vu/action/SearchCloudJql.kt | 40 ------ .../jces1209/vu/action/SearchServerFilter.kt | 49 ------- .../action/{WorkAnIssue.kt => WorkOnIssue.kt} | 2 +- .../kotlin/jces1209/vu/action/WorkOnSearch.kt | 121 ++++++++++++++++++ .../jces1209/vu/action/WorkOnSearchResults.kt | 27 ---- 11 files changed, 158 insertions(+), 223 deletions(-) delete mode 100644 custom-vu/src/main/kotlin/jces1209/vu/action/CustomizeColumns.kt delete mode 100644 custom-vu/src/main/kotlin/jces1209/vu/action/SearchCloudFilter.kt delete mode 100644 custom-vu/src/main/kotlin/jces1209/vu/action/SearchCloudJql.kt delete mode 100644 custom-vu/src/main/kotlin/jces1209/vu/action/SearchServerFilter.kt rename custom-vu/src/main/kotlin/jces1209/vu/action/{WorkAnIssue.kt => WorkOnIssue.kt} (99%) create mode 100644 custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearch.kt delete mode 100644 custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearchResults.kt diff --git a/custom-vu/src/main/kotlin/jces1209/vu/JiraCloudScenario.kt b/custom-vu/src/main/kotlin/jces1209/vu/JiraCloudScenario.kt index e1a76fe..d9d026d 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/JiraCloudScenario.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/JiraCloudScenario.kt @@ -11,7 +11,7 @@ import jces1209.vu.page.CloudIssueNavigator import jces1209.vu.page.CloudIssuePage import jces1209.vu.page.bars.topBar.cloud.CloudTopBar import jces1209.vu.page.boards.browse.cloud.CloudBrowseBoardsPage -import jces1209.vu.page.customizecolumns.CloudColumnsEditor +import jces1209.vu.page.customizecolumns.DcColumnsEditor import jces1209.vu.page.dashboard.cloud.CloudDashboardPage import jces1209.vu.page.filters.CloudFiltersPage import jces1209.vu.page.project.CloudProjectNavigatorPage @@ -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, @@ -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 = DcColumnsEditor(jira.driver), topBar = CloudTopBar(jira.driver) ) } diff --git a/custom-vu/src/main/kotlin/jces1209/vu/JiraDcScenario.kt b/custom-vu/src/main/kotlin/jces1209/vu/JiraDcScenario.kt index 467e0bd..4159a5d 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/JiraDcScenario.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/JiraDcScenario.kt @@ -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 @@ -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, @@ -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) ) } diff --git a/custom-vu/src/main/kotlin/jces1209/vu/MeasureType.kt b/custom-vu/src/main/kotlin/jces1209/vu/MeasureType.kt index 0b62744..f218a5f 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/MeasureType.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/MeasureType.kt @@ -82,5 +82,8 @@ class MeasureType { @JvmField var OPEN_MEDIA_VIEWER = ActionType("Quick search top bar") { Unit } + + @JvmField + var OPEN_GLOBAL_SEARCH = ActionType("Quick search top bar") { Unit } } } diff --git a/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt b/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt index 491e8c5..f46687b 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt @@ -9,18 +9,16 @@ 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 com.atlassian.performance.tools.jiraactions.api.page.IssueNavigatorPage +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.* @@ -42,19 +40,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 = assembleScenario( createIssue = createIssue, - customizeColums = customizeColumns, workOnDashboard = workOnDashboard, - searchWithJql = searchWithJql, - workAnIssue = WorkAnIssue( + workAnIssue = WorkOnIssue( issuePage = issuePage, jira = jira, meter = meter, @@ -63,10 +58,10 @@ 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, - contextOperationProbability = 0.05f + mentionUserProbability = 0.01f, + contextOperationProbability = 0.01f ), projectSummary = ProjectSummaryAction( jira = jira, @@ -99,11 +94,6 @@ class ScenarioSimilarities( configureBoardProbability = 0.05f, contextOperationProbability = 0.05f ), - workOnSearchResults = WorkOnSearchResults( - issueNavigator = issueNavigator, - jira = jira, - meter = meter - ), workOnSprint = WorkOnSprint( meter = meter, backlogsMemory = boardsMemory.backlog, @@ -115,13 +105,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, viewDashboard: Action, @@ -132,14 +135,12 @@ class ScenarioSimilarities( workOnDashboard: Action, workOnSprint: WorkOnSprint, browseProjectIssues: Action, - workOnSearchResults: Action, + workOnSearch: Action, workOnTopBar: Action ): List { 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, @@ -149,8 +150,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() diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/CustomizeColumns.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/CustomizeColumns.kt deleted file mode 100644 index a086022..0000000 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/CustomizeColumns.kt +++ /dev/null @@ -1,29 +0,0 @@ -package jces1209.vu.action; - -import com.atlassian.performance.tools.jiraactions.api.WebJira -import com.atlassian.performance.tools.jiraactions.api.action.Action -import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter -import jces1209.vu.MeasureType.Companion.CUSTOMIZE_COLUMNS -import jces1209.vu.page.customizecolumns.ColumnsEditor -import org.apache.logging.log4j.LogManager -import org.apache.logging.log4j.Logger - -class CustomizeColumns( - private val jira: WebJira, - private val meter: ActionMeter, - private val columnsEditor: ColumnsEditor -) : Action { - private val logger: Logger = LogManager.getLogger(this::class.java) - - override fun run() { - jira.goToIssueNavigator("resolution = Unresolved ORDER BY priority DESC") - meter.measure( - key = CUSTOMIZE_COLUMNS, - action = { - columnsEditor.openEditor() - columnsEditor.selectItems(2) - columnsEditor.submitSelection() - } - ) - } -} diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/SearchCloudFilter.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/SearchCloudFilter.kt deleted file mode 100644 index bcf3515..0000000 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/SearchCloudFilter.kt +++ /dev/null @@ -1,26 +0,0 @@ -package jces1209.vu.action - -import com.atlassian.performance.tools.jiraactions.api.SEARCH_WITH_JQL -import com.atlassian.performance.tools.jiraactions.api.WebJira -import com.atlassian.performance.tools.jiraactions.api.action.Action -import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter -import com.atlassian.performance.tools.jiraactions.api.memories.Memory -import jces1209.vu.page.CloudIssueNavigator -import java.net.URI - -class SearchCloudFilter( - private val jira: WebJira, - private val meter: ActionMeter, - private val filters: Memory -) : Action { - override fun run() { - val filter = filters.recall()!! - meter.measure( - key = SEARCH_WITH_JQL, - action = { - jira.navigateTo(filter.toString()) - CloudIssueNavigator(jira.driver).waitForNavigator() - } - ) - } -} diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/SearchCloudJql.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/SearchCloudJql.kt deleted file mode 100644 index 2440b7c..0000000 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/SearchCloudJql.kt +++ /dev/null @@ -1,40 +0,0 @@ -package jces1209.vu.action - -import com.atlassian.performance.tools.jiraactions.api.SEARCH_WITH_JQL -import com.atlassian.performance.tools.jiraactions.api.WebJira -import com.atlassian.performance.tools.jiraactions.api.action.Action -import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter -import com.atlassian.performance.tools.jiraactions.api.memories.IssueKeyMemory -import com.atlassian.performance.tools.jiraactions.api.memories.JqlMemory -import com.atlassian.performance.tools.jiraactions.api.observation.SearchJqlObservation -import com.atlassian.performance.tools.jiraactions.api.page.IssueNavigatorPage -import jces1209.vu.page.CloudIssueNavigator -import javax.json.JsonObject - -class SearchCloudJql( - private val jira: WebJira, - private val meter: ActionMeter, - private val jqlMemory: JqlMemory, - private val issueKeyMemory: IssueKeyMemory -) : Action { - override fun run() { - val jqlQuery = jqlMemory.recall()!! - meter.measure( - key = SEARCH_WITH_JQL, - action = fun(): IssueNavigatorPage { - val issueNavigator = jira.goToIssueNavigator(jqlQuery) - CloudIssueNavigator(jira.driver).waitForNavigator() - return issueNavigator - }, - observation = fun(navigator: IssueNavigatorPage): JsonObject { - val issueKeys = navigator.getIssueKeys() - issueKeyMemory.remember(issueKeys) - return SearchJqlObservation( - navigator.jql, - issueKeys.size, - -1 // work around https://ecosystem.atlassian.net/browse/JPERF-605 - ).serialize() - } - ) - } -} diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/SearchServerFilter.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/SearchServerFilter.kt deleted file mode 100644 index 123687b..0000000 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/SearchServerFilter.kt +++ /dev/null @@ -1,49 +0,0 @@ -package jces1209.vu.action - -import com.atlassian.performance.tools.jiraactions.api.SEARCH_WITH_JQL -import com.atlassian.performance.tools.jiraactions.api.WebJira -import com.atlassian.performance.tools.jiraactions.api.action.Action -import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter -import com.atlassian.performance.tools.jiraactions.api.memories.Memory -import com.atlassian.performance.tools.jiraactions.api.page.IssueNavigatorPage -import jces1209.vu.wait -import org.openqa.selenium.By -import org.openqa.selenium.support.ui.ExpectedConditions.* -import java.net.URI - -class SearchServerFilter( - private val jira: WebJira, - private val meter: ActionMeter, - private val filters: Memory -) : Action { - override fun run() { - val filter = filters.recall()!! - meter.measure( - key = SEARCH_WITH_JQL, - action = { - jira.navigateTo(filter.toString()) - waitForIssueNavigator() - } - ) - } - - /** - * Improves [IssueNavigatorPage.waitForIssueNavigator], by avoiding the "no results" condition: - * `presenceOfElementLocated(By.className("no-results-hint"))` - * It seems it's present even if the results are still loading. - * Switching to `visibilityOfElementLocated` does not help. - */ - private fun waitForIssueNavigator() { - jira.driver.wait( - and( - or( - presenceOfElementLocated(By.cssSelector("ol.issue-list")), - presenceOfElementLocated(By.id("issuetable")), - presenceOfElementLocated(By.id("issue-content")) - ), - presenceOfElementLocated(By.id("key-val")), - presenceOfElementLocated(By.className("issue-body-content")) - ) - ) - } -} diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkAnIssue.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnIssue.kt similarity index 99% rename from custom-vu/src/main/kotlin/jces1209/vu/action/WorkAnIssue.kt rename to custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnIssue.kt index 18d2ac5..e04234a 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkAnIssue.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnIssue.kt @@ -20,7 +20,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, diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearch.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearch.kt new file mode 100644 index 0000000..edcd403 --- /dev/null +++ b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearch.kt @@ -0,0 +1,121 @@ +package jces1209.vu.action + +import com.atlassian.performance.tools.jiraactions.api.SEARCH_WITH_JQL +import com.atlassian.performance.tools.jiraactions.api.SeededRandom +import com.atlassian.performance.tools.jiraactions.api.WebJira +import com.atlassian.performance.tools.jiraactions.api.action.Action +import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter +import com.atlassian.performance.tools.jiraactions.api.memories.IssueKeyMemory +import com.atlassian.performance.tools.jiraactions.api.memories.JqlMemory +import com.atlassian.performance.tools.jiraactions.api.memories.Memory +import com.atlassian.performance.tools.jiraactions.api.observation.SearchJqlObservation +import com.atlassian.performance.tools.jiraactions.api.page.IssueNavigatorPage +import jces1209.vu.MeasureType +import jces1209.vu.MeasureType.Companion.SWITCH_BETWEEN_ISSUES_IN_SEARCH_RESULTS +import jces1209.vu.page.IssueNavigator +import jces1209.vu.page.customizecolumns.ColumnsEditor +import java.net.URI +import javax.json.JsonObject + +class WorkOnSearch( + private val issueNavigator: IssueNavigator, + private val jira: WebJira, + private val meter: ActionMeter, + private val columnsEditor: ColumnsEditor, + private val random: SeededRandom, + private val filters: Memory, + private val jqlMemory: JqlMemory, + private val issueKeyMemory: IssueKeyMemory, + private val searchFilterProbability: Float, + private val searchJclProbability: Float, + private val globalSearchProbability: Float, + private val customizeColumnsProbability: Float, + private val switchBetweenIssuesProbability: Float +) : Action { + override fun run() { + if (roll(switchBetweenIssuesProbability)) { + switchBetweenIssues() + } + if (roll(globalSearchProbability)) { + openGlobalIssueSearch() + } + if (roll(customizeColumnsProbability)) { + customizeColumns() + } + if (roll(searchFilterProbability)) { + searchFilter() + } + if (roll(searchJclProbability)) { + searchJcl() + } + } + + private fun roll( + probability: Float + ): Boolean = (random.random.nextFloat() < probability) + + private fun switchBetweenIssues() { + jira.goToIssueNavigator("resolution = Unresolved ORDER BY priority DESC") + issueNavigator.waitForNavigator() + + meter.measure( + key = SWITCH_BETWEEN_ISSUES_IN_SEARCH_RESULTS, + action = { + issueNavigator.selectIssue() + } + ) + } + + private fun openGlobalIssueSearch(): IssueNavigator { + meter.measure( + key = MeasureType.OPEN_GLOBAL_SEARCH, + action = { + jira.driver.navigate().to("/issues/") + issueNavigator.waitForNavigator() + } + ) + return issueNavigator + } + + private fun customizeColumns() { + jira.goToIssueNavigator("resolution = Unresolved ORDER BY priority DESC") + meter.measure( + key = MeasureType.CUSTOMIZE_COLUMNS, + action = { + columnsEditor.openEditor() + columnsEditor.selectItems(2) + columnsEditor.submitSelection() + } + ) + } + + private fun searchFilter() { + val filter = filters.recall()!! + meter.measure( + key = SEARCH_WITH_JQL, + action = { + jira.navigateTo(filter.toString()) + issueNavigator.waitForNavigator() + } + ) + } + + private fun searchJcl() { + val jqlQuery = jqlMemory.recall()!! + meter.measure( + key = SEARCH_WITH_JQL, + action = fun(): IssueNavigatorPage { + return jira.goToIssueNavigator(jqlQuery) + }, + observation = fun(navigator: IssueNavigatorPage): JsonObject { + val issueKeys = navigator.getIssueKeys() + issueKeyMemory.remember(issueKeys) + return SearchJqlObservation( + navigator.jql, + issueKeys.size, + -1 // work around https://ecosystem.atlassian.net/browse/JPERF-605 + ).serialize() + } + ) + } +} diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearchResults.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearchResults.kt deleted file mode 100644 index 6df39e9..0000000 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearchResults.kt +++ /dev/null @@ -1,27 +0,0 @@ -package jces1209.vu.action - -import com.atlassian.performance.tools.jiraactions.api.ActionType -import com.atlassian.performance.tools.jiraactions.api.WebJira -import com.atlassian.performance.tools.jiraactions.api.action.Action -import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter -import jces1209.vu.MeasureType.Companion.SWITCH_BETWEEN_ISSUES_IN_SEARCH_RESULTS -import jces1209.vu.page.CloudIssueNavigator -import jces1209.vu.page.IssueNavigator - -class WorkOnSearchResults( - private val issueNavigator: IssueNavigator, - private val jira: WebJira, - private val meter: ActionMeter -) : Action { - override fun run() { - jira.goToIssueNavigator("resolution = Unresolved ORDER BY priority DESC") - issueNavigator.waitForNavigator() - - meter.measure( - key = SWITCH_BETWEEN_ISSUES_IN_SEARCH_RESULTS, - action = { - issueNavigator.selectIssue() - } - ) - } -} From d0e5fc6061773d6fb3f7df0974e61869a4692019 Mon Sep 17 00:00:00 2001 From: Nataliia Shavshyna Date: Thu, 18 Jun 2020 09:56:51 +0300 Subject: [PATCH 02/14] JCSP-474: wrong class invocation fixes --- custom-vu/src/main/kotlin/jces1209/vu/JiraCloudScenario.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom-vu/src/main/kotlin/jces1209/vu/JiraCloudScenario.kt b/custom-vu/src/main/kotlin/jces1209/vu/JiraCloudScenario.kt index d9d026d..f168761 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/JiraCloudScenario.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/JiraCloudScenario.kt @@ -11,7 +11,7 @@ import jces1209.vu.page.CloudIssueNavigator import jces1209.vu.page.CloudIssuePage import jces1209.vu.page.bars.topBar.cloud.CloudTopBar import jces1209.vu.page.boards.browse.cloud.CloudBrowseBoardsPage -import jces1209.vu.page.customizecolumns.DcColumnsEditor +import jces1209.vu.page.customizecolumns.CloudColumnsEditor import jces1209.vu.page.dashboard.cloud.CloudDashboardPage import jces1209.vu.page.filters.CloudFiltersPage import jces1209.vu.page.project.CloudProjectNavigatorPage @@ -71,7 +71,7 @@ class JiraCloudScenario : Scenario { browseProjectPage = CloudProjectNavigatorPage(jira.driver) ), issueNavigator = CloudIssueNavigator(jira.driver), - columnsEditor = DcColumnsEditor(jira.driver), + columnsEditor = CloudColumnsEditor(jira.driver), topBar = CloudTopBar(jira.driver) ) } From 64386f9f9611cb44a6bcf68b7c01ddd56ed7b595 Mon Sep 17 00:00:00 2001 From: Nataliia Shavshyna Date: Wed, 24 Jun 2020 09:26:52 +0300 Subject: [PATCH 03/14] JCSP-515: fixing JPT for Equifax test run --- .../kotlin/jces1209/vu/JiraCloudScenario.kt | 2 +- .../main/kotlin/jces1209/vu/JiraDcScenario.kt | 2 +- .../jces1209/vu/ScenarioSimilarities.kt | 46 +++++++++---------- .../jces1209/vu/action/WorkOnDashboard.kt | 2 +- .../page/project/CloudProjectNavigatorPage.kt | 17 +++---- .../vu/page/project/DcProjectNavigatorPage.kt | 13 +++--- 6 files changed, 42 insertions(+), 40 deletions(-) diff --git a/custom-vu/src/main/kotlin/jces1209/vu/JiraCloudScenario.kt b/custom-vu/src/main/kotlin/jces1209/vu/JiraCloudScenario.kt index e1a76fe..691d110 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/JiraCloudScenario.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/JiraCloudScenario.kt @@ -73,7 +73,7 @@ class JiraCloudScenario : Scenario { jira = jira, meter = meter, projectKeyMemory = similarities.projectMemory, - browseProjectPage = CloudProjectNavigatorPage(jira.driver) + browseProjectPage = CloudProjectNavigatorPage(jira) ), customizeColumns = CustomizeColumns( jira = jira, diff --git a/custom-vu/src/main/kotlin/jces1209/vu/JiraDcScenario.kt b/custom-vu/src/main/kotlin/jces1209/vu/JiraDcScenario.kt index 467e0bd..78df030 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/JiraDcScenario.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/JiraDcScenario.kt @@ -75,7 +75,7 @@ class JiraDcScenario : Scenario { jira = jira, meter = meter, projectKeyMemory = similarities.projectMemory, - browseProjectPage = DcProjectNavigatorPage(jira.driver) + browseProjectPage = DcProjectNavigatorPage(jira) ), customizeColumns = CustomizeColumns( jira = jira, diff --git a/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt b/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt index a6a657e..a60345e 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt @@ -60,13 +60,13 @@ class ScenarioSimilarities( meter = meter, issueKeyMemory = issueKeyMemory, random = seededRandom, - 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, - changeAssigneeProbability = 0.00f, - mentionUserProbability = 0.00f, - transitionProbability = 0.00f, + editProbability = 0.05f, // 0.10f if we can mutate data + commentProbability = 0.05f, // 0.04f if we can mutate data + linkIssueProbability = 0.05f, // 0.10f if we can mutate data + attachScreenShotProbability = 0.05f, + changeAssigneeProbability = 0.05f, + mentionUserProbability = 0.05f, + transitionProbability = 0.05f, contextOperationProbability = 0.05f ), projectSummary = ProjectSummaryAction( @@ -96,9 +96,9 @@ class ScenarioSimilarities( boardsMemory = boardsMemory.all, issueKeyMemory = issueKeyMemory, random = seededRandom, - viewIssueProbability = 0.50f, - configureBoardProbability = 0.05f, - contextOperationProbability = 0.05f + viewIssueProbability = 0.1f, + configureBoardProbability = 0.0f, + contextOperationProbability = 0.0f ), workOnSearchResults = WorkOnSearchResults( issueNavigator = issueNavigator, @@ -139,19 +139,19 @@ class ScenarioSimilarities( 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, - viewDashboard to 0, // 10 when TODO fix the page objects for Cloud - browseBoards to 5, - viewBoard to 30, - workOnDashboard to 5, - workOnSprint to 10, - browseProjectIssues to 5, - workOnSearchResults to 10, - workOnTopBar to 5 + customizeColums to 0, + searchWithJql to 0, + workAnIssue to 0, + projectSummary to 0, + browseProjects to 0, + viewDashboard to 20, // 10 when TODO fix the page objects for Cloud + browseBoards to 20,//20 + viewBoard to 20,//20 + workOnDashboard to 20,//20 + workOnSprint to 0, + browseProjectIssues to 20, + workOnSearchResults to 0, + workOnTopBar to 0 ) .map { (action, proportion) -> Collections.nCopies(proportion, action) } .flatten() diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnDashboard.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnDashboard.kt index f57d310..37d6e85 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnDashboard.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnDashboard.kt @@ -38,7 +38,7 @@ class WorkOnDashboard( } private fun openDashboardsPage(): DashboardPage { - jira.driver.navigate().to("/secure/Dashboard.jspa") + jira.navigateTo("/secure/ConfigurePortalPages!default.jspa?name=") return dashboardPage } diff --git a/custom-vu/src/main/kotlin/jces1209/vu/page/project/CloudProjectNavigatorPage.kt b/custom-vu/src/main/kotlin/jces1209/vu/page/project/CloudProjectNavigatorPage.kt index fb03bf9..2975702 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/page/project/CloudProjectNavigatorPage.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/page/project/CloudProjectNavigatorPage.kt @@ -1,5 +1,6 @@ package jces1209.vu.page.project +import com.atlassian.performance.tools.jiraactions.api.WebJira import jces1209.vu.page.CloudIssueNavigator import jces1209.vu.wait import org.openqa.selenium.By @@ -8,21 +9,21 @@ import org.openqa.selenium.support.ui.ExpectedConditions class CloudProjectNavigatorPage( - private val driver: WebDriver + private val jira: WebJira ) : ProjectNavigatorPage { override fun openProject(projectKey: String) { - driver.navigate().to("/projects/") - driver + jira.navigateTo("projects") + jira.driver .wait(ExpectedConditions - .elementToBeClickable( + .visibilityOfElementLocated( By.xpath( "//*[@data-test-id='global-pages.directories.directory-base.content.table.container']" + - "//*[@href='/browse/$projectKey']"))) - .click() - waitForNavigator(driver) + "//*[contains(@href,'/browse/')]"))) + jira.navigateTo("projects/$projectKey/issues") + waitForNavigator(jira.driver) } - +//global-pages.directories.directory-base.content.table.container override fun waitForNavigator(driver: WebDriver) { CloudIssueNavigator(driver).waitForNavigator() } diff --git a/custom-vu/src/main/kotlin/jces1209/vu/page/project/DcProjectNavigatorPage.kt b/custom-vu/src/main/kotlin/jces1209/vu/page/project/DcProjectNavigatorPage.kt index 53689ef..51d4dbd 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/page/project/DcProjectNavigatorPage.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/page/project/DcProjectNavigatorPage.kt @@ -1,5 +1,6 @@ package jces1209.vu.page.project +import com.atlassian.performance.tools.jiraactions.api.WebJira import jces1209.vu.page.DcIssueNavigator import jces1209.vu.wait import org.openqa.selenium.By @@ -7,16 +8,16 @@ import org.openqa.selenium.WebDriver import org.openqa.selenium.support.ui.ExpectedConditions class DcProjectNavigatorPage( - private val driver: WebDriver + private val jira: WebJira ) : ProjectNavigatorPage { override fun openProject(projectKey: String) { - driver.navigate().to("/projects/") - driver + jira.navigateTo("projects") + jira.driver .wait(ExpectedConditions .elementToBeClickable( - By.xpath("(//*[@class='aui-page-panel-content']//*[@href='/browse/$projectKey'])"))) - .click() - waitForNavigator(driver) + By.xpath("(//*[@class='aui-page-panel-content']//*[contains(@href,'/browse/')])"))) + jira.navigateTo("projects/$projectKey/issues") + waitForNavigator(jira.driver) } override fun waitForNavigator(driver: WebDriver) { From 07b3948222ddcf1dd1a569ec72836a29131564e5 Mon Sep 17 00:00:00 2001 From: Nataliia Shavshyna Date: Wed, 24 Jun 2020 10:47:07 +0300 Subject: [PATCH 04/14] JCSP-515: fixing JPT for Equifax test run --- .../src/main/kotlin/jces1209/vu/page/JiraCloudWelcome.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/custom-vu/src/main/kotlin/jces1209/vu/page/JiraCloudWelcome.kt b/custom-vu/src/main/kotlin/jces1209/vu/page/JiraCloudWelcome.kt index bc448dd..e8834bb 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/page/JiraCloudWelcome.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/page/JiraCloudWelcome.kt @@ -11,10 +11,13 @@ class JiraCloudWelcome( fun skipToJira() = apply { val questionSkip = By.xpath("//*[contains(text(), 'Skip question')]") + val projectsList = By.xpath("//*[@data-test-id=" + + "'global-pages.directories.directory-base.content.table.container']") driver.wait( or( presenceOfElementLocated(By.id("jira")), - elementToBeClickable(questionSkip) + elementToBeClickable(questionSkip), + presenceOfElementLocated(projectsList) ) ) repeat(2) { From e604d5f78a6b87ba00fd0056d9ea872dc0e3f2f5 Mon Sep 17 00:00:00 2001 From: Yevhen Semenkov Date: Thu, 25 Jun 2020 10:24:50 +0300 Subject: [PATCH 05/14] DC: view dashboard fix - wait for empty list too --- .../kotlin/jces1209/vu/page/dashboard/DashboardPage.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/DashboardPage.kt b/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/DashboardPage.kt index 2dd0ad9..d4266dd 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/DashboardPage.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/DashboardPage.kt @@ -5,6 +5,8 @@ import jces1209.vu.page.FalliblePage import org.openqa.selenium.By import org.openqa.selenium.WebDriver import org.openqa.selenium.support.ui.ExpectedConditions +import org.openqa.selenium.support.ui.ExpectedConditions.or +import org.openqa.selenium.support.ui.ExpectedConditions.visibilityOfElementLocated import java.time.Duration abstract class DashboardPage( @@ -14,8 +16,10 @@ abstract class DashboardPage( fun waitForDashboards() { driver.wait( - condition = ExpectedConditions.visibilityOfElementLocated( - By.xpath("//a[contains(@href,'/secure/Dashboard.jspa?selectPageId')]")), + condition = or( + visibilityOfElementLocated(By.xpath("//a[contains(@href,'/secure/Dashboard.jspa?selectPageId')]")), + visibilityOfElementLocated(By.xpath("//*[@id='pp_favourite']/tbody/tr/td[text()='You have no favorite dashboards.']")) + ), timeout = Duration.ofSeconds(50) ) } @@ -54,7 +58,7 @@ abstract class DashboardPage( driver.findElement(By.xpath("(//input[@placeholder='Search'])")) .sendKeys(projectName) driver.wait( - condition = ExpectedConditions.visibilityOfElementLocated( + condition = visibilityOfElementLocated( By.className("aui-list-item-link aui-indented-link")), timeout = Duration.ofSeconds(50) ).click() From 61c08ff5c6c040b80f55c2af4e3a896ec60bf018 Mon Sep 17 00:00:00 2001 From: Nataliia Shavshyna Date: Thu, 25 Jun 2020 11:48:48 +0300 Subject: [PATCH 06/14] JCSP-515: fixing create dashboard --- .../jces1209/vu/page/dashboard/cloud/CloudDashboardPage.kt | 5 +++++ .../jces1209/vu/page/project/CloudProjectNavigatorPage.kt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/cloud/CloudDashboardPage.kt b/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/cloud/CloudDashboardPage.kt index 3ba7594..dfdbbbd 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/cloud/CloudDashboardPage.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/cloud/CloudDashboardPage.kt @@ -2,13 +2,18 @@ package jces1209.vu.page.dashboard.cloud import com.atlassian.performance.tools.jiraactions.api.WebJira import jces1209.vu.page.dashboard.DashboardPage +import jces1209.vu.wait import org.openqa.selenium.By +import org.openqa.selenium.support.ui.ExpectedConditions class CloudDashboardPage( jira: WebJira ) : DashboardPage( driver = jira.driver) { override fun createDashboard() { + driver.wait( + ExpectedConditions.visibilityOfElementLocated(By.id("shareable-entity-dialog.input-name")) + ) driver.findElement( By.xpath("//*[@data-test-id='directory.dashboards-v2.create-button']")).click() driver.findElement( diff --git a/custom-vu/src/main/kotlin/jces1209/vu/page/project/CloudProjectNavigatorPage.kt b/custom-vu/src/main/kotlin/jces1209/vu/page/project/CloudProjectNavigatorPage.kt index 2975702..ed68cdb 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/page/project/CloudProjectNavigatorPage.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/page/project/CloudProjectNavigatorPage.kt @@ -23,7 +23,7 @@ class CloudProjectNavigatorPage( jira.navigateTo("projects/$projectKey/issues") waitForNavigator(jira.driver) } -//global-pages.directories.directory-base.content.table.container + override fun waitForNavigator(driver: WebDriver) { CloudIssueNavigator(driver).waitForNavigator() } From 7aa3a40453dafb96984e5afd4303c7fe0cd129c3 Mon Sep 17 00:00:00 2001 From: Nataliia Shavshyna Date: Fri, 26 Jun 2020 08:17:53 +0300 Subject: [PATCH 07/14] JCSP-515: crete dashboard fixing --- .../vu/page/dashboard/cloud/CloudDashboardPage.kt | 11 ++++++++--- .../jces1209/vu/page/dashboard/dc/DcDashboardPage.kt | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/cloud/CloudDashboardPage.kt b/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/cloud/CloudDashboardPage.kt index dfdbbbd..5ed1330 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/cloud/CloudDashboardPage.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/cloud/CloudDashboardPage.kt @@ -5,17 +5,22 @@ import jces1209.vu.page.dashboard.DashboardPage import jces1209.vu.wait import org.openqa.selenium.By import org.openqa.selenium.support.ui.ExpectedConditions +import org.openqa.selenium.support.ui.ExpectedConditions.visibilityOfElementLocated +import java.time.Duration class CloudDashboardPage( jira: WebJira ) : DashboardPage( driver = jira.driver) { override fun createDashboard() { - driver.wait( - ExpectedConditions.visibilityOfElementLocated(By.id("shareable-entity-dialog.input-name")) - ) driver.findElement( By.xpath("//*[@data-test-id='directory.dashboards-v2.create-button']")).click() + driver.wait( + ExpectedConditions.or( + visibilityOfElementLocated(By.id("shareable-entity-dialog.input-name")), + visibilityOfElementLocated(By.className("css-vfoyut")) + ) + ) driver.findElement( By.id("shareable-entity-dialog.input-name")) .sendKeys("TestDasboard" + System.currentTimeMillis()) diff --git a/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/dc/DcDashboardPage.kt b/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/dc/DcDashboardPage.kt index f7ae601..d37fb22 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/dc/DcDashboardPage.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/page/dashboard/dc/DcDashboardPage.kt @@ -21,7 +21,7 @@ class DcDashboardPage( driver .wait( ExpectedConditions.elementToBeClickable(By.id("create_dashboard")) - ) + ).click() driver.findElement( By.id("edit-entity-dashboard-name")) .sendKeys("TestDasboard" + System.currentTimeMillis()) From 8d1638f0cf48fbfaf39c851646b8a82de1b2ed71 Mon Sep 17 00:00:00 2001 From: Nataliia Shavshyna Date: Fri, 26 Jun 2020 17:37:44 +0300 Subject: [PATCH 08/14] JCSP-515: fixes for report --- .../jces1209/vu/ScenarioSimilarities.kt | 22 +++++++++---------- .../kotlin/jces1209/vu/action/ViewBoard.kt | 14 ++++++++++-- .../kotlin/jces1209/vu/action/WorkAnIssue.kt | 2 -- .../kotlin/jces1209/vu/page/CloudIssuePage.kt | 2 ++ 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt b/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt index a60345e..777a92d 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt @@ -60,14 +60,14 @@ class ScenarioSimilarities( meter = meter, issueKeyMemory = issueKeyMemory, random = seededRandom, - editProbability = 0.05f, // 0.10f if we can mutate data - commentProbability = 0.05f, // 0.04f if we can mutate data - linkIssueProbability = 0.05f, // 0.10f if we can mutate data - attachScreenShotProbability = 0.05f, - changeAssigneeProbability = 0.05f, - mentionUserProbability = 0.05f, - transitionProbability = 0.05f, - contextOperationProbability = 0.05f + editProbability = 0.0f, // 0.10f if we can mutate data + commentProbability = 0.0f, // 0.04f if we can mutate data + linkIssueProbability = 0.0f, // 0.10f if we can mutate data + attachScreenShotProbability = 0.0f, + changeAssigneeProbability = 0.0f, + mentionUserProbability = 0.0f, + transitionProbability = 0.0f, + contextOperationProbability = 0.0f ), projectSummary = ProjectSummaryAction( jira = jira, @@ -141,13 +141,13 @@ class ScenarioSimilarities( createIssue to 0, // 5 if we can mutate data customizeColums to 0, searchWithJql to 0, - workAnIssue to 0, + workAnIssue to 10, projectSummary to 0, browseProjects to 0, viewDashboard to 20, // 10 when TODO fix the page objects for Cloud - browseBoards to 20,//20 + browseBoards to 10,//20 viewBoard to 20,//20 - workOnDashboard to 20,//20 + workOnDashboard to 0,//20 workOnSprint to 0, browseProjectIssues to 20, workOnSearchResults to 0, diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/ViewBoard.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/ViewBoard.kt index 623d93f..c18bd9b 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/ViewBoard.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/action/ViewBoard.kt @@ -56,7 +56,11 @@ class ViewBoard( key = VIEW_BOARD, action = { meter.measure( - key = ActionType("View Board ($boardType)") { Unit }, + key = if (boardType == "Backlog") { + ActionType("View $boardType") { Unit } + } else { + ActionType("View $boardType Board ") { Unit } + }, action = { board .goToBoard() @@ -86,7 +90,13 @@ class ViewBoard( private fun previewIssue(boardType: String, board: BoardPage) { jiraTips.closeTips() meter.measure(MeasureType.ISSUE_PREVIEW_BOARD) { - meter.measure(ActionType("Preview issue ($boardType board)") { Unit }) { + var message: String + if (boardType == "Backlog") { + message = "Preview issue on $boardType" + } else { + message = "Preview issue on $boardType board" + } + meter.measure(ActionType(message) { Unit }) { board.previewIssue() } } diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkAnIssue.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkAnIssue.kt index d481455..acbf497 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkAnIssue.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkAnIssue.kt @@ -14,7 +14,6 @@ import jces1209.vu.MeasureType.Companion.ISSUE_LINK_SEARCH_CHOOSE import jces1209.vu.MeasureType.Companion.ISSUE_LINK_SUBMIT import jces1209.vu.MeasureType.Companion.OPEN_MEDIA_VIEWER import jces1209.vu.page.AbstractIssuePage -import jces1209.vu.page.AttachScreenShot import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger @@ -37,7 +36,6 @@ class WorkAnIssue( private val transitionProbability: Float ) : Action { private val logger: Logger = LogManager.getLogger(this::class.java) - override fun run() { val issueKey = issueKeyMemory.recall() if (issueKey == null) { diff --git a/custom-vu/src/main/kotlin/jces1209/vu/page/CloudIssuePage.kt b/custom-vu/src/main/kotlin/jces1209/vu/page/CloudIssuePage.kt index 1c38ee1..0c01649 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/page/CloudIssuePage.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/page/CloudIssuePage.kt @@ -1,7 +1,9 @@ package jces1209.vu.page +import com.atlassian.performance.tools.jiraactions.api.WebJira import com.atlassian.performance.tools.jiraactions.api.page.wait import jces1209.vu.page.contextoperation.ContextOperationIssue +import jces1209.vu.page.project.CloudPersonalSettingsPage import jces1209.vu.wait import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger From 5efc88496a3ff504504cc1746991937cfa5cbe69 Mon Sep 17 00:00:00 2001 From: Nataliia Shavshyna Date: Tue, 30 Jun 2020 08:52:36 +0300 Subject: [PATCH 09/14] JCSP-515 fixes for equifax --- .../jces1209/vu/ScenarioSimilarities.kt | 32 ++++++++-------- .../kotlin/jces1209/vu/action/ViewBoard.kt | 4 +- .../kotlin/jces1209/vu/action/WorkOnSearch.kt | 2 +- .../kotlin/jces1209/vu/page/CloudIssuePage.kt | 2 - .../kotlin/JiraPerformanceComparisonIT.kt | 23 ++++++++++- src/test/kotlin/PlaintextReport.kt | 38 +++++++++++++++++++ 6 files changed, 79 insertions(+), 22 deletions(-) create mode 100644 src/test/kotlin/PlaintextReport.kt diff --git a/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt b/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt index 3a2d92c..024f7cf 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt @@ -115,11 +115,11 @@ class ScenarioSimilarities( filters = filtersMemory, jqlMemory = jqlMemory, issueKeyMemory = issueKeyMemory, - searchFilterProbability = 0.50f, - searchJclProbability = 0.05f, - globalSearchProbability = 0.05f, - customizeColumnsProbability = 0.05f, - switchBetweenIssuesProbability = 0.05f + searchFilterProbability = 0.0f, + searchJclProbability = 0.0f, + globalSearchProbability = 0.9f, + customizeColumnsProbability = 0.0f, + switchBetweenIssuesProbability = 0.0f ) ) @@ -141,17 +141,17 @@ class ScenarioSimilarities( val exploreData = listOf(browseProjects, browseFilters, browseBoards) val spreadOut = mapOf( createIssue to 0, // 5 if we can mutate data - workAnIssue to 55, - projectSummary to 5, - browseProjects to 5, - viewDashboard to 0, // 10 when TODO fix the page objects for Cloud - browseBoards to 5, - viewBoard to 30, - workOnDashboard to 5, - workOnSprint to 10, - browseProjectIssues to 5, - workOnTopBar to 5, - workOnSearch to 5 + workAnIssue to 10, + projectSummary to 0, + browseProjects to 0, + viewDashboard to 20, // 10 when TODO fix the page objects for Cloud + browseBoards to 20, + viewBoard to 20, + workOnDashboard to 0, + workOnSprint to 0, + browseProjectIssues to 0, + workOnTopBar to 0, + workOnSearch to 30 ) .map { (action, proportion) -> Collections.nCopies(proportion, action) } .flatten() diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/ViewBoard.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/ViewBoard.kt index 2c2761c..cba3fe3 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/ViewBoard.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/action/ViewBoard.kt @@ -92,9 +92,9 @@ class ViewBoard( meter.measure(MeasureType.ISSUE_PREVIEW_BOARD) { var message: String if (boardType == "Backlog") { - message = "Preview issue from $boardType" + message = "Bento issue view $boardType" } else { - message = "Preview issue from $boardType board" + message = "Bento issue view $boardType board" } meter.measure(ActionType(message) { Unit }) { board.previewIssue() diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearch.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearch.kt index edcd403..f7d9830 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearch.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearch.kt @@ -70,7 +70,7 @@ class WorkOnSearch( meter.measure( key = MeasureType.OPEN_GLOBAL_SEARCH, action = { - jira.driver.navigate().to("/issues/") + jira.navigateTo("/issues/?jql=ORDER%20BY%20lastViewed%20DESC") issueNavigator.waitForNavigator() } ) diff --git a/custom-vu/src/main/kotlin/jces1209/vu/page/CloudIssuePage.kt b/custom-vu/src/main/kotlin/jces1209/vu/page/CloudIssuePage.kt index 0c01649..1c38ee1 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/page/CloudIssuePage.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/page/CloudIssuePage.kt @@ -1,9 +1,7 @@ package jces1209.vu.page -import com.atlassian.performance.tools.jiraactions.api.WebJira import com.atlassian.performance.tools.jiraactions.api.page.wait import jces1209.vu.page.contextoperation.ContextOperationIssue -import jces1209.vu.page.project.CloudPersonalSettingsPage import jces1209.vu.wait import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger diff --git a/src/test/kotlin/JiraPerformanceComparisonIT.kt b/src/test/kotlin/JiraPerformanceComparisonIT.kt index 37d7c28..935df03 100644 --- a/src/test/kotlin/JiraPerformanceComparisonIT.kt +++ b/src/test/kotlin/JiraPerformanceComparisonIT.kt @@ -1,9 +1,12 @@ import com.atlassian.performance.tools.concurrency.api.AbruptExecutorService import com.atlassian.performance.tools.concurrency.api.submitWithLogContext +import com.atlassian.performance.tools.io.api.ensureDirectory +import com.atlassian.performance.tools.jiraactions.api.ActionMetricStatistics import com.atlassian.performance.tools.jiraactions.api.scenario.Scenario import com.atlassian.performance.tools.report.api.FullReport import com.atlassian.performance.tools.report.api.FullTimeline import com.atlassian.performance.tools.report.api.WaterfallHighlightReport +import com.atlassian.performance.tools.report.api.action.SearchJqlReport import com.atlassian.performance.tools.report.api.result.EdibleResult import com.atlassian.performance.tools.report.api.result.RawCohortResult import com.atlassian.performance.tools.virtualusers.api.VirtualUserOptions @@ -16,6 +19,7 @@ import jces1209.SlowAndMeaningful import jces1209.log.LogConfigurationFactory import jces1209.vu.JiraCloudScenario import jces1209.vu.JiraDcScenario +import jces1209.vu.PlaintextReport import org.apache.logging.log4j.core.config.ConfigurationFactory import org.junit.Test import java.nio.file.Paths @@ -23,12 +27,13 @@ import java.time.Duration import java.util.concurrent.CompletableFuture import java.util.concurrent.ExecutorService import java.util.concurrent.Executors.newCachedThreadPool +import java.util.logging.Logger class JiraPerformanceComparisonIT { private val workspace = RootWorkspace(Paths.get("build")).currentTask private val quality: BenchmarkQuality = SlowAndMeaningful.Builder().build() - + private val logger = Logger.getLogger(JiraPerformanceComparisonIT::class.java.name) init { ConfigurationFactory.setConfigurationFactory(LogConfigurationFactory(workspace)) } @@ -45,6 +50,22 @@ class JiraPerformanceComparisonIT { .map { it.prepareForJudgement(FullTimeline()) } } FullReport().dump(results, workspace.isolateTest("Compare")) + results.forEach { result -> + val actionMetrics = result.actionMetrics + val cohortWorkspace = workspace.directory.resolve(result.cohort) + val report= PlaintextReport( + ActionMetricStatistics(result.actionMetrics) + ).generate() + logger.info("Plain text report:\n$report") + SearchJqlReport( + allMetrics = actionMetrics + ).report(cohortWorkspace) + + WaterfallHighlightReport().report( + metrics = actionMetrics, + workspace = TestWorkspace(cohortWorkspace.resolve("WaterfallHighlight").ensureDirectory()) + ) + } dumpMegaSlowWaterfalls(results) } diff --git a/src/test/kotlin/PlaintextReport.kt b/src/test/kotlin/PlaintextReport.kt new file mode 100644 index 0000000..a27dc01 --- /dev/null +++ b/src/test/kotlin/PlaintextReport.kt @@ -0,0 +1,38 @@ +package jces1209.vu + +import com.atlassian.performance.tools.jiraactions.api.ActionMetricStatistics +import org.apache.commons.lang3.StringUtils.abbreviate +import java.lang.StringBuilder +import java.util.* + +class PlaintextReport( + val actionMetricStatistics: ActionMetricStatistics +) { + fun generate(): String { + val p95 = actionMetricStatistics.percentile(90) + val report = StringBuilder() + val formatter = Formatter(report) + val lineFormat = "| %-25s | %-13d | %-8d | %-20d |\n" + formatter.format("\n") + formatter.format("+---------------------------+---------------+----------+----------------------+\n") + formatter.format("| Action name | sample size | errors | p90 percentile [ms] |\n") + formatter.format("+---------------------------+---------------+----------+----------------------+\n") + + actionMetricStatistics + .sampleSize + .keys + .sorted() + .forEach { action -> + formatter.format( + lineFormat, + abbreviate(action, 25), + actionMetricStatistics.sampleSize[action], + actionMetricStatistics.errors[action], + p95[action]?.toMillis() + ) + } + formatter.format("+---------------------------+---------------+----------+----------------------+\n") + return report.toString() + } + +} From 01814f330394f7ad90f12ffebfbe837faf5bc154 Mon Sep 17 00:00:00 2001 From: Yevhen Semenkov Date: Tue, 30 Jun 2020 12:52:53 +0300 Subject: [PATCH 10/14] DC: fix for preview issue --- .../main/kotlin/jces1209/vu/page/boards/view/dc/DcBoardPage.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom-vu/src/main/kotlin/jces1209/vu/page/boards/view/dc/DcBoardPage.kt b/custom-vu/src/main/kotlin/jces1209/vu/page/boards/view/dc/DcBoardPage.kt index d67bd4c..508e19b 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/page/boards/view/dc/DcBoardPage.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/page/boards/view/dc/DcBoardPage.kt @@ -35,7 +35,7 @@ class DcBoardPage( .wait( ExpectedConditions.and( visibilityOfElementLocated(By.id("ghx-detail-issue")), - visibilityOfElementLocated(By.className("issue-drop-zone")) + presenceOfElementLocated(By.className("issue-drop-zone")) )) } From 504110e235e2a5562e3da544bd93e53ec4ecc833 Mon Sep 17 00:00:00 2001 From: Nataliia Shavshyna Date: Tue, 30 Jun 2020 16:50:43 +0300 Subject: [PATCH 11/14] JCSP-515: memory for Dashboard added --- .../main/kotlin/jces1209/vu/MeasureType.kt | 3 +++ .../jces1209/vu/action/WorkOnDashboard.kt | 3 ++- .../kotlin/jces1209/vu/memory/Dashboard.kt | 7 +++++++ .../jces1209/vu/memory/DashboardsMemory.kt | 21 +++++++++++++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 custom-vu/src/main/kotlin/jces1209/vu/memory/Dashboard.kt create mode 100644 custom-vu/src/main/kotlin/jces1209/vu/memory/DashboardsMemory.kt diff --git a/custom-vu/src/main/kotlin/jces1209/vu/MeasureType.kt b/custom-vu/src/main/kotlin/jces1209/vu/MeasureType.kt index 14b0f6a..6f0386d 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/MeasureType.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/MeasureType.kt @@ -91,5 +91,8 @@ class MeasureType { @JvmField var OPEN_GLOBAL_SEARCH = ActionType("Global Issue Navigator") { Unit } + + @JvmField + var VIEW_DASHBOARDS_LIST = ActionType("View Dashboards List") { Unit } } } diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnDashboard.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnDashboard.kt index 37d6e85..1f76ec6 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnDashboard.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnDashboard.kt @@ -8,6 +8,7 @@ import com.atlassian.performance.tools.jiraactions.api.memories.ProjectMemory import jces1209.vu.MeasureType.Companion.CREATE_DASHBOARD import jces1209.vu.MeasureType.Companion.CREATE_GADGET import jces1209.vu.MeasureType.Companion.LOAD_GADGET +import jces1209.vu.MeasureType.Companion.VIEW_DASHBOARDS_LIST import jces1209.vu.page.dashboard.DashboardPage import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger @@ -27,7 +28,7 @@ class WorkOnDashboard( return } meter.measure( - key = VIEW_DASHBOARD, + key = VIEW_DASHBOARDS_LIST, action = { openDashboardsPage().waitForDashboards() } diff --git a/custom-vu/src/main/kotlin/jces1209/vu/memory/Dashboard.kt b/custom-vu/src/main/kotlin/jces1209/vu/memory/Dashboard.kt new file mode 100644 index 0000000..61c3ecf --- /dev/null +++ b/custom-vu/src/main/kotlin/jces1209/vu/memory/Dashboard.kt @@ -0,0 +1,7 @@ +package jces1209.vu.memory + +data class Dashboard( + val key: String, + val name: String +) + diff --git a/custom-vu/src/main/kotlin/jces1209/vu/memory/DashboardsMemory.kt b/custom-vu/src/main/kotlin/jces1209/vu/memory/DashboardsMemory.kt new file mode 100644 index 0000000..e9d65f8 --- /dev/null +++ b/custom-vu/src/main/kotlin/jces1209/vu/memory/DashboardsMemory.kt @@ -0,0 +1,21 @@ +package jces1209.vu.memory + +import com.atlassian.performance.tools.jiraactions.api.SeededRandom +import com.atlassian.performance.tools.jiraactions.api.memories.Memory + +class DashboardsMemory( + private val random: SeededRandom +) : Memory { + private val dashboards = mutableSetOf() + + override fun recall(): Dashboard? { + if (dashboards.isEmpty()) { + return null + } + return random.pick(dashboards.toList()) + } + + override fun remember(memories: Collection) { + dashboards.addAll(memories) + } +} From ce807058682e53d18e28a86d76f0f4f08778c95a Mon Sep 17 00:00:00 2001 From: Nataliia Shavshyna Date: Thu, 9 Jul 2020 11:56:11 +0300 Subject: [PATCH 12/14] JCSP-515: run fixes --- cohort-secrets/example.properties | 2 +- .../jces1209/vu/ScenarioSimilarities.kt | 4 +- .../kotlin/jces1209/vu/action/ViewBoard.kt | 4 +- .../jces1209/vu/action/WorkOnDashboard.kt | 6 +-- .../kotlin/JiraPerformanceComparisonIT.kt | 38 ++++++++++--------- src/test/kotlin/PlaintextReport.kt | 6 +-- 6 files changed, 32 insertions(+), 28 deletions(-) diff --git a/cohort-secrets/example.properties b/cohort-secrets/example.properties index 28f2706..deae875 100644 --- a/cohort-secrets/example.properties +++ b/cohort-secrets/example.properties @@ -1,4 +1,4 @@ -# copy this as `a.properties` and `b.properties` and update the values +# copy this as `a.properties` and `ms.properties` and update the values jira.uri=http://127.0.0.1:8080/ user.name=admin user.password=admin diff --git a/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt b/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt index 1b25bb4..4d87f3d 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt @@ -140,10 +140,10 @@ class ScenarioSimilarities( browseProjects to 0, browseBoards to 20, viewBoard to 20, - workOnDashboard to 5, + workOnDashboard to 10, workOnSprint to 10, browseProjectIssues to 5, - workOnSearch to 30, + workOnSearch to 20, workOnTopBar to 0 ) .map { (action, proportion) -> Collections.nCopies(proportion, action) } diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/ViewBoard.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/ViewBoard.kt index cba3fe3..48a8fb5 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/ViewBoard.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/action/ViewBoard.kt @@ -92,9 +92,9 @@ class ViewBoard( meter.measure(MeasureType.ISSUE_PREVIEW_BOARD) { var message: String if (boardType == "Backlog") { - message = "Bento issue view $boardType" + message = "Old issue view $boardType" } else { - message = "Bento issue view $boardType board" + message = "Old issue view $boardType board" } meter.measure(ActionType(message) { Unit }) { board.previewIssue() diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnDashboard.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnDashboard.kt index 88d9b4c..cd0997a 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnDashboard.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnDashboard.kt @@ -21,9 +21,9 @@ class WorkOnDashboard( ) : Action { private val logger: Logger = LogManager.getLogger(this::class.java) override fun run() { - viewDashboards() - createDashboard() - createGadget(dashboardPage) + // viewDashboards() + // createDashboard() + // createGadget(dashboardPage) openDashboard(dashboardPage) } diff --git a/src/test/kotlin/JiraPerformanceComparisonIT.kt b/src/test/kotlin/JiraPerformanceComparisonIT.kt index 935df03..9e9090b 100644 --- a/src/test/kotlin/JiraPerformanceComparisonIT.kt +++ b/src/test/kotlin/JiraPerformanceComparisonIT.kt @@ -43,29 +43,15 @@ class JiraPerformanceComparisonIT { val results: List = AbruptExecutorService(newCachedThreadPool()).use { pool -> listOf( benchmark("a.properties", JiraDcScenario::class.java, quality, pool), - benchmark("b.properties", JiraCloudScenario::class.java, quality, pool) + benchmark("elsevier.properties", JiraCloudScenario::class.java, quality, pool) // feel free to add more, e.g. benchmark("c.properties", ... ) .map { it.get() } .map { it.prepareForJudgement(FullTimeline()) } } FullReport().dump(results, workspace.isolateTest("Compare")) - results.forEach { result -> - val actionMetrics = result.actionMetrics - val cohortWorkspace = workspace.directory.resolve(result.cohort) - val report= PlaintextReport( - ActionMetricStatistics(result.actionMetrics) - ).generate() - logger.info("Plain text report:\n$report") - SearchJqlReport( - allMetrics = actionMetrics - ).report(cohortWorkspace) - - WaterfallHighlightReport().report( - metrics = actionMetrics, - workspace = TestWorkspace(cohortWorkspace.resolve("WaterfallHighlight").ensureDirectory()) - ) - } + planeTextReport(results,50) + planeTextReport(results,90) dumpMegaSlowWaterfalls(results) } @@ -80,6 +66,24 @@ class JiraPerformanceComparisonIT { benchmark(properties, scenario, quality) } } + private fun planeTextReport(results: List, persentile: Int){ + results.forEach { result -> + val actionMetrics = result.actionMetrics + val cohortWorkspace = workspace.directory.resolve(result.cohort) + val report= PlaintextReport( + ActionMetricStatistics(result.actionMetrics) + ).generate(persentile) + logger.info("Plain text report "+result.cohort+":\n$report") + SearchJqlReport( + allMetrics = actionMetrics + ).report(cohortWorkspace) + + WaterfallHighlightReport().report( + metrics = actionMetrics, + workspace = TestWorkspace(cohortWorkspace.resolve("WaterfallHighlight").ensureDirectory()) + ) + } + } private fun benchmark( properties: CohortProperties, diff --git a/src/test/kotlin/PlaintextReport.kt b/src/test/kotlin/PlaintextReport.kt index a27dc01..7ee0c6e 100644 --- a/src/test/kotlin/PlaintextReport.kt +++ b/src/test/kotlin/PlaintextReport.kt @@ -8,14 +8,14 @@ import java.util.* class PlaintextReport( val actionMetricStatistics: ActionMetricStatistics ) { - fun generate(): String { - val p95 = actionMetricStatistics.percentile(90) + fun generate(percentile: Int): String { + val p95 = actionMetricStatistics.percentile(percentile) val report = StringBuilder() val formatter = Formatter(report) val lineFormat = "| %-25s | %-13d | %-8d | %-20d |\n" formatter.format("\n") formatter.format("+---------------------------+---------------+----------+----------------------+\n") - formatter.format("| Action name | sample size | errors | p90 percentile [ms] |\n") + formatter.format("| Action name | sample size | errors | p"+percentile+" percentile [ms] |\n") formatter.format("+---------------------------+---------------+----------+----------------------+\n") actionMetricStatistics From ec29982403a469c3ab6f2e6a2d9021783b5cd1d4 Mon Sep 17 00:00:00 2001 From: Nataliia Shavshyna Date: Mon, 27 Jul 2020 01:36:37 +0300 Subject: [PATCH 13/14] JCSP-151: tests run configuration for Equifax --- .../jces1209/vu/ScenarioSimilarities.kt | 12 +++++------ .../kotlin/jces1209/vu/action/WorkOnSearch.kt | 21 +------------------ .../kotlin/JiraPerformanceComparisonIT.kt | 2 +- 3 files changed, 8 insertions(+), 27 deletions(-) diff --git a/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt b/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt index debd9a9..d57a6f0 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/ScenarioSimilarities.kt @@ -87,7 +87,7 @@ class ScenarioSimilarities( boardsMemory = boardsMemory.all, issueKeyMemory = issueKeyMemory, random = seededRandom, - viewIssueProbability = 0.1f, + viewIssueProbability = 0.1f,//0.1f configureBoardProbability = 0.0f, contextOperationProbability = 0.0f @@ -146,15 +146,15 @@ class ScenarioSimilarities( val exploreData = listOf(browseProjects, browseFilters, browseBoards) val spreadOut = mapOf( createIssue to 0, // 5 if we can mutate data - workAnIssue to 10, + workAnIssue to 10,//10 projectSummary to 0, browseProjects to 0, - browseBoards to 20, - viewBoard to 20, - workOnDashboard to 20, + browseBoards to 20,//20 + viewBoard to 20,//20 + workOnDashboard to 20,//20 workOnSprint to 0, browseProjectIssues to 0, - workOnSearch to 30, + workOnSearch to 30,//30 workOnTopBar to 0, workOnTransition to 0 ) diff --git a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearch.kt b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearch.kt index fd680f4..14fe52e 100644 --- a/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearch.kt +++ b/custom-vu/src/main/kotlin/jces1209/vu/action/WorkOnSearch.kt @@ -69,26 +69,7 @@ class WorkOnSearch( private fun openGlobalIssueSearch(): IssueNavigator { val querryList: MutableList = ArrayList() querryList.add("/issues/?jql=order%20by%20created%20DESC") - querryList.add("/issues/?jql=project%20%3D%20ACISDATA%20order%20by%20key%20DESC") - querryList.add("/issues/?jql=project%20%3D%20ACISDATA%20AND%20" + - "resolution%20%3D%20Fixed%20AND%20assignee%20in%20(EMPTY)%20order%20by%20updated%20DESC%20%2C%20key%20DESC")//assig - querryList.add("/issues/?jql=order%20by%20lastViewed%20DESC%2C%20key%20DESC") - querryList.add("/issues/?jql=reporter%20in%20(EMPTY)%20order%20by%20created%20DESC%2C%20key%20DESC") - querryList.add("/issues/?jql=project%20in%20(GCSDA%2C%20BCI1)%20AND%20status%20in%20(Accepted%2C%20Done)%20" + - "AND%20assignee%20in%20(membersOf(acis_dev)%2C%20EMPTY)%20order%20by%20key%20DESC") - querryList.add("/issues/?jql=") - querryList.add("/issues/?jql=project%20in%20(ACISDATA%2C%20AMSP%2C%20GLOCOMMDIS)%20" + - "AND%20status%20not%20in%20(%20Resolved)%20" + - "AND%20creator%20in%20(EMPTY)%20order%20by%20key%20DESC%2C%20created%20DESC") - querryList.add("/issues/?jql=issuetype%20in%20(Bug%2C%20Change)%20" + - "AND%20assignee%20is%20EMPTY%20AND%20\"Assignee%20Group\"%20%3D%20administrators%20" + - "and%20status%20not%20in%20(Done%2C%20Cancelled)%20ORDER%20BY%20issuetype%20ASC%2C%20" + - "priority%20DESC%2C%20created%20DESC%2C%20status%20ASC%2C%20lastViewed%20DESC") - querryList.add("/issues/?jql=Application%20%3D%20\"Access%20Management\"%20" + - "and%20assignee%20%3D%20557057%3A68425415-a8ec-439d-a05b-0b03720dcadf%20" + - "and%20status%20in%20(Done)%20or%20assignee%20is%20empty%20" + - "and%20component%20in%20(.NET)%20AND%20\"Reporting%20Country\"%20%3D%20Canada%20" + - "And%20status%20in%20(ToDo)%20ORDER%20BY%20priority%20DESC%2C%20created%20ASC") + querryList.forEach { meter.measure( diff --git a/src/test/kotlin/JiraPerformanceComparisonIT.kt b/src/test/kotlin/JiraPerformanceComparisonIT.kt index e881e67..5005803 100644 --- a/src/test/kotlin/JiraPerformanceComparisonIT.kt +++ b/src/test/kotlin/JiraPerformanceComparisonIT.kt @@ -42,7 +42,7 @@ class JiraPerformanceComparisonIT { fun shouldComparePerformance() { val results: List = AbruptExecutorService(newCachedThreadPool()).use { pool -> listOf( - benchmark("a.properties", JiraDcScenario::class.java, quality, pool), + // benchmark("a.properties", JiraDcScenario::class.java, quality, pool), benchmark("equifax.properties", JiraCloudScenario::class.java, quality, pool) // feel free to add more, e.g. benchmark("c.properties", ... ) From 2e6dd16537932714e7766c467346a0208ec70f54 Mon Sep 17 00:00:00 2001 From: Nataliia Shavshyna Date: Mon, 27 Jul 2020 15:51:23 +0300 Subject: [PATCH 14/14] JCSP-515: preparing to merge to master --- src/test/kotlin/JiraPerformanceComparisonIT.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/kotlin/JiraPerformanceComparisonIT.kt b/src/test/kotlin/JiraPerformanceComparisonIT.kt index 5005803..ac39a79 100644 --- a/src/test/kotlin/JiraPerformanceComparisonIT.kt +++ b/src/test/kotlin/JiraPerformanceComparisonIT.kt @@ -42,8 +42,8 @@ class JiraPerformanceComparisonIT { fun shouldComparePerformance() { val results: List = AbruptExecutorService(newCachedThreadPool()).use { pool -> listOf( - // benchmark("a.properties", JiraDcScenario::class.java, quality, pool), - benchmark("equifax.properties", JiraCloudScenario::class.java, quality, pool) + benchmark("a.properties", JiraDcScenario::class.java, quality, pool), + benchmark("b.properties", JiraCloudScenario::class.java, quality, pool) // feel free to add more, e.g. benchmark("c.properties", ... ) .map { it.get() }