Skip to content

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 ​

Extends ​

  • LitElement

Constructors ​

Constructor ​

ts
new ProbeTestRunner(): ProbeTestRunner;

Defined in: node_modules/@lit/reactive-element/development/reactive-element.d.ts:527

Returns ​

ProbeTestRunner

Inherited from ​

ts
LitElement.constructor

Properties ​

PropertyTypeDefault valueDescriptionDefined in
sessionSession | nullnullThe attached session whose tests/* endpoints run the suite.packages/ui/src/test-runner.ts:57
bootInfoBootInfo | nullnullHow to get the firmware running, as monitor takes it. Set after flashing.packages/ui/src/test-runner.ts:59

Accessors ​

summary ​

Get Signature ​

ts
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 ​
ts
{
  total: number;
  passed: number;
  failed: number;
  ignored: number;
}
NameTypeDefined in
totalnumberpackages/ui/src/test-runner.ts:140
passednumberpackages/ui/src/test-runner.ts:140
failednumberpackages/ui/src/test-runner.ts:140
ignorednumberpackages/ui/src/test-runner.ts:140

Methods ​

onEvent() ​

ts
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 ​

ParameterType
eMonitorEvent

Returns ​

void


list() ​

ts
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() ​

ts
runAll(): Promise<void>;

Defined in: packages/ui/src/test-runner.ts:97

Run every test that is not ignored, in order.

Returns ​

Promise<void>