Unverified Commit 5b61b44f authored by isabelrios's avatar isabelrios Committed by GitHub
Browse files

cron-job-ui-screenshots (#12423)

Co-authored-by: default avatarisabel rios <isabelrios@MacBook-Pro-de-isabel-2.local>
parent d449184f
...@@ -32,3 +32,9 @@ jobs: ...@@ -32,3 +32,9 @@ jobs:
treeherder-symbol: bump-ac treeherder-symbol: bump-ac
target-tasks-method: bump_android_components target-tasks-method: bump_android_components
when: [{hour: 14, minute: 0}] when: [{hour: 14, minute: 0}]
- name: screenshots
type: decision-task
treeherder-symbol: screenshots-D
target-tasks-method: screenshots
when: [{weekday: 'Monday', hour: 10, minute: 0}]
...@@ -92,9 +92,10 @@ class MenuScreenShotTest : ScreenshotTest() { ...@@ -92,9 +92,10 @@ class MenuScreenShotTest : ScreenshotTest() {
Screengrab.screenshot("SettingsSubMenuDefaultBrowserRobot_settings-default-browser") Screengrab.screenshot("SettingsSubMenuDefaultBrowserRobot_settings-default-browser")
mDevice.pressBack() mDevice.pressBack()
settingsTP() // Disabled for Pixel 2
Screengrab.screenshot("settings-enhanced-tp") // settingsTP()
mDevice.pressBack() // Screengrab.screenshot("settings-enhanced-tp")
// mDevice.pressBack()
loginsAndPassword() loginsAndPassword()
Screengrab.screenshot("SettingsSubMenuLoginsAndPasswords-settings-logins-passwords") Screengrab.screenshot("SettingsSubMenuLoginsAndPasswords-settings-logins-passwords")
# gcloud args match the official gcloud cli
# https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run
results-bucket: fenix_test_artifacts
record-video: true
# The maximum possible testing time is 30m on physical devices and 60m on virtual devices.
timeout: 20m
# will start test then close socket. no reports will be generated.
# to retrieve results later, use the "refresh" command
# reports will be generated from /results/matrix_ids.json
#async: true
# will start test then leave socket open. reports will be published
# to /results
# see: https://github.com/TestArmada/flank/issues/339
async: false
# results-history-name
# by default, set to app name
# declare results-history-name to create a separate dropdown menu in Firebase
# see: https://github.com/TestArmada/flank/issues/341
#results-history-name: tmp_parallel
# The number of times a test execution should be re-attempted if one or more failures occur.
# The maximum number of reruns allowed is 10. Default is 0, which implies no reruns.
num-flaky-test-attempts: 1
# test and app are the only required args
app: /app/path
test: /test/path
auto-google-login: true
use-orchestrator: true
clearPackageData: true
- /sdcard/screenshots
performance-metrics: true
- package org.mozilla.fenix.screenshots
- model: Pixel2
version: 28
# test shards - the amount of groups to split the test suite into
# set to -1 to use one shard per test.
max-test-shards: 1
# num-test-runs: the amount of times to run the tests.
# 1 runs the tests once. 10 runs all the tests 10x
num-test-runs: 1
...@@ -80,6 +80,8 @@ elif [[ "${device_type}" == "x86-start-test" ]]; then ...@@ -80,6 +80,8 @@ elif [[ "${device_type}" == "x86-start-test" ]]; then
flank_template="${PATH_TEST}/flank-x86-start-test.yml" flank_template="${PATH_TEST}/flank-x86-start-test.yml"
elif [[ "${device_type}" == "arm-start-test" ]]; then elif [[ "${device_type}" == "arm-start-test" ]]; then
flank_template="${PATH_TEST}/flank-armeabi-v7a-start-test.yml" flank_template="${PATH_TEST}/flank-armeabi-v7a-start-test.yml"
elif [[ "${device_type}" == "x86-screenshots-tests" ]]; then
else else
echo "FAILURE: flank config file not found!" echo "FAILURE: flank config file not found!"
exitcode=1 exitcode=1
...@@ -11,44 +11,56 @@ transforms: ...@@ -11,44 +11,56 @@ transforms:
job-defaults: job-defaults:
attributes: attributes:
build-type: debug
code-review: true code-review: true
retrigger: true retrigger: true
signing: signing-debug
signing-android-test: signing-android-test-debug
include-pull-request-number: true
- [wget, {artifact-reference: '<signing/public/build/x86/geckoNightly/target.apk>'}, '-O', app.apk]
- [wget, {artifact-reference: '<signing-android-test/public/build/noarch/geckoNightly/target.apk>'}, '-O', android-test.apk]
- name: project/mobile/fenix/firebase
key: firebaseToken
path: .firebase_token.json
json: true
using: run-commands
use-caches: false
kind: test
platform: 'ui-test/opt'
tier: 2
docker-image: {in-tree: ui-tests}
max-run-time: 7200
- name: public
path: /builds/worker/artifacts
type: directory
worker-type: b-android
jobs: jobs:
x86-debug: x86-debug:
build-type: debug
signing: signing-debug
signing-android-test: signing-android-test-debug
description: Test Fenix description: Test Fenix
include-pull-request-number: true
run-on-tasks-for: [github-pull-request, github-push] run-on-tasks-for: [github-pull-request, github-push]
run: run:
commands: commands:
- [wget, {artifact-reference: '<signing/public/build/x86/geckoNightly/target.apk>'}, '-O', app.apk]
- [wget, {artifact-reference: '<signing-android-test/public/build/noarch/geckoNightly/target.apk>'}, '-O', android-test.apk]
- [automation/taskcluster/androidTest/ui-test.sh, x86, app.apk, android-test.apk, '50'] - [automation/taskcluster/androidTest/ui-test.sh, x86, app.apk, android-test.apk, '50']
- name: project/mobile/fenix/firebase
key: firebaseToken
path: .firebase_token.json
json: true
using: run-commands
use-caches: false
treeherder: treeherder:
kind: test
platform: 'ui-test/opt'
symbol: debug(ui-test-x86) symbol: debug(ui-test-x86)
tier: 2 screenshots-x86:
worker: attributes:
docker-image: {in-tree: ui-tests} screenshots: true
max-run-time: 7200 description: Run UI screenshots tests to keep them up to date
env: run-on-tasks-for: []
GOOGLE_APPLICATION_CREDENTIALS: '.firebase_token.json' run:
GOOGLE_PROJECT: moz-fenix commands:
artifacts: - [automation/taskcluster/androidTest/ui-test.sh, x86-screenshots-tests, app.apk, android-test.apk, '-1']
- name: public treeherder:
path: /builds/worker/artifacts symbol: debug(screenshots-x86)
type: directory
worker-type: b-android
...@@ -73,3 +73,13 @@ def target_tasks_bump_android_components(full_task_graph, parameters, graph_conf ...@@ -73,3 +73,13 @@ def target_tasks_bump_android_components(full_task_graph, parameters, graph_conf
return task.attributes.get("bump-type", "") == "android-components" return task.attributes.get("bump-type", "") == "android-components"
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t, parameters)] return [l for l, t in full_task_graph.tasks.iteritems() if filter(t, parameters)]
def target_tasks_screnshots(full_task_graph, parameters, graph_config):
"""Select the set of tasks required to generate screenshots on a real device."""
def filter(task, parameters):
return task.attributes.get("screenshots", False)
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t, parameters)]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment