mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-17 14:57:09 +01:00
Handle test reports with no test cases
This commit is contained in:
parent
a1cbedbccb
commit
a9749e3840
13 changed files with 114 additions and 18 deletions
|
|
@ -61,6 +61,10 @@ export class DotnetTrxParser implements TestParser {
|
|||
}
|
||||
|
||||
private getTestClasses(trx: TrxReport): TestClass[] {
|
||||
if (trx.TestRun.TestDefinitions === undefined || trx.TestRun.Results === undefined) {
|
||||
return []
|
||||
}
|
||||
|
||||
const unitTests: {[id: string]: TestMethod} = {}
|
||||
for (const td of trx.TestRun.TestDefinitions) {
|
||||
for (const ut of td.UnitTest) {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ export interface TrxReport {
|
|||
|
||||
export interface TestRun {
|
||||
Times: Times[]
|
||||
Results: Results[]
|
||||
TestDefinitions: TestDefinitions[]
|
||||
Results?: Results[]
|
||||
TestDefinitions?: TestDefinitions[]
|
||||
}
|
||||
|
||||
export interface Times {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue