Skip to content

Commit 2d199ff

Browse files
Fix/use suite name metrics (#170)
1 parent c2a152b commit 2d199ff

File tree

9 files changed

+25
-25
lines changed

9 files changed

+25
-25
lines changed

.github/workflows/build-and-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,4 +293,4 @@ jobs:
293293
- name: Modify reports
294294
run: npm run modify-reports
295295
- name: Default tables
296-
run: node dist/core/cli.js ctrf-reports/ctrf-report.json --title "Default tables" --annotate false
296+
run: node dist/core/cli.js ctrf-reports/ctrf-report.json --title "Default tables" --annotate false

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,5 +444,3 @@ analyzing test outcomes across multiple platforms becomes more straightforward.
444444

445445
If you find this project useful, consider giving it a GitHub star ⭐ It means a
446446
lot to us.
447-
448-
vcbc

dist/index.js

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/reports/fail-rate-table.hbs

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/reports/flaky-rate-table.hbs

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ctrf/report-preparation.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ export async function prepareReport(
5151
inputs.groupBy === 'suite' ? true : false
5252
)
5353
}
54-
55-
if (shouldPrefixTestNames(inputs)) {
56-
report = prefixTestNames(report)
57-
}
5854
core.endGroup()
5955

6056
if (shouldProcessPreviousResults(inputs)) {
@@ -67,6 +63,10 @@ export async function prepareReport(
6763

6864
report = addFooterDisplayFlags(report, inputs)
6965

66+
if (shouldPrefixTestNames(inputs)) {
67+
report = prefixTestNames(report)
68+
}
69+
7070
if (inputs.writeCtrfToFile) writeReportToFile(inputs.writeCtrfToFile, report)
7171

7272
return report

src/reports/fail-rate-table.hbs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
#### Overall Fail Rate: {{formatRate ctrf.summary.extra.failRate 2}}%
1+
| Fail Rate | **{{formatRate ctrf.summary.extra.failRate 2}}%** |
2+
|------------|-----------|
23

34
{{#if (sortTestsByFailRate ctrf.tests)}}
4-
| Test 📝 | Runs 🎯 | Pass ✅ | Fail ❌ | Fail Rate % |
5+
| Test 📝 | Runs 🎯 | Pass ✅ | Fail ❌ | Fail Rate 📈|
56
| --- | --- | --- | --- | --- |
67
{{#each (sortTestsByFailRate ctrf.tests)}}
78
| {{name}} | {{extra.finalResults}} | {{extra.passedCount}} | {{extra.finalFailures}} | {{formatRate extra.failRate 2}} |
89
{{/each}}
910
{{else}}
10-
No failed tests to show
11+
No current tests have fail rates to display
1112
{{/if}}

src/reports/flaky-rate-table.hbs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
#### Overall Flaky Rate: {{formatRate ctrf.summary.extra.flakyRate 2}}%
1+
| Flaky Rate | **{{formatRate ctrf.summary.extra.flakyRate 2}}%** |
2+
|------------|-----------|
23

34
{{#if (sortTestsByFlakyRate ctrf.tests)}}
4-
| Test 📝 | Attempts 🎯 | Pass ✅ | Fail ❌ | Flaky Rate % 🍂 |
5+
| Test 📝 | Attempts 🎯 | Pass ✅ | Fail ❌ | Flaky Rate 📈 |
56
| --- | --- | --- | --- | --- |
67
{{#each (sortTestsByFlakyRate ctrf.tests)}}
78
| {{name}} | {{extra.totalAttempts}} | {{extra.passedCount}} | {{extra.failedCount}} | {{formatRate extra.flakyRate 2}} |
89
{{/each}}
910
{{else}}
10-
No flaky tests to show
11+
No current tests have flaky rates to display
1112
{{/if}}

0 commit comments

Comments
 (0)