Test constructor

Test({
  1. required int suiteId,
  2. required String name,
  3. required int startTime,
  4. String? url,
  5. String? rootUrl,
  6. @Default(-1) int endTime,
  7. @Default(false) bool hidden,
  8. @Default(false) bool skipped,
  9. required List<Problem> problems,
  10. required List<String> prints,
})

Factory constructor to create a Test

Implementation

factory Test({
  /// The id of the suite to which this test belongs.
  required int suiteId,

  /// The name of this test, including prefixes from any containing groups.
  required String name,

  /// The time (in milliseconds) that has elapsed between the test runner starting and this test starting.
  required int startTime,

  /// Optional URL for the file in which this test was defined
  String? url,

  /// Optional URL for the original test suite in which this test was defined
  ///
  /// Will only be present if different from `url`
  String? rootUrl,

  /// The time (in milliseconds) that has elapsed between the test runner starting and this test completing.
  ///
  /// This will be -1 if this test was not completed.
  @Default(-1) int endTime,

  /// Whether this test's result should be hidden.
  @Default(false) bool hidden,

  /// Whether this test (or some part of it) was skipped.
  @Default(false) bool skipped,

  /// A list of any problems that occured during this test.
  required List<Problem> problems,

  /// A list of any messages emitted during this test.
  required List<String> prints,
}) = _Test;