fuchsia.test

Added: 7

PROTOCOLS

CaseIterator

Defined in fuchsia.test/suite.fidl

Iterator for listing available test cases.

GetNext

Returns the next batch of test cases.

Request

<EMPTY>

Response

NameType
cases vector<Case>

CaseListener

Defined in fuchsia.test/suite.fidl

Listens to updates from an individual test case run.

Finished

Indicates that an individual test case has completed and result is available.

Request

NameType
result Result

RunListener

Defined in fuchsia.test/suite.fidl

Listens to updates from test runs.

OnFinished

Indicates that the last test case that started has finished, and no more test cases will start.

Request

<EMPTY>

OnTestCaseStarted

Indicates that an individual test invocation has started execution.

Request

NameType
invocation Invocation
std_handles StdHandles
listener server_end<CaseListener>

Suite

Defined in fuchsia.test/suite.fidl

GetTests

Enumerate the test cases available in this test suite.

Request

NameType
iterator server_end<CaseIterator>

Run

Run the specified test cases. Results are returned over the results channel.

tests may contain duplicate elements, in which case the same test is run multiple times as indicated. Closing listener marks the end of this call.

Request

NameType
tests vector<Invocation>
options RunOptions
listener RunListener

ENUMS

Status strict

Type: uint32

Defined in fuchsia.test/suite.fidl

Represents success, failure, or other possible conditions following a test invocation.

NameValueDescription
1

The test passed.

2

The test failed.

3

The test was skipped. A skipped status typically indicates that no attempt was made to run the test.

Examples: The test was disabled by the developer. A precondition for running the test was not satisfied.

TABLES

Case

Defined in fuchsia.test/suite.fidl

Describes a single test case.

OrdinalFieldTypeDescription
name Name

Uniquely identifies a test case within a test suite. This member is required.

enabled bool

Whether the test is enabled or disabled (marked ignored/skipped) by the developer. If the member is omitted, the test is assumed to be enabled.

Invocation

Defined in fuchsia.test/suite.fidl

Specification of a test to run.

OrdinalFieldTypeDescription
name Name

Uniquely identifies a test case within a test suite. This member is required.

tag Tag

Optional tag, arbitrarily specified by clients of Suite. This field is not used by Suite protocol, but passed back as is by OnTestCaseStarted.

Result

Defined in fuchsia.test/suite.fidl

Result of invoking a single test case.

OrdinalFieldTypeDescription
status Status

This member is required.

RunOptions

Defined in fuchsia.test/suite.fidl

Optional additional instructions for running test cases.

OrdinalFieldTypeDescription
include_disabled_tests bool

If set to true, test cases that have been disabled by the test author will nonetheless be executed.

parallel uint16

Defines maximum number of test cases to run simultaneously. If unspecified, the default behavior is chosen by the Suite implementation.

arguments vector<string>

Optional arguments to pass to the test.

break_on_failure bool

Indicate to the test runner that the suite should be halted if a failure is encountered if possible to allow a debugger to attach. Runners may ignore this flag if they do not support optionally halting a running suite.

Added: HEAD

StdHandles resource

Defined in fuchsia.test/suite.fidl

Standard out/err handles from test case.

OrdinalFieldTypeDescription
out handle<socket>

stdout handle.

err handle<socket>

stderr handle.

CONSTANTS

NameValueTypeDescription
MAX_TEST_NAME 2048 uint64

Max length in bytes of a name used in test case or tag.

Added: 14

ALIASES

NameValueDescription
Name string[MAX_TEST_NAME]

Human-readable name for a test case.

Added: 14
Tag string[MAX_TEST_NAME]

Optional unique tag to identify Invocation.

Added: 14