Skip to content

Instantly share code, notes, and snippets.

View AaronMT's full-sized avatar
👾
Hacking

Aaron Train AaronMT

👾
Hacking
View GitHub Profile
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",
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
import time
import sys
import time
devices = os.popen('adb devices').read().strip().split('\n')[1:]
device1 = MonkeyRunner.waitForConnection( devices[0].split('\t')[0])
package = 'com.android.browser'
@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
E InstrumentationResultPrinter: Failed to mark test No Tests as finished after process crash
03-07 08:53:53.855 20122 20122 E MonitoringInstr: Exception encountered by: Thread[main,5,main]. Dumping thread state to outputs and pining for the fjords.
03-07 08:53:53.855 20122 20122 E MonitoringInstr: java.lang.RuntimeException: Exception thrown in onCreate() of ComponentInfo{org.mozilla.tv.firefox.debug.test/org.mozilla.tv.firefox.FirefoxTestRunner}: java.lang.RuntimeException: Cannot connect to androidx.test.orchestrator.OrchestratorService
03-07 08:53:53.855 20122 20122 E MonitoringInstr: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5463)
03-07 08:53:53.855 20122 20122 E MonitoringInstr: at android.app.ActivityThread.-wrap2(ActivityThread.java)
03-07 08:53:53.855 20122 20122 E MonitoringInstr: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1556)
03-07 08:53:53.855 20122 20122 E MonitoringInstr: at android.os.Handler.dispatchMessage(Handler.java:102)
03-07 08:53
% carthage bootstrap --platform iOS --no-use-binaries --cache-builds
Please update to the latest Carthage version: 0.36.0. You currently are on 0.34.0
*** Checking out lottie-ios at "477959517babbeb46e69a6e94ae1c666af559e96"
*** Checking out Nimble at "v8.0.4"
*** Checking out RxSwift at "9b31a15520306b073cb9d46456f64826c1d6dcab"
*** Checking out Quick at "v2.2.0"
*** Cloning RxSwift
*** Cloning lottie-ios
*** Cloning Quick
*** Cloning Nimble