Hello, Dartisans!
Kevin and I have been hard at work on a test runner for unittest, and today we’re excited to release the first product of that work. Just add unittest 0.12.0-alpha.0 as a dependency to your project:
dependency_overrides:
unittest: ^0.12.0-alpha.0
and run pub run unittest:unittest. If everything works out, it’ll run all your tests—that is, everything recursively in the test/ directory that ends with _test.dart. Nifty!
There are some caveats, though. This is our very first working draft—the simplest thing that could possibly work. It’s by no means finished, and while we don’t know of any bugs, there are a lot of things it just doesn’t support yet. In particular:
It can’t run browser tests. In fact, because of infrastructure changes, test files can’t even be compiled to JavaScript manually and run in the browser. This is definitely the biggest issue, and our highest priority to fix.
There’s no way to tell it what tests run on what platforms. Not that there is for unittest 0.11.* either, but this becomes more important when you have a test runner running a bunch of files all together.
There’s no way to tell it to run a specific test. You can tell it to run a specific file, but the only way to control what runs within that file is to comment it out.
That said, if these caveats don’t bother you, please try it out! If you find any issues, file them on the GitHub repo. If you’re curious about the general direction, go ahead and reply to this email.
- Natalie
dependency_overrides:
unittest: ^0.12.0-alpha.0
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
This is great news. Very much looking forward to not having to maintain all_test files. Will this work at any level? For example if I wanna run only tests at test/foo/bar?