Add list-suites and list-tests options to limit report size

This commit is contained in:
Michal Dorner 2021-01-25 12:53:45 +01:00
parent 0919385c06
commit 3744805866
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
20 changed files with 28593 additions and 18534 deletions

View file

@ -22,6 +22,10 @@ export class TestRunResult {
get result(): TestExecutionResult {
return this.suites.some(t => t.result === 'failed') ? 'failed' : 'success'
}
get failedSuites(): TestSuiteResult[] {
return this.suites.filter(s => s.result === 'failed')
}
}
export class TestSuiteResult {
@ -47,6 +51,10 @@ export class TestSuiteResult {
get result(): TestExecutionResult {
return this.groups.some(t => t.result === 'failed') ? 'failed' : 'success'
}
get failedGroups(): TestGroupResult[] {
return this.groups.filter(grp => grp.result === 'failed')
}
}
export class TestGroupResult {
@ -68,6 +76,10 @@ export class TestGroupResult {
get result(): TestExecutionResult {
return this.tests.some(t => t.result === 'failed') ? 'failed' : 'success'
}
get failedTests(): TestCaseResult[] {
return this.tests.filter(tc => tc.result === 'failed')
}
}
export class TestCaseResult {