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 screenshot example #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
Binary file modified .DS_Store
Binary file not shown.
30 changes: 30 additions & 0 deletions .github/workflows/example-10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Espresso - Example 10

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '20 1 * * 0'

env:
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}}
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install saucectl
uses: saucelabs/saucectl-run-action@v1
with:
skip-run: true
testing-environment: ""
concurrency: 10

- name: Espresso - Example 10
run: saucectl run --config ./.sauce/runner-ex10.yml
2 changes: 1 addition & 1 deletion .github/workflows/example-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ jobs:
testing-environment: ""
concurrency: 10

- name: Espresso - Example 9
- name: Espresso - Example 8
run: saucectl run --config ./.sauce/runner-ex8.yml
2 changes: 1 addition & 1 deletion .github/workflows/example-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ jobs:
testing-environment: ""
concurrency: 10

- name: Espresso - Example 10
- name: Espresso - Example 9
run: saucectl run --config ./.sauce/runner-ex9.yml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**/reports/
**/junit-reports/
.idea
.DS_Store
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

115 changes: 0 additions & 115 deletions .idea/codeStyles/Project.xml

This file was deleted.

25 changes: 0 additions & 25 deletions .idea/jarRepositories.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/misc.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

8 changes: 6 additions & 2 deletions .sauce/runner-ex1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ sauce:
region: eu-central-1
# Controls how many suites are executed at the same time (sauce test env only).
concurrency: 10
metadata:
tags:
- example1
- allTests

espresso:
app: ./apps/my-demo-app-android.apk
testApp: ./apps/my-demo-app-android-tests.apk

suites:
- name: "Example 1 - All tests"
- name: 'Example 1 - All tests'
devices:
- name: "Samsung.*"
- name: 'Samsung.*'
options:
# Possible values [ANY,PHONE,TABLET]
deviceType: PHONE
Expand Down
37 changes: 37 additions & 0 deletions .sauce/runner-ex10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Example 8: Single execution on Android Emulators and Android Real Devices
# Run all tests on any available *single* device in my pool, this can be US/EU

apiVersion: v1alpha
kind: espresso
sauce:
# This can be `eu-central-1` or `us-west-1`
region: eu-central-1
# Controls how many suites are executed at the same time (sauce test env only).
concurrency: 10
metadata:
tags:
- example 10
- screenshots

espresso:
app: ./apps/my-demo-app-android.apk
testApp: ./apps/my-demo-app-android-tests.apk

suites:
- name: 'Example 10 - Take and store screenshots for RDC'
testOptions:
class:
- com.saucelabs.mydemoapp.android.view.activities.WebViewTest#withoutUrlTest
devices:
- name: 'Samsung.*'
options:
# Possible values [ANY,PHONE,TABLET]
deviceType: PHONE

# Controls what artifacts to fetch when the suite on Sauce Cloud has finished.
artifacts:
download:
when: always
match:
- junit.xml
directory: ./reports/
10 changes: 7 additions & 3 deletions .sauce/runner-ex2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,23 @@ sauce:
region: eu-central-1
# Controls how many suites are executed at the same time (sauce test env only).
concurrency: 10
metadata:
tags:
- example 2
- minimalConfig

espresso:
app: ./apps/my-demo-app-android.apk
testApp: ./apps/my-demo-app-android-tests.apk

suites:
- name: "Example 2: Min config for two tests - succesfulLoginTest and noUsernameLoginTest"
- name: 'Example 2: Min config for two tests - succesfulLoginTest and noUsernameLoginTest'
testOptions:
class:
class:
- com.saucelabs.mydemoapp.android.view.activities.LoginTest#succesfulLoginTest
- com.saucelabs.mydemoapp.android.view.activities.LoginTest#noUsernameLoginTest
devices:
- name: "Samsung.*"
- name: 'Samsung.*'
options:
# Possible values [ANY,PHONE,TABLET]
deviceType: PHONE
Expand Down
4 changes: 4 additions & 0 deletions .sauce/runner-ex3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ sauce:
region: eu-central-1
# Controls how many suites are executed at the same time (sauce test env only).
concurrency: 10
metadata:
tags:
- example3
- oneTestPerDevice

espresso:
app: ./apps/my-demo-app-android.apk
Expand Down
4 changes: 4 additions & 0 deletions .sauce/runner-ex4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ sauce:
region: eu-central-1
# Controls how many suites are executed at the same time (sauce test env only).
concurrency: 10
metadata:
tags:
- example4
- parallelWithStaticAllocation

espresso:
app: ./apps/my-demo-app-android.apk
Expand Down
4 changes: 4 additions & 0 deletions .sauce/runner-ex5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ sauce:
region: eu-central-1
# Controls how many suites are executed at the same time (sauce test env only).
concurrency: 10
metadata:
tags:
- example4
- parallelWithDynamicAllocation

espresso:
app: ./apps/my-demo-app-android.apk
Expand Down
4 changes: 4 additions & 0 deletions .sauce/runner-ex6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ sauce:
region: eu-central-1
# Controls how many suites are executed at the same time (sauce test env only).
concurrency: 10
metadata:
tags:
- example4
- parallelByPlatformVersion

espresso:
app: ./apps/my-demo-app-android.apk
Expand Down
4 changes: 4 additions & 0 deletions .sauce/runner-ex7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ sauce:
region: eu-central-1
# Controls how many suites are executed at the same time (sauce test env only).
concurrency: 10
metadata:
tags:
- example4
- byTestAnnotation

espresso:
app: ./apps/my-demo-app-android.apk
Expand Down
4 changes: 4 additions & 0 deletions .sauce/runner-ex8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ sauce:
region: eu-central-1
# Controls how many suites are executed at the same time (sauce test env only).
concurrency: 10
metadata:
tags:
- example4
- testOnRealAndEmulator

espresso:
app: ./apps/my-demo-app-android.apk
Expand Down
Loading