I try to do Test-Driven Development (TDD) in Dart for the business logic of apps with Flutter. The startup time for running the test feels a little bit slow for fast TDD cycles. It is around 4-5 seconds on my machine.
I am using the package:test/test.dart
, so there is no need to deploy the app onto the device and the tests can run locally on the Dart VM. The tests themselves run fast.
While developing Android native apps with Java's JUnit and the local Java VM the startup time was much faster < 1sec.
Is there a way to get the start-up time for unit testing in Dart that fast too? (Without buying a much faster physical machine).
Edit: My Dart versions:
- Flutter doctor -v: 2.0.0-dev.54.0.flutter-46ab040e58
- The Dart Plugin uses: 2.0.0-edge.c080951d45e79cd25df98036c4be835b284a269c and is in my flutter installation: C:\flutter\bin\cache\dart-sdk
The Dart tests are inside a Flutter project. I start the Dart tests in Android Studio via right-clicking a file with a test or just use the ">" run test buttons in the IDE. Android Studio then generates a run config, so I can start it with keyboard shortcuts fast.