Closed dougdonohoe closed 6 years ago
As far as I can see, it is not possible to use --reporter
in flutter test
, and flutter pub test --help
informs us that dart:ui
will not be available:
Run the "test" package.
This is similar to "flutter test", but instead of hosting the tests in the
flutter environment it hosts the tests in a pure Dart environment. The main
differences are that the "dart:ui" library is not available and that tests
run faster. This is helpful for testing libraries that do not depend on any
packages from the Flutter SDK. It is equivalent to "pub run test".
Have you or anyone else looked at capturing test output from flutter test
in a manner that could be integrated with CI tools like Jenkins/Bamboo? That's how I stumbled upon this library. Any pointers would be appreciated.
On a side note, we might want to drop the "Flutter" tag up at pub since this really isn't useable for a flutter project.
This actually seems to work:
flutter test --machine | tojunit
Great find! I'll add it to the README
Thanks - I've actually got this working on Bamboo quite nicely. Your library is working great!
FYI, I wrote up how we used junitreport to run on flutter.
Do you have an example of using this for flutter tests?
I've tried
flutter pub pub run test --reporter json | tojunit
but running tests this way doesn't seem to work asflutter test
does. I get errors like this:Before I dig further, wondering if you have a working example for flutter project.
I'm hoping to use this library to do builds in Bamboo. Thanks!