Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add basic gameloop IT for Android #1404

Merged
merged 2 commits into from
Dec 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions integration_tests/src/test/kotlin/integration/GameloopIT.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package integration

import FlankCommand
import com.google.common.truth.Truth
import org.junit.Test
import run

class GameloopIT {

private val name = this::class.java.simpleName

@Test
fun androidGameloop() {
val name = "$name-android"
val result = FlankCommand(
flankPath = FLANK_JAR_PATH,
ymlPath = "$CONFIGS_PATH/flank_android_gameloop_success.yml",
params = androidRunCommands
).run(
workingDirectory = "./",
testSuite = name
)

assertExitCode(result, 0)

val resOutput = result.output.removeUnicode()
Truth.assertThat(resOutput).containsMatch(findInCompare(name))
assertContainsOutcomeSummary(resOutput) {
success = 1
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
gcloud:
app: ../test_projects/android/gameloop/app-debug.apk
type: game-loop
obb-files:
- ../test_projects/android/gameloop/test.obb
obb-names:
- 'main.0300110.com.flank.gameloop.obb'
flank:
disable-sharding: true

Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
AndroidArgs
gcloud:
results-bucket: test-lab-[a-zA-Z0-9-]*
results-dir: [.a-zA-Z0-9_-]*
record-video: false
timeout: 15m
async: false
client-details:
network-profile: null
results-history-name: null
# Android gcloud
app: [0-9a-zA-Z\\\/_.:-]*[\\\/]test_projects[\\\/]android[\\\/]gameloop[\\\/]app-debug.apk
test: null
additional-apks:
auto-google-login: false
use-orchestrator: true
directories-to-pull:
grant-permissions: all
type: game-loop
other-files:
scenario-numbers:
scenario-labels:
obb-files:
obb-names:
performance-metrics: false
num-uniform-shards: null
test-runner-class: null
test-targets:
robo-directives:
robo-script: null
device:
- model: NexusLowRes
version: 28
locale: en
orientation: portrait
num-flaky-test-attempts: 0
test-targets-for-shard:
fail-fast: false
\s*
flank:
max-test-shards: 1
shard-time: -1
num-test-runs: 1
smart-flank-gcs-path:\s
smart-flank-disable-upload: false
default-test-time: 120.0
use-average-test-time-for-new-tests: false
files-to-download:
test-targets-always-run:
disable-sharding: true
project: flank-open-source
local-result-dir: results
full-junit-result: false
# Android Flank Yml
keep-file-path: false
additional-app-test-apks:
run-timeout: -1
legacy-junit-result: false
ignore-failed-tests: false
output-style: verbose
disable-results-upload: false
default-class-test-time: 240.0
\s*
RunTests
Uploading app-debug.apk \.*
0 test \/ 0 shard
\s*
1 matrix ids created in \d{1,2}m \d{1,2}s
https:\/\/console.developers.google.com\/storage\/browser\/test-lab-[a-zA-Z0-9-]*\/[.a-zA-Z0-9_-]*
\s*
Matrices webLink
matrix-[a-zA-Z0-9]* https:\/\/console.firebase.google.com\/project\/flank-open-source\/testlab\/histories\/[.a-zA-Z0-9_-]*\/matrices\/[.a-zA-Z0-9_-]*(\/executions\/[.a-zA-Z0-9_-]*)?
[\s\S]*
CostReport
Virtual devices
\$\d{1,2}.\d{1,2} for \d{1,2}m

Uploading CostReport.txt \.*
MatrixResultsReport
1 \/ 1 \(100\.00\%\)
[\s\S]*
Uploading MatrixResultsReport.txt \.*
Uploading JUnitReport.xml \.*
Uploading matrix_ids.json \.*
FetchArtifacts
\.*
Updating matrix file
\s*
Matrices webLink
matrix-[a-zA-Z0-9]* https:\/\/console.firebase.google.com\/project\/flank-open-source\/testlab\/histories\/[.a-zA-Z0-9_-]*\/matrices\/[.a-zA-Z0-9_-]*(\/executions\/[.a-zA-Z0-9_-]*)?