Back to results for “CI/CD”
Flutter › Integration Testing in Flutter

How can integration tests genuinely be properly integrated into a CI/CD pipeline, given that they genuinely require an actual real device or emulator to actually run, unlike considerably simpler and faster unit tests?

Advanced

Answer

Running integration tests within a CI/CD pipeline genuinely requires access to an actual real device or a properly configured emulator, which typically means using a cloud based device farm service, such as Firebase Test Lab, or properly configuring your own CI runner to actually spin up a genuine emulator instance itself, and since integration tests genuinely run considerably slower than unit tests, many teams choose to only actually run their full integration test suite on specific key branches, such as their main branch or before a genuine actual release, rather than genuinely running the entire suite on every single individual pull request the exact same way they would with their considerably faster unit tests.
# GitHub Actions step running integration tests via Firebase Test Lab
- run: gcloud firebase test android run --type instrumentation --app app.apk
Real-world example A team configures their CI pipeline to run their full integration test suite using Firebase Test Lab specifically before every single production release, while still continuing to run their considerably faster unit and widget tests on every single individual pull request as usual.

Common follow-ups: What are the genuine cost implications of regularly and repeatedly running integration tests against a genuine cloud based device farm service?;How do you actually properly and correctly parallelize a genuinely large integration test suite to actually meaningfully reduce its own overall total run time?