Skip to content

Instantly share code, notes, and snippets.

View martinschneider's full-sized avatar
🇹🇼

Martin Schneider martinschneider

🇹🇼
View GitHub Profile
@martinschneider
martinschneider / getAppVersion.sh
Created September 28, 2018 08:03
Bash script to extract version information from APK and IPA files
#/bin/bash
#
# Extract the app version number from an APK/IPA file (on Linux)
#
# Required tools: aapt, plistutil, xmllint
#
# Usage:
# ------
# getAppVersion.sh android pathToApk
# getAppVersion.sh ios pathToIpa AppName.app
package io.github.martinschneider.justtestlah.awsdevicefarm;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.devicefarm.AWSDeviceFarm;
import com.amazonaws.services.devicefarm.AWSDeviceFarmClient;
import com.amazonaws.services.devicefarm.AWSDeviceFarmClientBuilder;
import com.amazonaws.services.devicefarm.model.AWSDeviceFarmException;
import com.amazonaws.services.devicefarm.model.CreateUploadRequest;
import com.amazonaws.services.devicefarm.model.GetUploadRequest;
package io.github.martinschneider.justtestlah.awsdevicefarm;
import com.amazonaws.services.devicefarm.model.AWSDeviceFarmException;
import com.amazonaws.services.devicefarm.model.DeviceFilter;
import com.amazonaws.services.devicefarm.model.DeviceSelectionConfiguration;
import com.amazonaws.services.devicefarm.model.GetRunRequest;
import com.amazonaws.services.devicefarm.model.Run;
import com.amazonaws.services.devicefarm.model.ScheduleRunRequest;
import com.amazonaws.services.devicefarm.model.ScheduleRunResult;
import com.amazonaws.services.devicefarm.model.ScheduleRunTest;
version: 0.1
phases:
install:
commands:
# AWS still only supports Java 8, so we install Java 12 ourselves
# https://forums.aws.amazon.com/thread.jspa?threadID=299604
- wget -q https://download.java.net/java/GA/jdk12/GPL/openjdk-12_linux-x64_bin.tar.gz
- tar -xzf openjdk-12_linux-x64_bin.tar.gz
- export JAVA_HOME=$(pwd)/jdk-12
- echo "I2p1c3R0ZXN0bGFoIHByb3BlcnRpZXMKI1N1biBNYXkgMDUgMDk6MTY6MTggU0dUIDIwMTkKZmVhdHVyZXMuZGlyZWN0b3J5PXNyYy90ZXN0L3Jlc291cmNlcy9mZWF0dXJlcy9zdGFja292ZXJmbG93CnBsYXRmb3JtPWFuZHJvaWQKb3BlbmN2Lm1vZGU9c2VydmVyCmN1Y3VtYmVyLnJlcG9ydC5kaXJlY3Rvcnk9dGFyZ2V0L3JlcG9ydC9jdWN1bWJlcgpwYWdlcy5wYWNrYWdlPWlvLmdpdGh1Yi5tYXJ0aW5zY2huZWlkZXIuanVzdHRlc3RsYWguZXhhbXBsZXMuc3RhY2tvdmVyZmxvdy5wYWdlcwp0YWdzPW5vdCBAb3BlbmN2CnN0ZXBzLnBhY2thZ2U9aW8uZ2l0aHViLm1hcnRpbnNjaG5laWRlci5qdXN0dGVzdGxhaC5leGFtcGxlcy5zdGFja292ZXJmbG93LnN0ZXBzCmFuZHJvaWQuYXBwQWN0aXZpdHk9Y29tLnN0YWNrZXhjaGFuZ2Uuc3RhY2tvdmVyZmxvdy5NYWluQWN0aXZpdHkKYW5kcm9pZC5hcHBQYWNrYWdlPWNvbS5zdGFja2V4Y2hhbmdlLnN0YWNrb3ZlcmZsb3cKbW9iaWxlLmFwcGl1bVVybD1odHRwXDovLzEyNy4wLjAuMVw6NDcyMy93ZC9odWIK" | base64 --decode > justtestlah.properties
- java -Djusttestlah.properties=$(pwd)/justtestlah.properties -Dlogback.configurationFile=classes/logback-aws.xml -cp classes:dependency-jars/* org.junit.runner.JUnitCore TestRunner
platform=android
tags=@regression and @stable and not @skip
platform=ios
tags=@regression and @unstable and @skip
phases:
install:
commands:
# AWS still only supports Java 8, so we install Java 12 ourselves
# https://forums.aws.amazon.com/thread.jspa?threadID=299604
- wget -q https://download.java.net/java/GA/jdk12/GPL/openjdk-12_linux-x64_bin.tar.gz
- tar -xzf openjdk-12_linux-x64_bin.tar.gz
- export JAVA_HOME=$(pwd)/jdk-12
- export PATH=$(pwd)/jdk-12/bin:$PATH
- which java
mvn -pl justtestlah-demos test -Dtest=TestRunner -Djusttestlah.properties=/demos/stackoverflow_aws.properties