Building an automated testing platform for Flutter applications
In our journey with Flutter at Wio, not only have we embraced its versatility for developing both mobile and web applications but also encountered a significant challenge: establishing a unified automated testing framework suitable for all these applications. Considering the limited range of tools available for Flutter's automated testing a few years back, this was no small feat.
Our vision for this framework: Efficiency reimagined, flexibility empowered, and comprehensiveness unbound.
- Cross-Platform Testing: Our framework is designed to handle tests across different environments, such as web and mobile applications. This is particularly important for our projects in Flutter, ensuring versatility and adaptability.
- Gherkin Language for Clear Test Cases: We embrace Gherkin for our test cases, making them crystal clear for everyone on the team. No matter your technical background, you can understand and contribute. This shared language speeds up troubleshooting when tests falter, keeping you moving forward.
- Advanced Reporting for CI/CD Pipelines: Integration with our Azure DevOps CI/CD pipelines was a key goal. Beyond basic integration, we wanted to achieve detailed and visually engaging reports, enhancing the insight and understanding of our testing processes.
- Incorporating Screenshots and Logs in Test Steps: To deepen our analysis, our framework includes the capability to attach screenshots and logs directly to specific steps in our test cases. This feature is invaluable for diagnosing and resolving issues more effectively.
- Cost Efficiency: Throughout the development of this framework, we were conscious of maintaining cost efficiency. We aimed to create an economical solution yet yielded a significant return on investment.
- Tag-Based Test Execution: A critical feature of our framework is the ability to execute tests in batches based on tags. This functionality allows for more efficient and targeted testing, particularly in response to changes made in certain areas of the application. By running only the relevant tests instead of the entire suite, we save considerable time and resources, enhancing the agility of our testing process.
Choosing the Right Tool for Integration Testing.
While this young framework brings excitement, automated testing still holds challenges. Though tools exist for end-to-end testing, the ideal solution remains elusive. Each tool we consider often requires us to build upon it with our custom solutions, which can vary in stability and efficiency.
In our search for the best testing tool, we primarily focused on two options that seemed most suitable for our needs: Appium and integration_test
. Appium stands out as a separate framework that's not specific to Flutter, offering a wider range of programming languages for writing tests. On the other hand, integration_test
is a part of the Flutter SDK, providing a more integrated approach specific to the Flutter app.
Appium vs Integration_test: A Comparison for Flutter Testing