Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: README.md

Issue 1096693005: Support @Skip as a suite-level annotation. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/frontend/skip.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: README.md
diff --git a/README.md b/README.md
index 0d43ebc1c600c051623e7b0ef2d4d3bc40d5de3d..c2717768e8d67a4971aac3d8e85bf5dbaf9ac912 100644
--- a/README.md
+++ b/README.md
@@ -315,6 +315,49 @@ the following HTML file:
## Configuring Tests
+### Skipping Tests
+
+If a test, group, or entire suite isn't working yet and you just want it to stop
+complaining, you can mark it as "skipped". The test or tests won't be run, and,
+if you supply a reason why, that reason will be printed. In general, skipping
+tests indicates that they should run but is temporarily not working. If they're
+is fundamentally incompatible with a platform, [`@TestOn`/`testOn`][TestOn]
+should be used instead.
+
+[TestOn]: #restricting-tests-to-certain-platforms
+
+To skip a test suite, put a `@Skip` annotation at the top of the file:
+
+```dart
+@Skip("currently failing (see issue 1234)")
+
+import "package:test/test.dart";
+
+void main() {
+ // ...
+}
+```
+
+The string you pass should describe why the test is skipped. You don't have to
+include it, but it's a good idea to document why the test isn't running.
+
+Groups and individual tests can be skipped by passing the `skip` parameter. This
+can be either `true` or a String describing why the test is skipped. For example:
+
+```dart
+import "package:test/test.dart";
+
+void main() {
+ group("complicated algorithm tests", () {
+ // ...
+ }, skip: "the algorithm isn't quite right");
+
+ test("error-checking test", () {
+ // ...
+ }, skip: "TODO: add error-checking.");
+}
+```
+
### Timeouts
By default, tests will time out after 30 seconds of inactivity. However, this
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/frontend/skip.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698