I’m trying to use the patrol develop
command to use the hot reload functionality. But when I run it, the app is built properly but it never launches on my emulator and I see a warning that says it is not attached to the app yet
❯ patrol develop -t integration_test/initial_test.dart --device=emulator-5554 --flavor=dev
• Building apk with entrypoint test_bundle.dart...
✓ Completed building apk with entrypoint test_bundle.dart (50.1s)
• Executing tests of apk with entrypoint test_bundle.dart on emulator-5554...
Hot Restart: logs connected
[WARN] Hot Restart: not attached to the app yet
This is my test code
import 'common.dart'; // Copied from an example in patrol's example app, linked below
void main() {
patrolSetUp(() {
// Smoke test for https://github.com/leancodepl/patrol/issues/2021
expect(2 + 2, equals(4));
});
patrol('Initial test', ($) async {
await createApp($);
await $('Continue with English').tap();
expect($('Get Started'), findsOneWidget);
await $('Get Started').tap();
});
}
I followed setup for android as given in the documentation. I setup flavors as well as I use two flavors in my app. Removing the --flavor
flag also doesn’t help.
I broke my head trying to figure out the functions used in the code demonstrated in the video given in docs. I then figured out that it uses methods from a file called common.dart that contains some wrapper methods. Using the exact same setup still doesn’t help.