public class TestRunnerWidget extends Container
Reusable graphical view for live or persisted Klyn test reports.
The widget is shared by the standalone graphical runner and IDE integrations. The widget displays package, class and method states; each selected node opens a closeable details tab in the caller-provided tab area. Keeping the tab area external lets an IDE reuse its existing workspace instead of nesting a second DockWorkspace.
import klyn.io
import klyn.unittest
import klyn.unittest.gui
workspace = DockWorkspace()
view = TestRunnerWidget(workspace.center, TestReport("tests"))
workspace.addPane(DockPane("Tests", view, DockSide.LEFT))
view.start(TestRunner(FolderPath("tests")), ["klyn.collections"])| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | isRunningisRunning as Boolean |
Whether a live execution is active. |
| public readonly property | reportreport as TestReport |
Current report displayed by this widget. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | TestRunnerWidgetTestRunnerWidget(
tabs as TabWidget,
report as TestReport = null,
overlayHost as Container = null
) |
Creates a test result widget. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | loadReportloadReport(path as FilePath) as Void |
Loads and displays a persisted report. |
| public | saveReportsaveReport(path as FilePath) as Void |
Saves the current report. |
| public | showLoadReportDialog | Opens an open-file dialog and loads a persisted JSON report. |
| public | showLoadReportLightBoxshowLoadReportLightBox() as Boolean |
Opens the modal load-report lightbox. |
| public | showMessage | Opens or updates a closeable informational tab. |
| public | showSaveReportDialog | Opens a save-file dialog and persists the current report as JSON. |
| public | showSaveReportLightBoxshowSaveReportLightBox() as Boolean |
Opens the modal save-report lightbox. |
| public | startstart(
runner as TestRunner,
packages as IList<String>,
jsonOutput as String = ""
) as Void |
Starts a package-filtered test execution. |
| public | startSourcesstartSources(
runner as TestRunner,
sources as IList<FilePath>,
jsonOutput as String = ""
) as Void |
Starts an execution for explicit test source files. |
| public | stopstop() as Void |
Stops graphical polling when the hosting window or tab closes. |