This repo draws inspiration from the Flutter Demo repository created by Mohammad Faisal Khatri. Thanks for your awesome work!
In this 'Appium Flutter Java Automation' repo, we have covered the nuances of automating Flutter application testing using the following Appium drivers:
The testing is performed on Real Device Cloud infrastructure provided by TestMu AI
Step 1
Fetch the TestMu AI Credentials from the TestMu AI Profile Section section. Export the environment variables LT_USERNAME and LT_ACCESS_KEY by triggering the following commands on the terminal:
For macOS:
export LT_USERNAME=LT_USERNAME
export LT_ACCESS_KEY=LT_ACCESS_KEYFor Linux:
export LT_USERNAME=LT_USERNAME
export LT_ACCESS_KEY=LT_ACCESS_KEYFor Windows:
set LT_USERNAME=LT_USERNAME
set LT_ACCESS_KEY=LT_ACCESS_KEYAlternatively, update the TestMu AI Credentials - LT_USERNAME and LT_ACCESS_KEY in Makefile.
Step 2
For testing, we have used the open-source Provider Shopper Flutter sample app. The app is built for testing with the Flutter Driver and Flutter Integration Driver respectively.
You can download the Apps from the following locations:
- Provider Shopper Flutter sample app - Flutter Driver
- Provider Shopper Flutter sample app - Flutter Integration Driver
The app needs to be uploaded to the TestMu AI cloud storage. For this, navigate to the App Live App Dashboard, select the app, and click the 'Upload' button.
Now that both the apps are uploaded to the TestMu AI cloud storage, retrieve the App ID by clicking on the Settings button next to uploaded app:
Next, update the App ID in the test files:
Step 3
Run the make clean command on the terminal to clean the temporary files
make cleanRun the make build command on the terminal to build the automation project
make build
Step 4 - Automation with Appium Flutter Integration Driver
Trigger the command make flutter-integration-driver-test to test Flutter app on the TestMu AI cloud grid using the Appium Flutter Integration Driver.
Navigate to the TestMu AI Automation Dashboard to check the status of the test execution.
Step 5 - Automation with Appium Flutter Driver
Trigger the command make flutter-driver-test to test Flutter app on the TestMu AI cloud grid using the Appium Flutter Driver.
Navigate to the TestMu AI Automation Dashboard to check the status of the test execution.
Feel free to fork the repo and contribute to make it better! Email to himanshu[dot]sheth[at]gmail[dot]com for any queries or ping me on the following social media sites:
LinkedIn: @hjsblogger
Twitter: @hjsblogger