Skip to content

Smarter Unit Test Execution #5965

Closed

Description

@cmgoffena13

Right now all unit tests run during a plan unless the --skip-tests flag is used.

We already have the plan which shows us which models are affected by the changes. It makes sense to trim the unit tests that run during a plan to only the models that are affected by applying the plan.

I am not sure what behavior should happen for the --skip-backfill / --dry-run flags, but my initial thought is to skip all tests for this flag as well since it's considered a no-op operation.

To have backwards compatibility, we can add in an --all-tests flag to the plan command. I can see this being useful for CI dry-runs as well as edge cases that may show up.

Activity

  1. self-assigned this
    on Aug 21, 2026
  2. cmgoffena13 commented on Aug 21, 2026

    @cmgoffena13
    CollaboratorAuthor

    After thinking about it: the --skip-backfill / --dry-run flags already run all tests, so to make behavior more predictable, it makes more sense to just limit tests to model changes in a dry-run too. Keeping the --all-tests flag for backwards compatibility though.

  3. cmgoffena13 commented on Aug 29, 2026

    @cmgoffena13
    CollaboratorAuthor

    After discussion, have decided to flip the logic and have the smarter unit test execution be opt in with a flag called --test-changed-only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ImprovementImproves existing functionality

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions