From 23fda06ccd3f632dd34029ed3ae9579affe2ab83 Mon Sep 17 00:00:00 2001 From: Turker Koc Date: Sat, 19 Apr 2025 20:59:12 +0200 Subject: [PATCH 1/5] broken test case tag --- .../test-results/pipeline-test-results.component.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/app/components/pipeline/test-results/pipeline-test-results.component.html b/client/src/app/components/pipeline/test-results/pipeline-test-results.component.html index 5cae3ca30..aa530a947 100644 --- a/client/src/app/components/pipeline/test-results/pipeline-test-results.component.html +++ b/client/src/app/components/pipeline/test-results/pipeline-test-results.component.html @@ -200,6 +200,12 @@

Test Results

> } + @if ( + (testCase.combinedFailureRate && testCase.combinedFailureRate > 0.5) || + (testCase.defaultBranchFailureRate && testCase.defaultBranchFailureRate > 0.5) + ) { + + } } From b46d2f5c24515016f13f6712212357f76d925f30 Mon Sep 17 00:00:00 2001 From: Turker Koc Date: Sun, 20 Apr 2025 11:00:34 +0200 Subject: [PATCH 2/5] changed default log level and updated OFF color --- .../test-results/pipeline-test-results.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/app/components/pipeline/test-results/pipeline-test-results.component.ts b/client/src/app/components/pipeline/test-results/pipeline-test-results.component.ts index 3fe45cc5b..86c7e810e 100644 --- a/client/src/app/components/pipeline/test-results/pipeline-test-results.component.ts +++ b/client/src/app/components/pipeline/test-results/pipeline-test-results.component.ts @@ -30,7 +30,7 @@ interface LogLevel { } const LOG_LEVELS: LogLevel[] = [ - { value: 0, name: 'OFF', label: 'OFF', color: 'text-gray-900', includes: ['OFF'] }, + { value: 0, name: 'OFF', label: 'OFF', color: '', includes: ['OFF'] }, { value: 1, name: 'FATAL', label: 'FATAL+', color: 'text-red-800', includes: ['FATAL', 'OFF'] }, { value: 2, name: 'ERROR', label: 'ERROR+', color: 'text-red-600', includes: ['ERROR', 'FATAL', 'OFF'] }, { value: 3, name: 'WARN', label: 'WARN+', color: 'text-amber-600', includes: ['WARN', 'ERROR', 'FATAL', 'OFF'] }, @@ -76,11 +76,11 @@ export class PipelineTestResultsComponent { selectedTestCase = signal<(TestCaseDto & { suiteSystemOut: string | undefined }) | null>(null); // Log level filtering - selectedLogLevelValue = signal(7); // Default to ALL + selectedLogLevelValue = signal(2); // Default to ERROR // Get the current log level object based on the selected value selectedLogLevel = computed(() => { - return LOG_LEVELS.find(level => level.value === this.selectedLogLevelValue()) || LOG_LEVELS[7]; + return LOG_LEVELS.find(level => level.value === this.selectedLogLevelValue()) || LOG_LEVELS[2]; }); // Get the array of log level names that should be included based on the selection From 2541f54b8b43860f4b2350e1702e2063cd42a02b Mon Sep 17 00:00:00 2001 From: Turker Koc Date: Sun, 20 Apr 2025 11:16:37 +0200 Subject: [PATCH 3/5] downloadable logs --- .../pipeline-test-results.component.html | 26 +++++++++++++++++-- .../pipeline-test-results.component.ts | 21 +++++++++++++++ client/src/icons.module.ts | 2 ++ 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/client/src/app/components/pipeline/test-results/pipeline-test-results.component.html b/client/src/app/components/pipeline/test-results/pipeline-test-results.component.html index aa530a947..5f4296c4f 100644 --- a/client/src/app/components/pipeline/test-results/pipeline-test-results.component.html +++ b/client/src/app/components/pipeline/test-results/pipeline-test-results.component.html @@ -300,6 +300,17 @@

Test Case Logs

} } +
+ +
} @@ -313,6 +324,17 @@

Test Suite Logs

} } +
+ +
} @@ -326,7 +348,7 @@

Test Suite Logs

