Skip to content

Conversation

@nilsreichardt
Copy link
Contributor

@nilsreichardt nilsreichardt commented Jul 26, 2022

Description

The integration_test package is the new way to write e2e tests. Therefore, this PR migrates the tests from driver tests to integration tests.

As side effect, we see that the Android CI e2e tests pipeline is way more stable.

ToDos:

  • Migrate cloud_firestore
  • Migrate cloud_functions
  • Migrate firebase_analytics
  • Migrate firebase_app_installations
  • Migrate firebase_auth
  • Migrate firebase_core
  • Migrate firebase_crashlytics
  • Migrate firebase_database
  • Migrate firebase_dynamic_links
  • Migrate firebase_in_app_messaging
  • Migrate firebase_ml_model_downloader
  • Migrate firebase_remote_config
  • Migrate firebase_messaging
  • Migrate firebase_storage
  • Migrate firebase_firestore_odm
  • Migrate firebase_performance
  • Delete driver tests (test_driver/ folder)
  • Remove drive as dependency
  • Mark drive dependency on pub.dev as discontinued?
  • Check if CI is flaky (run CI 50 times)
  • Update docs on how to run integration tests

Related Issues

Closes #8909

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

nilsreichardt and others added 13 commits June 15, 2022 14:36
* Add `integration_test.dart`

* Add dummy `e2e_test.dart` file

* Add `integration_test` package

* Run integration tests for every pull request

* Use `IntegrationTestWidgetsFlutterBinding.ensureInitialized();`

* Format & use `flutter test`

* Use multidex

* Add new line for `FlutterMultiDexApplication.java`

* Format to pass CI

* Add comment for `flutter drive` command

* Use `flutter test` command for macos test

* Format test command for android

* Use one line comment

* Re-trigger CI

* Re-trigger CI

* Bump `minSdkVersion` to 21 for tests app
* Migrate `firebase_core`

* Add license in `e2e_test.dart`

* Add `IntegrationTestWidgetsFlutterBinding.ensureInitialized();` to `firebase_core_e2e_test.dart`

* Use `flutter_test` instead of `drive` package

* Fix `firebase_options.dart` file
…ge (#8947)

Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>
* Add `sample_data.dart`

* Add `cloud_functions_e2e_test.dart`

* Use cloud functions tests

* Remove ignore lint comment

* Re-trigger CI

Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>
…ge (#8973)

Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>
#8977)

Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>
…8975)

Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>
…8974)

Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>
Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>
Co-authored-by: Nils Reichardt <nils@reichardt.io>
@nilsreichardt nilsreichardt changed the title test: migrate e2e tests from Flutter driver to integration tests test: migrate all packages from Flutter driver to integration tests Jul 26, 2022
nilsreichardt and others added 2 commits August 22, 2022 09:35
Co-authored-by: Remi Rousselet <darky12s@gmail.com>
# Conflicts:
#	packages/cloud_firestore_odm/cloud_firestore_odm_generator/lib/src/validator_generator.dart
#	tests/android/app/build.gradle
#	tests/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java
@russellwheatley
Copy link
Member

Hey @nilsreichardt, I've fixed the merge conflicts for you. Let me know if you need any further assistance 🙏

@nilsreichardt
Copy link
Contributor Author

Thanks, @russellwheatley 🙏

@russellwheatley russellwheatley added the type: infrastructure Improvements to the codebase label Sep 6, 2022
@nilsreichardt
Copy link
Contributor Author

Hey @russellwheatley, could you again merge the master into this branch?

@russellwheatley
Copy link
Member

Done, @nilsreichardt 😄

@nilsreichardt
Copy link
Contributor Author

I started from scratch and opened a new PR where I migrated all packages in one PR: #9649

@firebase firebase locked and limited conversation to collaborators Nov 1, 2022
@Lyokone Lyokone deleted the migrate-to-integration-tests branch October 7, 2024 07:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

type: infrastructure Improvements to the codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate e2e tests from Flutter Driver to integration_test package

2 participants