public class TestReport:
Complete structured result of a test framework execution.
Reports can be persisted as JSON and loaded later by the graphical runner.
import klyn.unittest
report = TestReport()
report.save(FilePath("test-results.json"))| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | classCountclassCount as Int: |
Number of executed test classes. |
| public readonly property | classesclasses as ArrayList<TestClassResult> |
Results of all selected test classes. |
| public property | durationMsdurationMs as Double = 0.0 |
Complete framework execution duration in milliseconds. |
| public readonly property | failedClassCountfailedClassCount as Int: |
Number of failed test classes. |
| public readonly property | failedMethodCountfailedMethodCount as Int: |
Number of failed test methods. |
| public property | formatVersionformatVersion as Int = 1 |
Report format version. |
| public readonly property | infrastructureFailuresinfrastructureFailures as ArrayList<TestFailure> |
Failures not associated with a test class. |
| public readonly property | methodCountmethodCount as Int: |
Number of executed test methods. |
| public readonly property | passedpassed as Boolean: |
Indicates whether every selected class and method passed. |
| public property | sourcesource as String = "" |
Test source root. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | TestReportTestReport(source as String = ""): |
Creates an empty report. |
| Modifier and Type | Member | Description |
|---|---|---|
| public static | fromMapfromMap(data as Map<String, Object>) as TestReport: |
Creates a typed report from parsed JSON data. |
| public static | loadload(path as FilePath) as TestReport: |
Loads a report previously saved as JSON. |
| public | savesave(path as FilePath) as Void: |
Saves this report as formatted JSON. |
| public | toMap | Converts this report to a JSON-compatible map. |