- The flakiness score shows how unpredictable a test is, ranging from 0 (not flaky) to 100 (highly flaky). It’s based on failure rates from the default + The flakiness score shows how unpredictable a test is, ranging from 0 (not flaky) to 100 (highly flaky). It's based on failure rates from the default branch and all branches combined.

@@ -337,7 +359,7 @@

Test Suite Logs

Flakiness per Branch:
    If the failure rate is between 0% and 50%, we calculate:
    flakiness = (50% - failure rate) / 50%
-     If it’s 0% or over 50%, flakiness is 0. +     If it's 0% or over 50%, flakiness is 0.
  • Weighted Score:
    diff --git a/client/src/app/components/pipeline/test-results/pipeline-test-results.component.ts b/client/src/app/components/pipeline/test-results/pipeline-test-results.component.ts index 86c7e810e..ff7fef2e9 100644 --- a/client/src/app/components/pipeline/test-results/pipeline-test-results.component.ts +++ b/client/src/app/components/pipeline/test-results/pipeline-test-results.component.ts @@ -123,6 +123,27 @@ export class PipelineTestResultsComponent { return this.filterLogsByLevel(this.selectedTestCase()?.suiteSystemOut); }); + // Function to download logs with current filter applied + downloadLogs(logContent: string, fileName: string): void { + if (!logContent) return; + + const blob = new Blob([logContent], { type: 'text/plain' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + + // Create the download link + link.href = url; + link.download = fileName; + document.body.appendChild(link); + + // Trigger the download + link.click(); + + // Clean up + document.body.removeChild(link); + URL.revokeObjectURL(url); + } + // Helper function for log level styling (colors) getLogLevelClass(line: string): string { // Use the same regex pattern as in filterLogsByLevel diff --git a/client/src/icons.module.ts b/client/src/icons.module.ts index e593c0a32..1ee882d8b 100644 --- a/client/src/icons.module.ts +++ b/client/src/icons.module.ts @@ -73,6 +73,7 @@ import { IconFocus, IconUsersGroup, IconMoon, + IconDownload, } from 'angular-tabler-icons/icons'; // Select some icons (use an object, not an array) @@ -148,6 +149,7 @@ const icons = { IconPinnedOff, IconLockPlus, IconUsersGroup, + IconDownload, }; @NgModule({ From cc9ad1a462da4f9b95c6c779b0a56acd38b90285 Mon Sep 17 00:00:00 2001 From: Turker Koc Date: Sun, 20 Apr 2025 11:20:21 +0200 Subject: [PATCH 4/5] downloading stack trace --- .../test-results/pipeline-test-results.component.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/src/app/components/pipeline/test-results/pipeline-test-results.component.html b/client/src/app/components/pipeline/test-results/pipeline-test-results.component.html index 5f4296c4f..01ae7ceeb 100644 --- a/client/src/app/components/pipeline/test-results/pipeline-test-results.component.html +++ b/client/src/app/components/pipeline/test-results/pipeline-test-results.component.html @@ -270,6 +270,17 @@

    Stack Trace

    {{ selectedTestCase()?.stackTrace?.trimStart() }}
    +
    + +
  • } From 9b3090783c96a5f0c9704545c1436c646891dc06 Mon Sep 17 00:00:00 2001 From: Turker Koc Date: Sun, 27 Apr 2025 12:33:25 +0200 Subject: [PATCH 5/5] added missin icons --- .../test-results/pipeline-test-results.component.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/app/components/pipeline/test-results/pipeline-test-results.component.ts b/client/src/app/components/pipeline/test-results/pipeline-test-results.component.ts index 6f0f2ea77..4054a80d4 100644 --- a/client/src/app/components/pipeline/test-results/pipeline-test-results.component.ts +++ b/client/src/app/components/pipeline/test-results/pipeline-test-results.component.ts @@ -21,6 +21,9 @@ import { SliderModule } from 'primeng/slider'; import { provideTablerIcons, TablerIconComponent } from 'angular-tabler-icons'; import { IconCheck, + IconCircleX, + IconCircleChevronsRight, + IconDownload, IconChevronDown, IconChevronsRight, IconChevronUp, @@ -78,6 +81,9 @@ const LOG_LEVELS: LogLevel[] = [ provideTablerIcons({ IconProgress, IconCheck, + IconDownload, + IconCircleX, + IconCircleChevronsRight, IconX, IconChevronsRight, IconClock,