PackageTrack
Sign in Get early access

test_api

The user facing API for structuring Dart tests and checking expectations.

0.7.13 11M downloads/mo #14 most downloaded on pub.dev dart-lang/test

What this package is like to depend on

Last release 1 months ago

27 Jun 2026

Ships fairly regularly

a new release about every 2 months

Nearly every release is documented

notes for 63 of 63 stable releases

Nothing withdrawn

no release was ever pulled

8 years old

70 releases · first in 2018

6 releases in the last 12 months

see the full history below

Release timeline

70 releases · Oct 2018 to Jun 2026
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 70
  1. 0.7.13 27 Jun 2026
    Release notes
    • Add Compiler.cli (the native CLI compiler).
    • Expose several more backend APIs for use in flutter_test.
    • Allow using browser platforms with a specified OS.
    Open source →
    Release notes
    • Add Compiler.cli (the native CLI compiler).
    • Expose several more backend APIs for use in flutter_test.
    • Allow using browser platforms with a specified OS.
    Open source →
  2. 0.7.12 27 Apr 2026
    Release notes
    • Allow analyzer major version 13.
    Open source →
    Release notes
    • Require analyzer: '>=13.0.0 <15.0.0'
    Open source →
  3. 0.7.11 18 Mar 2026
    Release notes
    • Add vmAsan, vmMsan and vmTsan runtimes.
    • Change return type on the body callback argument to group to void from
      dynamic. This may surface cases where the group callback was erroneously
      returning an ignored value.
    • Require analyzer: '>=8.0.0 <13.0.0'
    Open source →
    Release notes
    • Add vmAsan, vmMsan and vmTsan runtimes.
    • Change return type on the body callback argument to group to void from dynamic. This may surface cases where the group callback was erroneously returning an ignored value.
    Open source →
  4. 0.7.10 27 Feb 2026
    Release notes
    • Fix missing locations on tests skipped due to the use of solo.
    Open source →
  5. 0.7.9 07 Jan 2026
    Release notes
    • Allow analyzer major version 10.
    Open source →
  6. 0.7.8 11 Nov 2025
    Release notes
    • Add a zone function available from the test suite main that allows creating channels to the test runner.
    • Require Dart 3.7
    • Allow analyzer major version 9.
    Open source →
  7. 0.7.7 21 Jul 2025
    Release notes
    • Expand pub constraint to allow the latest analyzer.
    Open source →
  8. 0.7.6 19 May 2025
    Release notes
    • Fix an assertion failure when using setUpAll or tearDownAll and running with asserts enabled.
    Open source →
  9. 0.7.5 12 May 2025
    Release notes
    • test() and group() functions now take an optional TestLocation that will be used as the location of the test in JSON reporters instead of being parsed from the call stack.
    Open source →
  10. 0.7.4 26 Nov 2024
    Release notes
    • Allow analyzer: '>=6.0.0 <8.0.0'
    • Increase SDK constraint to ^3.5.0.
    • Support running Node.js tests compiled with dart2wasm.
    Open source →
  11. 0.7.3 03 Jul 2024
    Release notes
    • Increase SDK constraint to ^3.4.0.
    Open source →
  12. 0.7.2 02 Jun 2024
    Release notes
    • Update min SDK constraint to 3.2.0.
    Open source →
  13. 0.7.1 08 Apr 2024
    Release notes
    • Added @doNotSubmit to test(solo: ...) and group(solo: ...). In practice, this means that code that was relying on ignoring deprecation warnings and using solo or group with a skip parameter will now fail if dart analyze --fatal-infos (or similar) is enabled.
    Open source →
  14. 0.7.0 13 Dec 2023
    Release notes
    • Deprecate Runtime.internetExplorer.
    • Added dart2wasm as a supported compiler for the chrome runtime.
    • BREAKING: Removed the experimentalChromeWasm runtime.
    • BREAKING: Removed Runtime.isJS and Runtime.isWasm, as this is now based on the compiler and not the runtime.
    Open source →
  15. 0.6.1 28 Jun 2023
    Release notes
    • Drop support for null unsafe Dart, bump SDK constraint to 3.0.0.
    • Make some implementation classes final. These classes were never intended to be extended or implemented. Metadata, PlatformSelector, RemoteListener, Runtime, StackTraceFormatter, SuitePlatform, RemoteException, TestHandle, OutstandingWork, OutsideTestException, OnPlatform, Retry, Skip, Tags, TestOn, Timeout.
    • Mark an implementation class interface: StackTraceMapper.
    • Change the Compiler class into an enum.
    • Make Fake a mixin class.
    • Allow the latest analyzer (6.x.x).
    Open source →
  16. 0.6.0 16 May 2023
    Release notes
    • Remove the package:test_api/expect.dart' library. testwill export frompackage:matcher` directly.
    • Fix compatibility with wasm number semantics.
    Open source →
  17. 0.5.2 19 Apr 2023
    Release notes
    • Remove deprecation for the scaffolding.dart and backend.dart libraries.
    • Export registerException from the scaffolding.dart library.
    Open source →
  18. 0.5.1 31 Mar 2023
    Release notes
    • Handle a missing 'compiler' value when running a test compiled against a newer test_api than the runner back end is using. The expectation was that the json protocol is only used across packages compatible with the same major version of the test_api package, but flutter test does not check the version of packages in the pub solve for user test code.
    Open source →
  19. 0.5.0 23 Mar 2023
    Release notes
    • Add Compiler class, exposed through backend.dart.
    • Support compiler identifiers in platform selectors.
    • Add compiler field to SuitePlatform. This will become required in the next major release.
    • BREAKING Add required defaultCompiler and supportedCompilers fields to Runtime.
    • Add package:test_api/hooks_testing.dart library for writing tests against code that uses package:test_api/hooks.dart.
    • BREAKING Remove ErrorFormatter, expectAsync, throws, and Throws from package:test_api/test_api.dart.
    Open source →
  20. 0.4.18 11 Jan 2023
    Release notes
    • Don't run tearDown until the test body and outstanding work is complete, even if the test has already failed.
    Open source →
  21. 0.4.17 08 Dec 2022
    Release notes
    • Deprecate throwsNullThrownError, use throwsA(isA<TypeError>()) instead. The implementation has been changed to ease migrations.
    • Deprecate throwsCyclicInitializationError and replace the implementation with Throws(TypeMatcher<Error>()). The specific exception no longer exists and there is no guarantee about what type of error will be thrown.
    Open source →
  22. 0.4.16 01 Nov 2022
    Release notes
    • Add the experimental-chrome-wasm runtime. This is very unstable and will eventually be deleted, to be replaced by a --compiler flag. See https://github.com/dart-lang/test/issues/1776 for more information on future plans
    • Add isWasm field to Runtime (defaults to false).
    Open source →
  23. 0.4.15 26 Oct 2022
    Release notes
    • Expand the pubspec description.
    • Support package:matcher version 0.12.13.
    Open source →
  24. 0.4.14 12 Sep 2022
    Release notes
    • Require Dart >= 2.18.0
    • Support the latest package:analyzer.
    Open source →
  25. 0.4.13 19 Aug 2022
    Release notes
    • Fix printOnFailure output to be associated with the correct test.
    Open source →
  26. 0.4.12 06 Jul 2022
    Release notes
    • Internal cleanup.
    Open source →
  27. 0.4.11 22 Jun 2022
    Release notes
    • Support the latest version of package:matcher.
    Open source →
  28. 0.4.10 15 Jun 2022
    Release notes
    • Add Target to restrict TestOn annotation to library level.
    Open source →
  29. 0.4.9 16 Dec 2021
    Release notes
    • Add ignoreTimeouts option to Suite, which disables all timeouts for all tests in that suite.
    Open source →
  30. 0.4.8 24 Nov 2021
    Release notes
    • TestFailure implements Exception for compatibility with only_throw_exceptions.
    Open source →
  31. 0.4.7 02 Nov 2021
    Release notes
    • Remove logging about enabling the chain-stack-traces flag from the invoker.
    Open source →
  32. 0.4.6 20 Oct 2021
    Release notes
    • Give a better exception when using markTestSkipped outside of a test.
    • Format stack traces if a formatter is available when serializing tests and groups from the remote listener.
    Open source →
  33. 0.4.5 01 Oct 2021
    Release notes
    • Add defaulting for older test backends that don't pass a configuration for the allow_duplicate_test_names parameter to the remote listener.
    Open source →
  34. 0.4.4 30 Sep 2021
    Release notes
    • Allow disabling duplicate test or group names in the Declarer.
    Open source →
  35. 0.4.3 16 Aug 2021
    Release notes
    • Use the latest package:matcher.
    Open source →
  36. 0.4.2 13 Jul 2021
    Release notes
    • Update analyzer constraint to >=1.5.0 <3.0.0.
    Open source →
  37. 0.4.1 09 Jun 2021
    Release notes
    • Give a better error when printOnFailure is called from outside a test zone.
    Open source →
  38. 0.4.0 21 Apr 2021
    Release notes
    • Add libraries scaffolding.dart, and expect.dart to allow importing as subset of the normal surface area.
    • Add new APIs in hooks.dart to allow writing custom expectation frameworks which integrate with the test runner.
    • Add examples to throwsA and make top-level throws... matchers refer to it.
    • Disable stack trace chaining by default.
    • Fix expectAsync function type checks.
    • Add RemoteException, RemoteListener, StackTraceFormatter, and StackTraceMapper to backend.dart.
    • Breaking remove Runtime.phantomJS
    • Breaking Add callback to get the suite channel in the beforeLoad callback of RemoteListener.start. This is now used in place of using zones to communicate the value.
    Open source →
  39. 0.3.0 09 Mar 2021
    Release notes
    • Breaking TestException.message is now nullable.
      • Fixes handling of null messages in remote exceptions.
    Open source →
  40. 0.2.20 08 Mar 2021
    Release notes
    • Fix some strong null safety mode errors in the original migration.
    Open source →
  41. 0.2.19 03 Feb 2021
    Release notes
    • Stable release for null safety.
    Open source →
  42. 0.2.19-nullsafety.7 02 Feb 2021 pre-release
    Release notes
    • Expand upper bound constraints for some null safe migrated packages.
    Open source →
  43. 0.2.19-nullsafety.6 05 Nov 2020 pre-release
    Release notes
    • Fix spawnHybridUri to respect language versioning of the spawned uri.
    Open source →
  44. 0.2.19-nullsafety.5 03 Nov 2020 pre-release
    Release notes
    • Update SDK constraints to >=2.12.0-0 <3.0.0 based on beta release guidelines.
    Open source →
  45. 0.2.19-nullsafety.4 23 Oct 2020 pre-release
    Release notes
    • Allow prerelease versions of the 2.12 sdk.
    Open source →
  46. 0.2.19-nullsafety.3 21 Oct 2020 pre-release
    Release notes
    • Add capability to filter to a single exact test name in Declarer.
    • Add markTestSkipped API.
    Open source →
  47. 0.2.19-nullsafety.2 22 Sep 2020 pre-release
    Release notes
    • Allow 2.10 stable and 2.11.0-dev SDKs.
    • Annotate the classes used as annotations to restrict their usage to library level.
    Open source →
  48. 0.2.19-nullsafety 29 Jul 2020 pre-release
    Release notes
    • Migrate to NNBD.
      • The vast majority of changes are intended to express the pre-existing behavior of the code regarding to handling of nulls.
      • Breaking Change: GroupEntry.name is no longer nullable, the root group now has the empty string as its name.
    • Add the Fake class, available through package:test_api/fake.dart. This was previously part of the Mockito package, but with null safety it is useful enough that we decided to make it available through package:test. In a future release it will be made available directly through package:test_api/test_api.dart (and hence through package:test_core/test_core.dart and package:test/test.dart).
    Open source →
  49. 0.2.18 15 Jul 2020
    Release notes
    • Update to matcher version 0.12.9.
    Open source →
  50. 0.2.18+1 11 Nov 2020
    Release notes
    • Fix spawnHybridUri to respect language versioning of the spawned uri.
    Open source →
  51. 0.2.17 17 Jun 2020
    Release notes
    • Add languageVersionComment on the MetaData class. This should only be present for test suites.
    Open source →
  52. 0.2.16 22 May 2020
    Release notes
    • Deprecate LiveTestController.liveTest, the LiveTestController instance now implements LiveTest and can be used directly.
    Open source →
  53. 0.2.15 02 Mar 2020
    Release notes
    • Cancel any StreamQueue that is created as a part of a stream matcher once it is done matching.
      • This fixes a bug where using a matcher on a custom stream controller and then awaiting the close() method on that controller would hang.
    • Avoid causing the test runner to hang if there is a timeout during a tearDown callback following a failing test case.
    Open source →
  54. 0.2.14 04 Feb 2020
    Release notes
    • Bump minimum SDK to 2.4.0 for safer usage of for-loop elements.
    Open source →
  55. 0.2.13 19 Jan 2020
    Release notes
    • Work around a bug in the 2.3.0 SDK by avoiding for-loop elements at the top level.
    Open source →
  56. 0.2.12 08 Jan 2020
    Release notes
    • Link to docs on setting timeout when a test times out with the default duration.
    • No longer directly depend on package:pedantic.
    Open source →
  57. 0.2.11 07 Nov 2019
    Release notes
    • Extend the timeout for synthetic tests, e.g. tearDownAll.
    Open source →
  58. 0.2.10 23 Oct 2019
    Release notes
    • Update to latest package:matcher. Improves output for instances of private classes.
    Open source →
  59. 0.2.9 16 Oct 2019
    Release notes
    • Treat non-solo tests as skipped so they are properly reported.
    Open source →
  60. 0.2.8 23 Sep 2019
    Release notes
    • Remove logic which accounted for a race condition in state change. The logic was required because package:sse used to not guarantee order. This is no longer the case.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive