very_good_test_runner library

A test runner for Flutter and Dart created by Very Good Ventures.

Classes

AllSuitesTestEvent
A single suite count event is emitted once the test runner knows the total number of suites that will be loaded over the course of the test run. Because this is determined asynchronously, its position relative to other events (except StartTestEvent) is not guaranteed.
DebugTestEvent
A debug event is emitted after (although not necessarily directly after) a SuiteTestEvent, and includes information about how to debug that suite. It's only emitted if the --debug flag is passed to the test runner.
DoneTestEvent
An event indicating the result of the entire test run. This will be the final event emitted by the reporter.
ErrorTestEvent
An ErrorTestEvent indicates that a test encountered an uncaught error. Note that this may happen even after the test has completed, in which case it should be considered to have failed.
ExitTestEvent
An event emitted when a test completes. The exitCode attribute indicates the result of the test process.
GroupTestEvent
A group event is emitted before any TestStartEvent for tests in a given group. This is the only event that contains the full metadata about a group; future events will refer to the group by its opaque ID.
MessageTestEvent
A MessageEvent indicates that a test emitted a message that should be displayed to the user. The messageType field indicates the precise type of this message. Different message types should be visually distinguishable.
StartTestEvent
A single start event is emitted before any other events. It indicates that the test runner has started running.
SuiteTestEvent
A suite event is emitted before any GroupEvents for groups in a given test suite. This is the only event that contains the full metadata about a suite; future events will refer to the suite by its opaque ID.
Test
A single test case. The test's ID is unique in the context of this test run. It's used elsewhere in the protocol to refer to this test without including its full representation.
TestDoneEvent
An event emitted when a test completes. The result attribute indicates the result of the test.
TestEvent
This is the root class of the protocol. All root-level objects emitted by the JSON reporter will be subclasses of TestEvent. https://github.com/dart-lang/test/blob/master/pkgs/test/doc/json_reporter.md
TestGroup
A group containing test cases. The group's ID is unique in the context of this test run. It's used elsewhere in the protocol to refer to this group without including its full representation.
TestMetadata
Test metadata regarding whether the test was skipped and the reason.
TestStartEvent
An event emitted when a test begins running. This is the only event that contains the full metadata about a test; future events will refer to the test by its opaque ID.
TestSuite
A test suite corresponding to a loaded test file. The suite's ID is unique in the context of this test run. It's used elsewhere in the protocol to refer to this suite without including its full representation. A suite's platform is one of the platforms that can be passed to the --platform option, or null if there is no platform (for example if the file doesn't exist at all). Its path is either absolute or relative to the root of the current package.

Enums

TestResult
The result of a test.

Functions

dartTest({List<String>? arguments, String? workingDirectory, Map<String, String>? environment, bool runInShell = false, StartProcess startProcess = Process.start}) Stream<TestEvent>
Runs dart test and returns a stream of TestEvent reported by the process.
flutterTest({List<String>? arguments, String? workingDirectory, Map<String, String>? environment, bool runInShell = false, StartProcess startProcess = Process.start}) Stream<TestEvent>
Runs flutter test and returns a stream of TestEvent reported by the process.