PackageTrack
Sign in Get early access

build_test

Utilities for writing unit tests of Builders.

3.5.19 214K downloads/mo #821 most downloaded on pub.dev dart-lang/build

What this package is like to depend on

Last release 24 days ago

31 Jul 2026

Ships fairly regularly

a new release about every 3 weeks

Nearly every release is documented

notes for 109 of 113 stable releases

Nothing withdrawn

no release was ever pulled

10 years old

116 releases · first in 2016

24 releases in the last 12 months

see the full history below

Release timeline

116 releases · May 2016 to Jul 2026
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 116
  1. 3.5.19 31 Jul 2026
    Release notes
    • Use build_runner 2.16.0.
    • Allow package_config 3.x.
    Open source →
    Release notes
    • Use build_runner 2.16.0.
    • Allow package_config 3.x.
    Open source →
  2. 3.5.18 27 Jul 2026
    Release notes
    • Add visibleOutputPostProcessBuilders to testBuilders.
    • Use build_runner 2.15.3.
    Open source →
  3. 3.5.17 13 Jul 2026
    Release notes
    • Allow analyzer 14.x, require 13.3.0.
    • Require Dart 3.11.0.
    Open source →
  4. 3.5.16 08 Jul 2026
    Release notes
    • Use build_runner 2.15.1.
    • Require Dart 3.8.0.
    Open source →
  5. 3.5.15 30 Apr 2026
    Release notes
    • Use build_runner 2.15.0.
    • Remove enableLowResourceMode parameters as there is no longer a low resource mode.
    • Allow analyzer 13.0.0.
    Open source →
  6. 3.5.14 24 Apr 2026
    Release notes
    • Use build_runner 2.14.1.
    Open source →
  7. 3.5.13 22 Apr 2026
    Release notes
    • Use build_runner 2.14.0.
    Open source →
  8. 3.5.12 20 Mar 2026
    Release notes
    • Use build_runner 2.13.1.
    Open source →
  9. 3.5.11 17 Mar 2026
    Release notes
    • Use build_runner 2.13.0.
    Open source →
  10. 3.5.10 05 Mar 2026
    Release notes
    • Use build_runner 2.12.2.
    Open source →
  11. 3.5.9 04 Mar 2026
    Release notes
    • Use build_runner 2.12.1.
    Open source →
  12. 3.5.8 03 Mar 2026
    Release notes
    • Use build_runner 2.12.0.
    Open source →
  13. 3.5.7 11 Feb 2026
    Release notes
    • Use build_runner 2.11.1.
    Open source →
  14. 3.5.6 05 Feb 2026
    Release notes
    • Add documentation about reading generated assets as String using TestReaderWriter and testBuilder with flattenOutput.
    • Bug fix: when using resolveSources with readAllSourcesFromFilesystem, skip reading real asset_graph.json files. This prevents the test build from deleting, in RAM only, generated outputs of the real build.
    • Use build_runner 2.11.0.
    Open source →
  15. 3.5.5 13 Jan 2026
    Release notes
    • Use build_runner 2.10.5.
    Open source →
  16. 3.5.4 19 Nov 2025
    Release notes
    • Use build_runner 2.10.4.
    Open source →
  17. 3.5.3 14 Nov 2025
    Release notes
    • Use build_runner 2.10.3.
    Open source →
  18. 3.5.2 11 Nov 2025
    Release notes
    • Use build_runner 2.10.2.
    Open source →
  19. 3.5.1 24 Oct 2025
    Release notes
    • Use build_runner 2.10.1.
    Open source →
  20. 3.5.0 20 Oct 2025
    Release notes
    • Improve TestBuilderResult: add succeeded, outputs and errors. Deprecate buildResult in favor of these new members.
    • Add verbose to testBuilders and related methods. Like the command line flag it enables info logging from builders.
    • Add flattenOutput to testBuilders. Use it for a less realistic but simpler build in which generated outputs are always written directly to each package instead of "hidden" output being written to .dart_tool/build/generated.
    Open source →
  21. 3.4.1 01 Oct 2025
    Release notes
    • Use build_runner 2.9.0.
    • Use build 4.0.1.
    Open source →
  22. 3.4.0 05 Sep 2025
    Release notes
    • Support post process builders in testBuilders. And, add appliesBuilders so that builders can apply post process builders.
    • Add testBuilderFactories: like testBuilders, but provide the builder factories instead of the builders. Use this to allow config read from build.yaml to be passed in to the factory.
    • TestBuilder now accepts a name: this is the name that will be shown in logging and can be used to refer to the builder in build.yaml.
    • More realistic test builds: in resolveSources and testBuilders, stop builders reading from .dart_tool.
    • Bug fix: in testBuilders, configure the root package correctly when it has no sources.
    • Use build_runner_core 9.4.0.
    • Remove unused dep: build_resolvers.
    • Remove unused dep: build_runner_core.
    Open source →
  23. 3.3.4 02 Sep 2025
    Release notes
    • Use build 4.0.0.
    • Use build_runner 2.7.2.
    Open source →
  24. 3.3.3 02 Sep 2025
    Release notes
    • Use build 3.1.0.
    • Use build_runner 2.7.1.
    Open source →
  25. 3.3.2 15 Aug 2025
    Release notes
    • Use build 3.0.2.
    • Use build_runner 2.7.0.
    • Documentation revamp.
    Open source →
  26. 3.3.1 07 Aug 2025
    Release notes
    • Use build 3.0.1.
    • Allow analyzer 8.0.0.
    Open source →
  27. 3.3.0 17 Jul 2025
    Release notes
    • Read build configs using AssetReader so they're easier to test: you can now pass in build.yaml like any other asset.
    • Bug fix: don't crash when a builder logs during a testBuilder or resolveSource call outside a test.
    • Remove unused deps: async, convert.
    • Remove unused dev_deps: collection.
    • Files loaded from disk for resolveSources and testBuilders that are in the same package as explicitly-passed test inputs are now loaded if they match the default globs, such as lib/**, instead of ignored. This more closely matches version 2 behavior.
    • Use build 3.0.0.
    • Use build_resolvers 3.0.0.
    Open source →
  28. 3.3.0-dev.3 16 Jul 2025 pre-release
    Release notes
    • Read build configs using AssetReader so they're easier to test: you can now pass in build.yaml like any other asset.
    • Bug fix: don't crash when a builder logs during a testBuilder or resolveSource call outside a test.
    • Remove unused deps: async, convert.
    • Remove unused dev_deps: collection.
    Open source →
  29. 3.3.0-dev.2 27 Jun 2025 pre-release
    Release notes
    • Files loaded from disk for resolveSources and testBuilders that are in the same package as explicitly-passed test inputs are now loaded if they match the default globs, such as lib/**, instead of ignored. This more closely matches version 2 behavior.
    Open source →
  30. 3.3.0-dev.1 24 Jun 2025 pre-release
    Release notes
    • Use build 3.0.0-dev.1.
    • Use build_resolvers 3.0.0-dev.1.
    Open source →
  31. 3.2.1 27 Jun 2025

    Nothing published for this version

  32. 3.2.0 24 Jun 2025
    Release notes
    • Fixes when passing a readerWriter to testBuilders: don't count initial assets as outputs; do set up packages for initial assets; only apply builders to packages mentioned in sourceAssets.
    • Add readAllSourcesFromFilesystem parameter to resolveSources. Set it to true to make the method behave as it did in build_test 2.2.0.
    • Fix to resolveSources error handling.
    Open source →
  33. 3.1.1 20 Jun 2025

    Nothing published for this version

  34. 3.1.0 18 Jun 2025
    Release notes
    • Add inputsTrackedFor and resolverEntrypointsTrackedFor to ReaderWriterTesting, so tests can determine what each build step read and resolved.
    • Add loadIsolateSources to ReaderWriterTesting. It loads all real sources visible to the test into memory.
    • testBuilder default onLog now works outside of tests: it falls back to print instead of crashing.
    • Update README.md.
    Open source →
  35. 3.0.0 16 Jun 2025
    Release notes

    Breaking changes:

    • Breaking change: removed tearDown parameter to resolveSources for keeping resolvers across multiple tests.
    • Breaking change: tests must use new TestReaderWriter instead of InMemoryAssetReader and InMemoryAssetWriter.
    • Breaking change: testBuilder no longer accepts a reader and a writer. Instead it returns a TestBuilderResult with the TestReaderWriter that was used.
    • Breaking change: resolveSources no longer automatically reads non-input files from the filesystem; specify explicitly which non-input files the test should read in nonInputsToReadFromFilesystem.
    • Breaking change: remove MultiAssetReader. Load the source into one TestReaderWriter instead.
    • Breaking change: TestReaderWriter.assetsRead does not take into account details of the build, it's just what was actually read. Use TestReaderWriter.inputsTracked for what was recorded as an input. Note that resolver entrypoints are now tracked separately from inputs, see TestReaderWriter.resolverEntrypointsTracked.
    • Breaking change: Remove StubAssetReader. Use TestReaderWriter instead.

    Other user-visible changes:

    • resolveSources and testBuilder now do a full build_runner build, with configuration as much as possible based on the some parameters.
    • Add testBuilders to run a test build with multiple builders.
    • Add optionalBuilders to testBuilders to have some builders be optional.
    • Add visibleOutputBuilders to testBuilders to have some builders write their output next to their inputs.
    • Add testingBuilderConfig to testBuilders to control builder config override.
    • Add resolvers parameter to testBuild and testBuilders.
    • Add readerWriter and enableLowResourceMode parameters to testBuild and testBuilders.
    • TestReaderWriter writes and deletes are notified to FakeWatcher.
    • TestReaderWriter tracks assetsWritten.
    • Support checks on reader state after a build action in resolveSources.

    Versions:

    • Bump the min SDK to 3.7.0.
    • Use build_runner_core 9.0.0.

    Internal changes:

    • Start using package:build/src/internal.dart.
    • Refactor BuildCacheReader to BuildCacheAssetPathProvider.
    • Refactor FileBasedAssetReader and FileBasedAssetWriter to ReaderWriter.
    Open source →
  36. 2.2.3 16 Dec 2024
    Release notes
    • Bump the min sdk to 3.6.0.
    • Allow analyzer version 7.x.
    Open source →
  37. 2.2.2 14 Dec 2023
    Release notes
    • Bump the min sdk to 3.0.0.
    • Support the latest version of package:test_core.
    Open source →
  38. 2.2.1 25 Sep 2023
    Release notes
    • Avoid passing a nullable value to Future.value.
    • Update to build_resolvers 2.4.0, which resolves some race conditions when using multiple resolvers instances.
    Open source →
  39. 2.2.0 29 Jun 2023
    Release notes
    • Forward logs from testBuilder to printOnFailure by default.
    Open source →
  40. 2.1.7 27 Mar 2023
    Release notes
    • Allow the latest test_core (version 5.x).
    Open source →
  41. 2.1.6 19 Jan 2023
    Release notes
    • Fix bug in package config file loading.
    • Raise the minimum SDK constraint to 2.18.
    Open source →
  42. 2.1.5 16 Dec 2021
    Release notes
    • Allow the latest analyzer.
    Open source →
  43. 2.1.4 01 Oct 2021
    Release notes
    • Update pub run references to dart run.
    • Drop package:pedantic dependency and replace it with package:lints.
    Open source →
  44. 2.1.3 02 Aug 2021
    Release notes
    • Use allowedOutputs in TestBuilder instead of computing them again.
    Open source →
  45. 2.1.2 13 Jul 2021
    Release notes
    • Allow the latest package:test_core.
    Open source →
  46. 2.1.1 09 Jul 2021
    Release notes
    • Allow analyzer version 2.x.x.
    Open source →
  47. 2.1.0 20 Apr 2021
    Release notes
    • Migrate internal builders of this package to null safety
    • Require build_config version 1.0.0.
    Open source →
  48. 2.0.0 12 Mar 2021
    Release notes
    • Migrate package:build_test/build_test.dart to null safety.
    • Update to build 2.x.
    • Update to build_resolvers 2.x.
    Open source →
  49. 1.3.7 17 Feb 2021
    Release notes
    • Update to analyzer 1.x.
    • Update to glob 2.x.
    Open source →
  50. 1.3.6 02 Feb 2021
    Release notes
    • Allow the null safe pre-release version of html.
    Open source →
  51. 1.3.5 01 Feb 2021
    Release notes
    • Allow the null safe pre-release version of package_config and watcher.
    Open source →
  52. 1.3.4 13 Jan 2021
    Release notes
    • Allow the null safe pre-release version of stream_transform.
    Open source →
  53. 1.3.3 06 Jan 2021
    Release notes
    • Return an empty stream instead of throwing from PackageAssetReader.findAssets when passed a non-existing package name.
    • Allow the null safe migration package versions for crypto, glob, logging, and package_config.
    Open source →
  54. 1.3.2 17 Dec 2020
    Release notes
    • Fix the test/index.html not generating by default.
    Open source →
  55. 1.3.1 15 Dec 2020
    Release notes
    • Allow build version 1.6.x.

    • Use $package$ placeholder instead of $test$.

    Open source →
  56. 1.3.0 29 Oct 2020
    Release notes
    • Add support for running generated .browser_test.dart directly instead of expecting the test runner with the query string directRun=true. It is no longer necessary to create a build config which generates for *_test.dart files in build_web_compilers, the default config generates for .browser_test.dart files which are used by debug.html.
    Open source →
  57. 1.2.2 22 Sep 2020
    Release notes
    • Allow package:build versions through 1.5.x.
    Open source →
  58. 1.2.1 07 Aug 2020
    Release notes
    • Improve/fix testBuilder documentation.
    • Update test bootstrap builder to copy language version comments from the test file if present.
    Open source →
  59. 1.2.0 29 May 2020
    Release notes
    • Add support for recognizing custom platforms in TestOn annotations during bootstrapping.
    Open source →
  60. 1.0.0 26 Mar 2020
    Release notes
    • Removed dependency on package:package_resolver, changed to package:package_config.
      • All apis which used to take a PackageResolver now take a PackageConfig.
    • Require SDK version 2.7.0.
    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