TestRunnerWidget
classin packageklyn.unittest.gui
public class TestRunnerWidget extends Container
└ TestRunnerWidget

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.

Example
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"])
Properties
Modifier and Type Member Description
public readonly property isRunning
isRunning as Boolean
Whether a live execution is active.
public readonly property report
report as TestReport
Current report displayed by this widget.
Inherited Properties
propertyInherited Properties from Container: autoRelayout, childCount, layout, padding
propertyInherited Properties from Widget: accentColor, acceptFileDrops, backgroundColor, borderColor, bottom, canFocus, cornerRadius, cursor, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isPressed, isTabStop, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, resolvedStyleCache, resolvedStyleCacheAppearanceMode, resolvedStyleCacheFont, resolvedStyleCacheRevision, resolvedStyleCacheStateKey, resolvedStyleCacheStyleClass, resolvedStyleCacheZoomRevision, right, size, sizePolicy, styleClass, toolTip, width, window, x, y
Inherited Events
eventInherited Events from Widget: filesDropped, focusGained, focusLost, keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors
Modifier and Type Member Description
public TestRunnerWidget
TestRunnerWidget( tabs as TabWidget, report as TestReport = null, overlayHost as Container = null )
Creates a test result widget.
Methods
Modifier and Type Member Description
public loadReport
loadReport(path as FilePath) as Void
Loads and displays a persisted report.
public saveReport
saveReport(path as FilePath) as Void
Saves the current report.
public showLoadReportDialog
showLoadReportDialog(owner as Window = null) as Boolean
Opens an open-file dialog and loads a persisted JSON report.
public showLoadReportLightBox
showLoadReportLightBox() as Boolean
Opens the modal load-report lightbox.
public showMessage
showMessage(title as String, text as String) as Void
Opens or updates a closeable informational tab.
public showSaveReportDialog
showSaveReportDialog(owner as Window = null) as Boolean
Opens a save-file dialog and persists the current report as JSON.
public showSaveReportLightBox
showSaveReportLightBox() as Boolean
Opens the modal save-report lightbox.
public start
start( runner as TestRunner, packages as IList<String>, jsonOutput as String = "" ) as Void
Starts a package-filtered test execution.
public startSources
startSources( runner as TestRunner, sources as IList<FilePath>, jsonOutput as String = "" ) as Void
Starts an execution for explicit test source files.
public stop
stop() as Void
Stops graphical polling when the hosting window or tab closes.
Inherited Methods
methodInherited Methods from Container: add, applyLayout, attachWindow, blur, children, clear, paint, paintOverlay, remove, setBounds, withLayout
methodInherited Methods from Widget: applyThemeMetrics, blur, containsPoint, emitFilesDropped, emitFocusGained, emitFocusLost, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintClipped, paintForeground, paintOverlay, preferredSizeIncludesContentZoom, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds
Inherited Operators
operatorInherited Operators from Container: operator[](index as Int) as Widget, operator[](index as UInt) as Widget