Skip to content

Conversation

davidmorgan
Copy link
Contributor

@davidmorgan davidmorgan commented Sep 11, 2025

Refactor integration_tests and some tweaks to _tests and other tests:

  • Some integration_tests were not fully end to end, they wrote their own build.dart script which called the build_runner run method bypassing the build_runner bootstrap code; this is the main reason for doing the rewrite now as this is awkward for the bootstrap rewrite currently in progress. Make them all us dart run build_runner so they are actually end to end.
  • Remove tests from _tests that are covered in integration_tests: Re-snapshots if there is no asset graph, exception_handling_test.dart
  • Remove help_test, this is testing configuration and not really worth an e2e test.
  • Merge test cases from build_script_generate_test into integration_tests as they are e2e tests
  • Most of build_integration_test.dart is replaced by equivalent tests, except: "checking for existing outputs works with deleted intermediate outputs" is delete, it's covered sufficiently by smaller tests
  • symlinks_test is deleted because the results tested are what happens anyway with symlinked files, there is no supporting implementation
  • some tests that were checking invalidation with serve now check invalidation with watch instead because watch is much more widely used and the implementation is the same

Update the CI configs:

  • unify on SDK version dev, there doesn't seem to be a lot of value in running on different SDKs
  • run small tests only on Linux, start running build_runner integration tests on Windows
  • run most of the build_runner integration tests along with the unit tests and in parallel because they are pretty small + fast; leave two tests in the "integration tests" bucket that are slow and could use a rewrite, and leave two tests for the "serve" command in the "integration tests" bucket because they need to pick an open port before they can run in parallel; add TODOs to follow up

Further follow-up work:

  • See if the remainder of the _test e2e tests can be replaced by integration_tests, mostly this looks like covering web builds

Copy link

PR Health

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check.

@davidmorgan davidmorgan force-pushed the better-integration-tests branch from e8578f2 to a784110 Compare September 12, 2025 12:12
@davidmorgan davidmorgan changed the title Make integration tests actually e2e Refactor integration tests Sep 12, 2025
@davidmorgan davidmorgan force-pushed the better-integration-tests branch 12 times, most recently from c57fa21 to c9dce8d Compare September 12, 2025 15:42
@davidmorgan davidmorgan force-pushed the better-integration-tests branch from c9dce8d to d5aff22 Compare September 12, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant