Flutter integration test - Failed to stop the app - only on iOS
Asked Answered
H

1

6

I am doing an integration test for my app on both simulators android and iOS

the android one finish like expected All tests passed and application stopped

but the iOS one finish testing and all Tests passed but finish with error "Failed to stop app"

my app.dart file

import 'package:flutter_driver/driver_extension.dart';
import 'package:myapp/main.dart' as app;

void main(){
  enableFlutterDriverExtension();
  app.main();
}

my app_test.dart file

import 'package:flutter_driver/flutter_driver.dart';
import 'package:test/test.dart';

void main(){
  group('Empty App',(){

    FlutterDriver? driver;

    setUpAll(() async {
      driver = await FlutterDriver.connect();
    });

    tearDownAll(() async {
      if (driver != null){
        await driver!.close();
      }
    });

    test('find widgets',() async{
      final text1 = find.byValueKey('Today');
      expect(await driver!.getText(text1),'Today');
    });
  });
}

I am using android studio on MacBook Air M1

What can I do to solve this error?

Thanks

Hanus answered 10/9, 2021 at 11:36 Comment(0)
M
0

See https://github.com/flutter/flutter/issues/85538 for further information. The tests exit with 0, not with an error. It seems to be still ongoing.

Mummer answered 4/1, 2023 at 13:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.