Skip to content

Instantly share code, notes, and snippets.

View AaronMT's full-sized avatar
πŸ‘Ύ
Hacking

Aaron Train AaronMT

πŸ‘Ύ
Hacking
View GitHub Profile
import androidx.test.espresso.IdlingResourceTimeoutException
import androidx.test.espresso.NoMatchingViewException
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.LargeTest
import androidx.test.uiautomator.UiObjectNotFoundException
import junit.framework.AssertionFailedError
import leakcanary.NoLeakAssertionFailedError
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@AaronMT
AaronMT / robo.json
Created December 12, 2024 15:36
Robo Script (Pre-Crawl launch w/Nimbus)
[
{
"crawlStage": "pre_crawl",
"actions": [
{
"eventType": "ADB_SHELL_COMMAND",
"command": "am start -n org.mozilla.fenix.debug/.App -a android.intent.action.MAIN -c android.intent.category.LAUNCHER --esn nimbus-cli --ei version 1 --ez reset-db true --es experiments \"{\\\"data\\\":[{\\\"schemaVersion\\\":\\\"1.12.0\\\",\\\"slug\\\":\\\"android-menutoolbar-nightly-rollout\\\",\\\"id\\\":\\\"android-menutoolbar-nightly-rollout\\\",\\\"arguments\\\":{},\\\"application\\\":\\\"org.mozilla.fenix\\\",\\\"appName\\\":\\\"fenix\\\",\\\"appId\\\":\\\"org.mozilla.fenix\\\",\\\"channel\\\":\\\"developer\\\",\\\"userFacingName\\\":\\\"Android Menu+Toolbar Nightly Rollout\\\",\\\"userFacingDescription\\\":\\\"Enable the new menu in Firefox Android Nightly.\\\",\\\"isEnrollmentPaused\\\":false,\\\"isRollout\\\":true,\\\"bucketConfig\\\":{\\\"randomizationUnit\\\":\\\"nimbus_id\\\",\\\"namespace\\\":\\\"fenix-menu-redesign-navigation-toolbar-nightl
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":x: *focus-ios SmokeTest - iPad Pro (12.9-inch) (6th generation) iOS 17.5*"
}
},
{
import os
import requests
GITHUB_TOKEN = os.environ.get('GITHUB_TOKEN')
REPO_OWNER = "mozilla-mobile"
REPO_NAME = "firefox-android"
AUTHOR = "github-actions[bot]"
headers = {
@AaronMT
AaronMT / test.py
Created October 31, 2023 18:06
Appium (GeckoDriver) + PyTest Example
import pytest
from appium import webdriver
from appium.options.gecko import GeckoOptions
def generate_options():
common_caps = {
'browserName': 'MozillaFirefox',
'platformName': 'mac',
}
@AaronMT
AaronMT / devices.txt
Created September 25, 2023 18:19
Firebase Test Lab (Android) [Sept, 2023]
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ MODEL_ID β”‚ MAKE β”‚ MODEL_NAME β”‚ FORM β”‚ RESOLUTION β”‚ OS_VERSION_IDS β”‚ TAGS β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1610 β”‚ Vivo β”‚ vivo 1610 β”‚ PHYSICAL β”‚ 1280 x 720 β”‚ 23 β”‚ reduced_stability=23 β”‚
β”‚ AmatiTvEmulator β”‚ Google β”‚ Google TV Amati β”‚ VIRTUAL β”‚ 1080 x 1920 β”‚ 29 β”‚ beta=29 β”‚
β”‚ AndroidTablet270dpi β”‚ Generic β”‚ Generic 720x1600 Android tablet @ 270dpi β”‚ VIRTUAL β”‚ 1600 x 720 β”‚ 30 β”‚ β”‚
β”‚ F01L β”‚ FUJITSU β”‚ F-01L
<?xml version='1.0' encoding='UTF-8' ?>
<testsuites>
<testsuite name="Pixel2-28-en-portrait" tests="0" failures="0" flakes="0" errors="0" skipped="0" time="0.000" timestamp="1970-01-01T00:00:00" hostname="localhost"/>
<testsuite name="Pixel2-28-en-portrait" tests="0" failures="0" flakes="0" errors="0" skipped="0" time="0.000" timestamp="1970-01-01T00:00:00" hostname="localhost"/>
<testsuite name="Pixel2-28-en-portrait" tests="0" failures="0" flakes="0" errors="0" skipped="0" time="0.000" timestamp="1970-01-01T00:00:00" hostname="localhost"/>
<testsuite name="Pixel2-28-en-portrait" tests="0" failures="0" flakes="0" errors="0" skipped="0" time="0.000" timestamp="1970-01-01T00:00:00" hostname="localhost"/>
<testsuite name="Pixel2-28-en-portrait" tests="0" failures="0" flakes="0" errors="0" skipped="0" time="0.000" timestamp="1970-01-01T00:00:00" hostname="localhost"/>
<testsuite name="Pixel2-28-en-portrait" tests="0" failures="0" flakes="0" errors="0" skipped="0" time="0.000" timestamp="1970-01-01T00
{
"matrix-0": {
"app": "/builds/worker/checkouts/src/app.apk",
"test": "/builds/worker/checkouts/src/android-test.apk",
"shards": {
"shard-0": [
"class org.mozilla.fenix.ui.TopSitesTest#verifyRenameTopSite"
],
"shard-1": [
"class org.mozilla.fenix.ui.TopSitesTest#verifyRemoveTopSite"
{
"dataset_results": [
{
"push_id": 934885,
"task_id": "XqEbtJW-SrOEXKcgIuFixg",
"duration": "16",
"author": "@noreply.mozilla.org",
"result": "success",
"task_html_url": "https://firefox-ci-tc.services.mozilla.com/tasks/XqEbtJW-SrOEXKcgIuFixg",
"last_modified": "2021-07-17T00:56:39.933459",
@AaronMT
AaronMT / gist:62c77895e2e86c0975afe0bc15c1c94d
Created February 25, 2021 16:37
Setting a specific Python3 default on Ubuntu
List available python options
```
ls -larth `which python`*
lrwxrwxrwx 1 root root 10 Mar 23 2016 /usr/bin/python3m -> python3.5m
lrwxrwxrwx 1 root root 9 Mar 23 2016 /usr/bin/python3 -> python3.5
lrwxrwxrwx 1 root root 9 Nov 24 2017 /usr/bin/python2 -> python2.7
lrwxrwxrwx 1 root root 9 Nov 24 2017 /usr/bin/python -> python2.7
-rwxr-xr-x 2 root root 4.3M Nov 28 2017 /usr/bin/python3.5m
-rwxr-xr-x 2 root root 4.3M Nov 28 2017 /usr/bin/python3.5