From 3fb9b3031faaf3fb85fbf563a7b52674951e7d54 Mon Sep 17 00:00:00 2001 From: kpunwatk Date: Tue, 5 Sep 2023 16:42:11 +0530 Subject: [PATCH] renamed_tc Signed-off-by: Karishma Punwatkar --- .../analysis/bulk_analysis.test.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/tests/migration/applicationinventory/analysis/bulk_analysis.test.ts b/cypress/e2e/tests/migration/applicationinventory/analysis/bulk_analysis.test.ts index 6ae62026d..91a992c85 100644 --- a/cypress/e2e/tests/migration/applicationinventory/analysis/bulk_analysis.test.ts +++ b/cypress/e2e/tests/migration/applicationinventory/analysis/bulk_analysis.test.ts @@ -24,11 +24,15 @@ import { import { Analysis } from "../../../../models/migration/applicationinventory/analysis"; import { Assessment } from "../../../../models/migration/applicationinventory/assessment"; import { AnalysisStatuses } from "../../../../types/constants"; +import { Metrics } from "../../../../models/migration/custom-metrics/custom-metrics"; const analyses: Analysis[] = []; const NUMBER_OF_APPS = 25; +const metrics = new Metrics(); +const metricName = "konveyor_tasks_initiated_total"; +let counter: number; -describe(["@tier4"], "Bulk Analysis", () => { +describe(["@tier4"], "Bulk analysis and custom metrics afterwards", () => { before("Login", function () { login(); cy.fixture("application").then((appData) => { @@ -47,11 +51,18 @@ describe(["@tier4"], "Bulk Analysis", () => { analyses.forEach((analysis) => analysis.create()); }); }); + + // Get the current counter value + metrics.getValue(metricName).then((counterValue) => { + counter = counterValue; + }); }); - it("Bulk analysis of source code + open source deps + known deps", function () { + it("Bulk analysis and collect metrics afterwards", function () { Analysis.analyzeAll(analyses[0]); Analysis.verifyAllAnalysisStatuses(AnalysisStatuses.completed); + counter = counter + NUMBER_OF_APPS; + metrics.validateMetric(metricName, counter); }); after("Perform test data clean up", function () {