probe-web / @probe-web/ui / ProbeTestRunner
Class: ProbeTestRunner
Defined in: packages/ui/src/test-runner.ts:32
<probe-test-runner>: list and run an embedded-test suite on the attached target. Needs a server that provides the tests/* endpoints and a ProbeTestRunner.bootInfo from flashing the test firmware.
Takes a session rather than a debugger, because the tests endpoints belong to the session — running a suite is not a debug activity, and the panel is useful without one.
Each test is run on its own, resetting the target in between. That is how embedded-test works and it is the reason a failure is attributable to one test rather than to whatever ran before it; the cost is a reset per test, which is why the run is sequential and shows progress as it goes.
Fires
tests-finished: ProbeTestRunner.runAll finished, including when it stopped early on an error.detailis ProbeTestRunner.summary:{ total, passed, failed, ignored }.
Extends
LitElement
Constructors
Constructor
new ProbeTestRunner(): ProbeTestRunner;Defined in: node_modules/@lit/reactive-element/development/reactive-element.d.ts:527
Returns
ProbeTestRunner
Inherited from
LitElement.constructorProperties
| Property | Type | Default value | Description | Defined in |
|---|---|---|---|---|
session | Session | null | null | The attached session whose tests/* endpoints run the suite. | packages/ui/src/test-runner.ts:57 |
bootInfo | BootInfo | null | null | How to get the firmware running, as monitor takes it. Set after flashing. | packages/ui/src/test-runner.ts:59 |
Accessors
summary
Get Signature
get summary(): {
total: number;
passed: number;
failed: number;
ignored: number;
};Defined in: packages/ui/src/test-runner.ts:138
Result counts for the current table, for the caller and for an automated check.
Returns
{
total: number;
passed: number;
failed: number;
ignored: number;
}| Name | Type | Defined in |
|---|---|---|
total | number | packages/ui/src/test-runner.ts:140 |
passed | number | packages/ui/src/test-runner.ts:140 |
failed | number | packages/ui/src/test-runner.ts:140 |
ignored | number | packages/ui/src/test-runner.ts:140 |
Methods
onEvent()
onEvent(e): void;Defined in: packages/ui/src/test-runner.ts:70
Called for every monitor event while listing or running; collects semihosting and RTT text into the output shown under the table. Overridable so a test or an automated check can watch the console traffic.
Parameters
| Parameter | Type |
|---|---|
e | MonitorEvent |
Returns
void
list()
list(): Promise<void>;Defined in: packages/ui/src/test-runner.ts:81
Ask the firmware what tests it has (boots it with ProbeTestRunner.bootInfo) and reset the results table.
Returns
Promise<void>
runAll()
runAll(): Promise<void>;Defined in: packages/ui/src/test-runner.ts:97
Run every test that is not ignored, in order.
Returns
Promise<void>