2. Add the integration_test dependency

Next, use the integration_test and flutter_test packages
to write integration tests. Add these dependencies to the dev_dependencies
section of the app’s pubspec.yaml file, specifying the Flutter SDK as the
location of the package.

dev_dependencies

integration_test

sdk

flutter

flutter_test

sdk

flutter

3. Create the test files

Create a new directory, integration_test, with an empty app_test.dart file:

4. Write the integration test

Now you can write tests. This involves three steps:

Initialize IntegrationTestWidgetsFlutterBinding, a singleton service that
executes tests on a physical device.

Interact and tests widgets using the WidgetTester class.

Test the important scenarios.

5. Run the integration test