Skip to content

Is --run-skipped intended to work on flutter/flutter? #158972

@matanlurey

Description

@matanlurey

Both dart test and flutter test support a --run-skipped, which is intended to mean "run tests otherwise that would be skipped". Ideally it would be used to temporarily (either locally or on a bringup: true task) run tests that are flaking or failing for reasons that we don't want to affect the mainline tree or development experience.

For example:

cd flutter/packages/flutter_tools
dart test test/general.shard --run-skipped

However, sometimes we use skip to mean the test can't run in this configuration, such as:

test('...', () {
  // ...
}, skip: !Platform.isWindows ? 'Test only runs on windows' : false);

In that case, --run-skipped not only can never work, but now the feature cannot be used across the codebase.

For Dart (dart test-instrumented) tests, we could use @TestOn instead:

@TestOn('windows')
library;

// ...

void main() {
  test('...', () {
  
  });
}

However, my understanding is this feature does not work in flutter test, so it would not work everywhere/we would diverge.

It would be awesome to have some instruction, outside of commenting code in/out, how we could run skipped tests but also not run tests that are never intended to run in a given configuration or platform. Ideally (to me) that would mean using --run-skipped and perhaps using/supporting @TestOn broadly, but that is obviously more work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: tests"flutter test", flutter_test, or one of our testsc: contributor-productivityTeam-specific productivity, code health, technical debt.c: proposalA detailed proposal for a change to Flutterc: tech-debtTechnical debt, code quality, testing, etc.team-toolOwned by Flutter Tool teamtool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy