TestReport
classin packageklyn.unittest
public class TestReport:
TestReport

Complete structured result of a test framework execution.

Reports can be persisted as JSON and loaded later by the graphical runner.

Example
import klyn.unittest

report = TestReport()
report.save(FilePath("test-results.json"))
Properties
Modifier and Type Member Description
public readonly property classCount
classCount as Int:
Number of executed test classes.
public readonly property classes Results of all selected test classes.
public property durationMs
durationMs as Double = 0.0
Complete framework execution duration in milliseconds.
public readonly property failedClassCount
failedClassCount as Int:
Number of failed test classes.
public readonly property failedMethodCount
failedMethodCount as Int:
Number of failed test methods.
public property formatVersion
formatVersion as Int = 1
Report format version.
public readonly property infrastructureFailures
infrastructureFailures as ArrayList<TestFailure>
Failures not associated with a test class.
public readonly property methodCount
methodCount as Int:
Number of executed test methods.
public readonly property passed
passed as Boolean:
Indicates whether every selected class and method passed.
public property source
source as String = ""
Test source root.
Constructors
Modifier and Type Member Description
public TestReport
TestReport(source as String = ""):
Creates an empty report.
Methods
Modifier and Type Member Description
public static fromMap
fromMap(data as Map<String, Object>) as TestReport:
Creates a typed report from parsed JSON data.
public static load
load(path as FilePath) as TestReport:
Loads a report previously saved as JSON.
public save
save(path as FilePath) as Void:
Saves this report as formatted JSON.
public toMap
toMap() as SortedMap<String, Object>:
Converts this report to a JSON-compatible map.