2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-15 18:12:54 +00:00
iceraven-browser/docs/l10nScreenshotsTests.md
2021-12-22 09:18:30 +00:00

2.4 KiB

Screenshtos Tests

We are using screengrab which works with fastlane to automate the process of capturing screenshots. All the l10n screenshots are generated through the ui tests. These particular tests run as part of the screenshots package (app/src/androidTest/mozilla/fenix/ui/screenshots)

Run tests locally from Android Studio

Navigate to app/src/androidTest/mozilla/fenix/ui/screenshots, once in that directory, run the full test suite or a specific test by clicking on the > button.

By running them manually you can check whether the test works or not but screenshots will not be saved.

Run tests locally from command line

  1. Install the gem: sudo gem install screengrab

  2. From command line run: fastlane screengrab --test_instrumentation_runner "androidx.test.runner.AndroidJUnitRunner"

The package configuration, apk paths as well as the locales are set in Screengrab file. In case there is a change there the file has to be modified accordingly. Before launching that command, there has to be an emulator running.

Once the build and tests finsish, screenshots will be saved in the root directory: fastlane/metadata/android If there is a failure and screenshots are not saved, it may be necessary to create these folders manually first. Currently screenshots are uploaded to gcloud once they are generated manually by running the previous command line.

Run tests on CI

Currently there is a cron job scheduled weekly to run these tests on Monday. It is set here. And the test results can be seen in treeherder, see previous link as an example.

So far only test results are checked to be sure these tests work but the screenshots are not taken/saved on CI. That could be done in the future if there is a request from l10n team or any team interested in that.

For any doubt or comment about these tests, please contact Mobile Test Engineering team, slack: #mobile-testeng