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
Releases
latest 60 of 116-
3.5.1931 Jul 2026 -
3.5.1827 Jul 2026Release notes
Open source →- Add
visibleOutputPostProcessBuilderstotestBuilders. - Use
build_runner2.15.3.
- Add
-
3.5.1713 Jul 2026 -
3.5.1608 Jul 2026 -
3.5.1530 Apr 2026Release notes
Open source →- Use
build_runner2.15.0. - Remove
enableLowResourceModeparameters as there is no longer a low resource mode. - Allow
analyzer13.0.0.
- Use
-
3.5.1424 Apr 2026 -
3.5.1322 Apr 2026 -
3.5.1220 Mar 2026 -
3.5.1117 Mar 2026 -
3.5.1005 Mar 2026 -
3.5.904 Mar 2026 -
3.5.803 Mar 2026 -
3.5.711 Feb 2026 -
3.5.605 Feb 2026Release notes
Open source →- Add documentation about reading generated assets as
StringusingTestReaderWriterandtestBuilderwithflattenOutput. - Bug fix: when using
resolveSourceswithreadAllSourcesFromFilesystem, skip reading realasset_graph.jsonfiles. This prevents the test build from deleting, in RAM only, generated outputs of the real build. - Use
build_runner2.11.0.
- Add documentation about reading generated assets as
-
3.5.513 Jan 2026 -
3.5.419 Nov 2025 -
3.5.314 Nov 2025 -
3.5.211 Nov 2025 -
3.5.124 Oct 2025 -
3.5.020 Oct 2025Release notes
Open source →- Improve
TestBuilderResult: addsucceeded,outputsanderrors. DeprecatebuildResultin favor of these new members. - Add
verbosetotestBuildersand related methods. Like the command line flag it enables info logging from builders. - Add
flattenOutputtotestBuilders. 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.
- Improve
-
3.4.101 Oct 2025 -
3.4.005 Sep 2025Release notes
Open source →- Support post process builders in
testBuilders. And, addappliesBuildersso that builders can apply post process builders. - Add
testBuilderFactories: liketestBuilders, but provide the builder factories instead of the builders. Use this to allow config read frombuild.yamlto be passed in to the factory. TestBuildernow accepts aname: this is the name that will be shown in logging and can be used to refer to the builder inbuild.yaml.- More realistic test builds: in
resolveSourcesandtestBuilders, stop builders reading from.dart_tool. - Bug fix: in
testBuilders, configure the root package correctly when it has no sources. - Use
build_runner_core9.4.0. - Remove unused dep:
build_resolvers. - Remove unused dep:
build_runner_core.
- Support post process builders in
-
3.3.402 Sep 2025 -
3.3.302 Sep 2025 -
3.3.215 Aug 2025 -
3.3.107 Aug 2025 -
3.3.017 Jul 2025Release notes
Open source →- Read build configs using
AssetReaderso they're easier to test: you can now pass inbuild.yamllike any other asset. - Bug fix: don't crash when a builder logs during a
testBuilderorresolveSourcecall outside a test. - Remove unused deps:
async,convert. - Remove unused dev_deps:
collection. - Files loaded from disk for
resolveSourcesandtestBuildersthat are in the same package as explicitly-passed test inputs are now loaded if they match the default globs, such aslib/**, instead of ignored. This more closely matches version 2 behavior. - Use
build3.0.0. - Use
build_resolvers3.0.0.
- Read build configs using
-
3.3.0-dev.316 Jul 2025 pre-releaseRelease notes
Open source →- Read build configs using
AssetReaderso they're easier to test: you can now pass inbuild.yamllike any other asset. - Bug fix: don't crash when a builder logs during a
testBuilderorresolveSourcecall outside a test. - Remove unused deps:
async,convert. - Remove unused dev_deps:
collection.
- Read build configs using
-
3.3.0-dev.227 Jun 2025 pre-releaseRelease notes
Open source →- Files loaded from disk for
resolveSourcesandtestBuildersthat are in the same package as explicitly-passed test inputs are now loaded if they match the default globs, such aslib/**, instead of ignored. This more closely matches version 2 behavior.
- Files loaded from disk for
-
3.3.0-dev.124 Jun 2025 pre-release -
3.2.127 Jun 2025Nothing published for this version
-
3.2.024 Jun 2025Release notes
Open source →- Fixes when passing a
readerWritertotestBuilders: don't count initial assets as outputs; do set up packages for initial assets; only apply builders to packages mentioned insourceAssets. - Add
readAllSourcesFromFilesystemparameter toresolveSources. Set it totrueto make the method behave as it did inbuild_test2.2.0. - Fix to
resolveSourceserror handling.
- Fixes when passing a
-
3.1.120 Jun 2025Nothing published for this version
-
3.1.018 Jun 2025Release notes
Open source →- Add
inputsTrackedForandresolverEntrypointsTrackedFortoReaderWriterTesting, so tests can determine what each build step read and resolved. - Add
loadIsolateSourcestoReaderWriterTesting. It loads all real sources visible to the test into memory. testBuilderdefaultonLognow works outside of tests: it falls back toprintinstead of crashing.- Update
README.md.
- Add
-
3.0.016 Jun 2025Release notes
Open source →Breaking changes:
- Breaking change: removed
tearDownparameter toresolveSourcesfor keeping resolvers across multiple tests. - Breaking change: tests must use new
TestReaderWriterinstead ofInMemoryAssetReaderandInMemoryAssetWriter. - Breaking change:
testBuilderno longer accepts areaderand awriter. Instead it returns aTestBuilderResultwith theTestReaderWriterthat was used. - Breaking change:
resolveSourcesno longer automatically reads non-input files from the filesystem; specify explicitly which non-input files the test should read innonInputsToReadFromFilesystem. - Breaking change: remove
MultiAssetReader. Load the source into oneTestReaderWriterinstead. - Breaking change:
TestReaderWriter.assetsReaddoes not take into account details of the build, it's just what was actually read. UseTestReaderWriter.inputsTrackedfor what was recorded as an input. Note that resolver entrypoints are now tracked separately from inputs, seeTestReaderWriter.resolverEntrypointsTracked. - Breaking change: Remove
StubAssetReader. UseTestReaderWriterinstead.
Other user-visible changes:
resolveSourcesandtestBuildernow do a fullbuild_runnerbuild, with configuration as much as possible based on the some parameters.- Add
testBuildersto run a test build with multiple builders. - Add
optionalBuilderstotestBuildersto have some builders be optional. - Add
visibleOutputBuilderstotestBuildersto have some builders write their output next to their inputs. - Add
testingBuilderConfigtotestBuildersto control builder config override. - Add
resolversparameter totestBuildandtestBuilders. - Add
readerWriterandenableLowResourceModeparameters totestBuildandtestBuilders. TestReaderWriterwrites and deletes are notified toFakeWatcher.TestReaderWritertracksassetsWritten.- Support checks on reader state after a build action in
resolveSources.
Versions:
- Bump the min SDK to 3.7.0.
- Use
build_runner_core9.0.0.
Internal changes:
- Start using
package:build/src/internal.dart. - Refactor
BuildCacheReadertoBuildCacheAssetPathProvider. - Refactor
FileBasedAssetReaderandFileBasedAssetWritertoReaderWriter.
- Breaking change: removed
-
2.2.316 Dec 2024 -
2.2.214 Dec 2023Release notes
Open source →- Bump the min sdk to 3.0.0.
- Support the latest version of
package:test_core.
-
2.2.125 Sep 2023Release notes
Open source →- 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.
- Avoid passing a nullable value to
-
2.2.029 Jun 2023 -
2.1.727 Mar 2023 -
2.1.619 Jan 2023Release notes
Open source →- Fix bug in package config file loading.
- Raise the minimum SDK constraint to 2.18.
-
2.1.516 Dec 2021 -
2.1.401 Oct 2021Release notes
Open source →- Update
pub runreferences todart run. - Drop package:pedantic dependency and replace it with package:lints.
- Update
-
2.1.302 Aug 2021 -
2.1.213 Jul 2021 -
2.1.109 Jul 2021 -
2.1.020 Apr 2021Release notes
Open source →- Migrate internal builders of this package to null safety
- Require build_config version 1.0.0.
-
2.0.012 Mar 2021Release notes
Open source →- Migrate
package:build_test/build_test.dartto null safety. - Update to build
2.x. - Update to build_resolvers
2.x.
- Migrate
-
1.3.717 Feb 2021 -
1.3.602 Feb 2021 -
1.3.501 Feb 2021 -
1.3.413 Jan 2021 -
1.3.306 Jan 2021Release notes
Open source →- Return an empty stream instead of throwing from
PackageAssetReader.findAssetswhen passed a non-existing package name. - Allow the null safe migration package versions for
crypto,glob,logging, andpackage_config.
- Return an empty stream instead of throwing from
-
1.3.217 Dec 2020 -
1.3.115 Dec 2020 -
1.3.029 Oct 2020Release notes
Open source →- Add support for running generated
.browser_test.dartdirectly instead of expecting the test runner with the query stringdirectRun=true. It is no longer necessary to create a build config which generates for*_test.dartfiles inbuild_web_compilers, the default config generates for.browser_test.dartfiles which are used bydebug.html.
- Add support for running generated
-
1.2.222 Sep 2020 -
1.2.107 Aug 2020Release notes
Open source →- Improve/fix
testBuilderdocumentation. - Update test bootstrap builder to copy language version comments from the test file if present.
- Improve/fix
-
1.2.029 May 2020Release notes
Open source →- Add support for recognizing custom platforms in TestOn annotations during bootstrapping.
-
1.0.026 Mar 2020Release notes
Open source →- Removed dependency on
package:package_resolver, changed topackage:package_config.- All apis which used to take a
PackageResolvernow take aPackageConfig.
- All apis which used to take a
- Require SDK version
2.7.0.
- Removed dependency on