Skip to content

Enable dart test to shard on files, not individual tests #2614

@christerswahn

Description

@christerswahn

We have a rather large test suite and most tests have a relatively time consuming setup and teardown. We have implemented sharding with dart test, which helps, but not at all to the degree we expected.

It appears that the sharding cuts across the files, i.e. tests from the same test file occur in more than one shard. When splitting the work like this, the same setUpAll and tearDownAll chains need to be run multiple times. This is very inefficient.

We would like a new flag for dart test to make the shard splitter split on files instead of tests.

This has an additional benefit. Often a bug will cause a cluster of test cases to fail, and these are often in the same file, which would mean that they would be reported in the same shard's output and thus easier to get an overview of.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions