Giter Club home page Giter Club logo

Comments (6)

nex3 avatar nex3 commented on August 23, 2024

I did some thinking about this, and here's how I envision it working:

Tags are defined in roughly the same manner as other metadata. For example,

@Tag("awesome")

void main() {
  group("a neat group", () {
    test("a fun test", () {
      // ...
    }, tag: ["fun", "cool"]);
  }, tag: "neat");
}

Alternately, we could say that tag: always takes a string and that the string is comma-separated for multiple tags. Tags can be arbitrary strings, but to catch typos, they must be declared in the config file (#46):

tags:
  awesome:
  fun:
  cool:
  neat:

Tags can be used from the command-line with the --exclude and --include (--only?) flags, which specify which tags not to run or to run exclusively, respectively.

Tags can also have metadata associated with them in the configuration file. This metadata applies to all tests with that tag. For example:

tags:
  slow: {timeout: 2x}
  ie: {test_on: windows}
  git:
    on_platform:
      windows: {timeout: 2x}

Tags can also be configured differently for different presets (#83). For example:

presets:
  travis:
    tags: {ie: {skip: true}}

from test.

zoechi avatar zoechi commented on August 23, 2024

Looks great. I would use --tags and --exclude-tags.

from test.

nex3 avatar nex3 commented on August 23, 2024

That sounds fine.

from test.

nex3 avatar nex3 commented on August 23, 2024

Tags can be arbitrary strings, but to catch typos, they must be declared in the config file

Failing to do this should produce a warning. We should also allow tags that are specified on the command-line even if they're not in the config file, to support short-term tags like "solo".

from test.

nex3 avatar nex3 commented on August 23, 2024

Another thought: the --tags parameter should support the full platform-selector syntax so that users can express complex constraints like "run all fast isolate tests that don't use IO" (as --tags "fast && browser && !io"). This has the side effect of requiring that all tags be representable as Dart identifiers, but I don't think that's onerous.

--tags a,b,c would still workโ€”it would be equivalent to --tags "(a) && (b) && (c)". Similarly, --exclude-tags a,b,c would be equivalent to !(a) && !(b) && !(c).

from test.

nex3 avatar nex3 commented on August 23, 2024

Initial configuration file support has landed, so this is no longer blocked.

from test.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.