Comments (6)
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.
Looks great. I would use --tags
and --exclude-tags
.
from test.
That sounds fine.
from test.
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.
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.
Initial configuration file support has landed, so this is no longer blocked.
from test.
Related Issues (20)
- VM platform fails to compile tests under `lib` HOT 9
- Move dart2wasm support to be "normal"
- Clean up the `isJS` and `isWasm` booleans from the Runtime wire format HOT 1
- Exe test of stdout/stderr is flaky on windows
- `dart test` failed tests could be on `stderr` HOT 8
- New `--set-exit-if-fail` option HOT 7
- `expect(future, matcher)` has an unhelpful stacktrace
- Release `package:checks` version compatible with test_api 0.7.0 (or greater) HOT 1
- IsNotA
- The coverage output json files are not placed in specified directory HOT 1
- Concurrency didn't work in single file with multiple tests HOT 8
- package:file can give not working verison HOT 6
- Windows CI Test Error: An escape sequence starting with '\u' must be followed by 4 hexadecimal digits. HOT 4
- Support for static diagnostic tests for macros HOT 5
- Replace broken Observatory URL with DevTools URL HOT 12
- test/README.md has broken link in ToC to "Stream matchers"
- Make checks: 0.2.X compatible with Flutter 3.20 HOT 1
- Firefox fails to start when called via `/Applications/Firefox.app/Contents/MacOS/firefox-bin` on macOS
- Safari as browser target for testing is getting an error HOT 2
- Add Line number qualifier to test.suite.path HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from test.