From b421ec9d9d509cd3e2b123f9b91dfbe24849ab91 Mon Sep 17 00:00:00 2001 From: bstack-security-github <116066275+bstack-security-github@users.noreply.github.com> Date: Wed, 21 Jun 2023 17:24:10 +0530 Subject: [PATCH 01/19] Adding Code Scanner Semgrep.yml workflow file --- .github/workflows/Semgrep.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/Semgrep.yml diff --git a/.github/workflows/Semgrep.yml b/.github/workflows/Semgrep.yml new file mode 100644 index 0000000..0347afd --- /dev/null +++ b/.github/workflows/Semgrep.yml @@ -0,0 +1,48 @@ +# Name of this GitHub Actions workflow. +name: Semgrep + +on: + # Scan changed files in PRs (diff-aware scanning): + # The branches below must be a subset of the branches above + pull_request: + branches: ["master", "main"] + push: + branches: ["master", "main"] + schedule: + - cron: '0 6 * * *' + + +permissions: + contents: read + +jobs: + semgrep: + # User definable name of this GitHub Actions job. + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + name: semgrep/ci + # If you are self-hosting, change the following `runs-on` value: + runs-on: ubuntu-latest + + container: + # A Docker image with Semgrep installed. Do not change this. + image: returntocorp/semgrep + + # Skip any PR created by dependabot to avoid permission issues: + if: (github.actor != 'dependabot[bot]') + + steps: + # Fetch project source with GitHub Actions Checkout. + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + # Run the "semgrep ci" command on the command line of the docker image. + - run: semgrep ci --sarif --output=semgrep.sarif + env: + # Add the rules that Semgrep uses by setting the SEMGREP_RULES environment variable. + SEMGREP_RULES: p/default # more at semgrep.dev/explore + + - name: Upload SARIF file for GitHub Advanced Security Dashboard + uses: github/codeql-action/upload-sarif@6c089f53dd51dc3fc7e599c3cb5356453a52ca9e # v2.20.0 + with: + sarif_file: semgrep.sarif + if: always() \ No newline at end of file From 1e328a9f2a9c60ae2c898c39638d2157480dd27c Mon Sep 17 00:00:00 2001 From: bstack-security-github <116066275+bstack-security-github@users.noreply.github.com> Date: Mon, 3 Jul 2023 20:05:07 +0530 Subject: [PATCH 02/19] Adding CODEOWNERS file --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..ed09dd5 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @browserstack/app-automate-public-repos From beddc2b41a00d3c15f0696f56e4223886c64fa22 Mon Sep 17 00:00:00 2001 From: Kamalpreet Kaur Date: Mon, 14 Aug 2023 19:03:09 +0530 Subject: [PATCH 03/19] add: maven workflow dispatch --- .github/workflows/sanity-workflow.yml | 120 ++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 .github/workflows/sanity-workflow.yml diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml new file mode 100644 index 0000000..38c7533 --- /dev/null +++ b/.github/workflows/sanity-workflow.yml @@ -0,0 +1,120 @@ +# This job is to test different maven profiles in sdk branch against full commit-id provided +# This workflow targets Java with Maven execution + +name: Java SDK Test workflow for Maven on workflow_dispatch + +on: + workflow_dispatch: + inputs: + commit_sha: + description: 'The full commit id to build' + required: true + +jobs: + comment-run: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + max-parallel: 3 + matrix: + java: [ '8', '11', '17' ] + os: [ 'macos-latest', 'windows-latest', 'ubuntu-latest' ] + name: JUnit Appium Repo ${{ matrix.Java }} - ${{ matrix.os }} Sample + env: + BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} + BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} + + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.inputs.commit_sha }} + - uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 + id: status-check-in-progress + env: + job_name: JUnit Appium Repo ${{ matrix.Java }} - ${{ matrix.os }} Sample + commit_sha: ${{ github.event.inputs.commit_sha }} + with: + github-token: ${{ github.token }} + script: | + const result = await github.rest.checks.create({ + owner: context.repo.owner, + repo: context.repo.repo, + name: process.env.job_name, + head_sha: process.env.commit_sha, + status: 'in_progress' + }).catch((err) => ({status: err.status, response: err.response})); + console.log(`The status-check response : ${result.status} Response : ${JSON.stringify(result.response)}`) + if (result.status !== 201) { + console.log('Failed to create check run') + } + - name: Set up Java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - name: Run mvn test for junit4 android + run: | + cd android/junit4-examples + mvn compile + mvn test + mvn test -P sample-test + - name: Run mvn test for junit5 android + run: | + cd android/junit5-examples + mvn compile + mvn test + mvn test -P sample-test + - name: Run mvn profile sample-local-test for junit4 android + run: | + cd android/junit4-examples + mvn compile + mvn test -P sample-local-test -Dbrowserstack.app="./LocalSample.apk" + - name: Run mvn profile sample-local-test for junit5 android + run: | + cd android/junit5-examples + mvn compile + mvn test -P sample-local-test -Dbrowserstack.app="./LocalSample.apk" + - name: Run mvn test for junit4 ios + run: | + cd ios/junit4-examples + mvn compile + mvn test + mvn test -P sample-test + - name: Run mvn test for junit5 ios + run: | + cd ios/junit5-examples + mvn compile + mvn test + mvn test -P sample-test + - name: Run mvn profile sample-local-test for junit4 ios + run: | + cd ios/junit4-examples + mvn compile + mvn test -P sample-local-test -Dbrowserstack.app="./LocalSample.ipa" + - name: Run mvn profile sample-local-test for junit5 ios + run: | + cd ios/junit5-examples + mvn compile + mvn test -P sample-local-test -Dbrowserstack.app="./LocalSample.ipa" + - if: always() + uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 + id: status-check-completed + env: + conclusion: ${{ job.status }} + job_name: TestNG Appium Repo ${{ matrix.Java }} - ${{ matrix.os }} Sample + commit_sha: ${{ github.event.inputs.commit_sha }} + with: + github-token: ${{ github.token }} + script: | + const result = await github.rest.checks.create({ + owner: context.repo.owner, + repo: context.repo.repo, + name: process.env.job_name, + head_sha: process.env.commit_sha, + status: 'completed', + conclusion: process.env.conclusion + }).catch((err) => ({status: err.status, response: err.response})); + console.log(`The status-check response : ${result.status} Response : ${JSON.stringify(result.response)}`) + if (result.status !== 201) { + console.log('Failed to create check run') + } From bb6d5fd7a0429827360a928eb9070f865c635011 Mon Sep 17 00:00:00 2001 From: Kamalpreet Kaur Date: Mon, 14 Aug 2023 19:26:44 +0530 Subject: [PATCH 04/19] chore: cli arg app key --- .github/workflows/sanity-workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 38c7533..9019f7d 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -68,12 +68,12 @@ jobs: run: | cd android/junit4-examples mvn compile - mvn test -P sample-local-test -Dbrowserstack.app="./LocalSample.apk" + mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.apk" - name: Run mvn profile sample-local-test for junit5 android run: | cd android/junit5-examples mvn compile - mvn test -P sample-local-test -Dbrowserstack.app="./LocalSample.apk" + mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.apk" - name: Run mvn test for junit4 ios run: | cd ios/junit4-examples @@ -90,12 +90,12 @@ jobs: run: | cd ios/junit4-examples mvn compile - mvn test -P sample-local-test -Dbrowserstack.app="./LocalSample.ipa" + mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.ipa" - name: Run mvn profile sample-local-test for junit5 ios run: | cd ios/junit5-examples mvn compile - mvn test -P sample-local-test -Dbrowserstack.app="./LocalSample.ipa" + mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.ipa" - if: always() uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 id: status-check-completed From 07eebf306282cb328851765d8b18b9c73fe5aa39 Mon Sep 17 00:00:00 2001 From: Kamalpreet Kaur Date: Mon, 14 Aug 2023 21:51:51 +0530 Subject: [PATCH 05/19] chore: change directory command --- .github/workflows/sanity-workflow.yml | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 9019f7d..33e6c9f 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -54,46 +54,46 @@ jobs: java-version: ${{ matrix.java }} - name: Run mvn test for junit4 android run: | - cd android/junit4-examples - mvn compile - mvn test - mvn test -P sample-test - - name: Run mvn test for junit5 android - run: | - cd android/junit5-examples + cd junit4-examples/android mvn compile mvn test mvn test -P sample-test - name: Run mvn profile sample-local-test for junit4 android run: | - cd android/junit4-examples - mvn compile - mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.apk" - - name: Run mvn profile sample-local-test for junit5 android - run: | - cd android/junit5-examples + cd junit4-examples/android mvn compile mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.apk" - name: Run mvn test for junit4 ios run: | - cd ios/junit4-examples + cd junit4-examples/ios mvn compile mvn test mvn test -P sample-test - - name: Run mvn test for junit5 ios + - name: Run mvn profile sample-local-test for junit4 ios + run: | + cd junit4-examples/ios + mvn compile + mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.ipa" + - name: Run mvn test for junit5 android run: | - cd ios/junit5-examples + cd junit5-examples/android mvn compile mvn test mvn test -P sample-test - - name: Run mvn profile sample-local-test for junit4 ios + - name: Run mvn profile sample-local-test for junit5 android run: | - cd ios/junit4-examples + cd junit5-examples/android mvn compile - mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.ipa" + mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.apk" + - name: Run mvn test for junit5 ios + run: | + cd junit5-examples/ios + mvn compile + mvn test + mvn test -P sample-test - name: Run mvn profile sample-local-test for junit5 ios run: | - cd ios/junit5-examples + cd junit5-examples/ios mvn compile mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.ipa" - if: always() From 113b04e31e8dce7edd9b38f47b3331d966526bd8 Mon Sep 17 00:00:00 2001 From: Kamalpreet Kaur Date: Mon, 14 Aug 2023 22:07:40 +0530 Subject: [PATCH 06/19] chore: change directory name --- .github/workflows/sanity-workflow.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 33e6c9f..58531f5 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -54,46 +54,46 @@ jobs: java-version: ${{ matrix.java }} - name: Run mvn test for junit4 android run: | - cd junit4-examples/android + cd junit-4/android mvn compile mvn test mvn test -P sample-test - name: Run mvn profile sample-local-test for junit4 android run: | - cd junit4-examples/android + cd junit-4/android mvn compile mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.apk" - name: Run mvn test for junit4 ios run: | - cd junit4-examples/ios + cd junit-4/ios mvn compile mvn test mvn test -P sample-test - name: Run mvn profile sample-local-test for junit4 ios run: | - cd junit4-examples/ios + cd junit-4/ios mvn compile mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.ipa" - name: Run mvn test for junit5 android run: | - cd junit5-examples/android + cd junit-5/android mvn compile mvn test mvn test -P sample-test - name: Run mvn profile sample-local-test for junit5 android run: | - cd junit5-examples/android + cd junit-5/android mvn compile mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.apk" - name: Run mvn test for junit5 ios run: | - cd junit5-examples/ios + cd junit-5/ios mvn compile mvn test mvn test -P sample-test - name: Run mvn profile sample-local-test for junit5 ios run: | - cd junit5-examples/ios + cd junit-5/ios mvn compile mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.ipa" - if: always() @@ -101,7 +101,7 @@ jobs: id: status-check-completed env: conclusion: ${{ job.status }} - job_name: TestNG Appium Repo ${{ matrix.Java }} - ${{ matrix.os }} Sample + job_name: JUnit Appium Repo ${{ matrix.Java }} - ${{ matrix.os }} Sample commit_sha: ${{ github.event.inputs.commit_sha }} with: github-token: ${{ github.token }} From 8233f845afb8575fd49c7790b965d4df945c4186 Mon Sep 17 00:00:00 2001 From: Kamalpreet Kaur Date: Mon, 14 Aug 2023 22:31:18 +0530 Subject: [PATCH 07/19] chore: remove mvn test --- .github/workflows/sanity-workflow.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 58531f5..f4a83ef 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -56,7 +56,6 @@ jobs: run: | cd junit-4/android mvn compile - mvn test mvn test -P sample-test - name: Run mvn profile sample-local-test for junit4 android run: | @@ -67,7 +66,6 @@ jobs: run: | cd junit-4/ios mvn compile - mvn test mvn test -P sample-test - name: Run mvn profile sample-local-test for junit4 ios run: | @@ -78,7 +76,6 @@ jobs: run: | cd junit-5/android mvn compile - mvn test mvn test -P sample-test - name: Run mvn profile sample-local-test for junit5 android run: | @@ -89,7 +86,6 @@ jobs: run: | cd junit-5/ios mvn compile - mvn test mvn test -P sample-test - name: Run mvn profile sample-local-test for junit5 ios run: | From 6788990bf8d0b6c68d350a91305c82a344e35dd3 Mon Sep 17 00:00:00 2001 From: Hrithik Katiyar Date: Mon, 1 Jul 2024 16:14:20 +0530 Subject: [PATCH 08/19] Fixed linting issue --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 04716af..aa54fcf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,5 @@ target/ local.log .idea -*.iml */*/logs +*.iml From 16d644839a18fb3c31110c8f0b6695193133a99c Mon Sep 17 00:00:00 2001 From: rahulpsq <81632139+rahulpsq@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:28:00 +0530 Subject: [PATCH 09/19] Update browserstack.yml --- junit-5/ios/browserstack.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/junit-5/ios/browserstack.yml b/junit-5/ios/browserstack.yml index f0f47e0..13bc751 100644 --- a/junit-5/ios/browserstack.yml +++ b/junit-5/ios/browserstack.yml @@ -42,8 +42,8 @@ platforms: - deviceName: iPhone 13 Pro platformVersion: 15 platformName: ios - - deviceName: iPhone XS - platformVersion: 14 + - deviceName: iPhone 12 Pro + platformVersion: 17 platformName: ios # ======================= From d047ca4a665d12f00b5f6de42916171eab2e6be4 Mon Sep 17 00:00:00 2001 From: rahulpsq <81632139+rahulpsq@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:29:11 +0530 Subject: [PATCH 10/19] Update browserstack.yml --- junit-4/ios/browserstack.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/junit-4/ios/browserstack.yml b/junit-4/ios/browserstack.yml index 6dc64a4..bb79c34 100644 --- a/junit-4/ios/browserstack.yml +++ b/junit-4/ios/browserstack.yml @@ -42,8 +42,8 @@ platforms: - deviceName: iPhone 13 Pro platformVersion: 15 platformName: ios - - deviceName: iPhone XS - platformVersion: 14 + - deviceName: iPhone 12 Pro + platformVersion: 17 platformName: ios # ======================= From 8d6d92ea010cc1827234bbd1ea5a9dc7de8e3fda Mon Sep 17 00:00:00 2001 From: rahulpsq <81632139+rahulpsq@users.noreply.github.com> Date: Mon, 6 Jan 2025 21:00:17 +0530 Subject: [PATCH 11/19] Update browserstack.yml --- junit-4/ios/browserstack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/junit-4/ios/browserstack.yml b/junit-4/ios/browserstack.yml index bb79c34..5a22aa2 100644 --- a/junit-4/ios/browserstack.yml +++ b/junit-4/ios/browserstack.yml @@ -42,7 +42,7 @@ platforms: - deviceName: iPhone 13 Pro platformVersion: 15 platformName: ios - - deviceName: iPhone 12 Pro + - deviceName: iPhone 12 platformVersion: 17 platformName: ios From 0ee838643b07d14b86ce7dcedbf121df26b5dfe1 Mon Sep 17 00:00:00 2001 From: rhisav-25 Date: Wed, 26 Mar 2025 15:02:09 +0000 Subject: [PATCH 12/19] Added Gradle config support for JUnit 4 & 5 --- .github/workflows/sanity-workflow.yml | 32 +++++++++++++++++ .gitignore | 6 ++++ README.md | 14 ++++++-- junit-4/android/build.gradle | 50 ++++++++++++++++++++++++++ junit-4/android/settings.gradle | 15 ++++++++ junit-4/ios/build.gradle | 50 ++++++++++++++++++++++++++ junit-4/ios/settings.gradle | 15 ++++++++ junit-5/android/build.gradle | 51 +++++++++++++++++++++++++++ junit-5/android/settings.gradle | 15 ++++++++ junit-5/ios/build.gradle | 51 +++++++++++++++++++++++++++ junit-5/ios/settings.gradle | 15 ++++++++ 11 files changed, 311 insertions(+), 3 deletions(-) create mode 100644 junit-4/android/build.gradle create mode 100644 junit-4/android/settings.gradle create mode 100644 junit-4/ios/build.gradle create mode 100644 junit-4/ios/settings.gradle create mode 100644 junit-5/android/build.gradle create mode 100644 junit-5/android/settings.gradle create mode 100644 junit-5/ios/build.gradle create mode 100644 junit-5/ios/settings.gradle diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index f4a83ef..352b08d 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -72,6 +72,22 @@ jobs: cd junit-4/ios mvn compile mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.ipa" + - name: Run gradle test for junit4 android + run: | + cd junit-4/android + gradle clean sampleTest + - name: Run gradle sample-local-test for junit4 android + run: | + cd junit-4/android + gradle clean sampleLocalTest -D"browserstack.app"="./LocalSample.apk" + - name: Run gradle test for junit4 ios + run: | + cd junit-4/ios + gradle clean sampleTest + - name: Run gradle sample-local-test for junit4 ios + run: | + cd junit-4/ios + gradle clean sampleLocalTest -D"browserstack.app"="./LocalSample.ipa" - name: Run mvn test for junit5 android run: | cd junit-5/android @@ -92,6 +108,22 @@ jobs: cd junit-5/ios mvn compile mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.ipa" + - name: Run gradle test for junit5 android + run: | + cd junit-5/android + gradle clean sampleTest + - name: Run gradle sample-local-test for junit4 android + run: | + cd junit-5/android + gradle clean sampleLocalTest -D"browserstack.app"="./LocalSample.apk" + - name: Run gradle test for junit4 ios + run: | + cd junit-5/ios + gradle clean sampleTest + - name: Run gradle sample-local-test for junit4 ios + run: | + cd junit-5/ios + gradle clean sampleLocalTest -D"browserstack.app"="./LocalSample.ipa" - if: always() uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 id: status-check-completed diff --git a/.gitignore b/.gitignore index aa54fcf..a6c60e4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,9 @@ local.log .idea */*/logs *.iml +bstack_* +gradlew* +gradle +.gradle +build +reports diff --git a/README.md b/README.md index dceeda1..1a8c947 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,10 @@ These code samples are currently based on: - If Maven is not downloaded, download it from [here](https://maven.apache.org/download.cgi) - For installation, follow the instructions [here](https://maven.apache.org/install.html) + 3. Gradle + - If Gradle is not downloaded, download it from [here](https://gradle.org/releases/) + - For installation, follow the instructions [here](https://gradle.org/install/) + ### Install the dependencies To install the dependencies for JUnit4 tests, run : @@ -69,11 +73,13 @@ Getting Started with Appium tests in Junit4 and Junit5 on BrowserStack couldn't - Junit4 - Update `browserstack.yml` file at root level of [Android Junit4 examples](junit-4/android) or [iOS Junit4 examples](junit-4/ios) with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings) - - Run `mvn test -P sample-test` + - Run `mvn test -P sample-test` to run in maven enviroment. + - Run `gradle clean sampleTest` to run in gradle enviroment. - Junit5 - Update `browserstack.yml` file at root level of [Android Junit5 examples](junit-5/android) or [iOS Junit5 examples](junit-5/ios) with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings) - Run `mvn test -P sample-test` + - Run `gradle clean sampleTest` to run in gradle enviroment. ### **Use Local testing for apps that access resources hosted in development or testing environments :** @@ -83,7 +89,8 @@ Getting Started with Appium tests in Junit4 and Junit5 on BrowserStack couldn't ``` browserstackLocal: true ``` - - Run `mvn test -P sample-local-test` + - Run `mvn test -P sample-local-test` to run in maven enviroment. + - Run `gradle clean sampleLocalTest` to run in gradle enviroment. - Junit5 - Update `browserstack.yml` file at root level of Android Junit5 examples or iOS Junit5 examples with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings) @@ -91,7 +98,8 @@ Getting Started with Appium tests in Junit4 and Junit5 on BrowserStack couldn't ``` browserstackLocal: true ``` - - Run `mvn test -P sample-local-test` + - Run `mvn test -P sample-local-test` to run in maven enviroment. + - Run `gradle clean sampleLocalTest` to run in gradle enviroment. **Note**: If you are facing any issues, refer [Getting Help section](#Getting-Help) diff --git a/junit-4/android/build.gradle b/junit-4/android/build.gradle new file mode 100644 index 0000000..71eb450 --- /dev/null +++ b/junit-4/android/build.gradle @@ -0,0 +1,50 @@ +plugins { + id 'java' + id 'com.browserstack.gradle-sdk' version "1.1.2" +} + +repositories { mavenCentral() } + +dependencies { + testImplementation 'junit:junit:4.13.2' + implementation 'commons-io:commons-io:2.11.0' + implementation 'org.seleniumhq.selenium:selenium-java:4.4.0' + implementation 'io.appium:java-client:8.1.1' + implementation 'com.googlecode.json-simple:json-simple:1.1.1' + implementation 'com.browserstack:browserstack-java-sdk:latest.release' +} + +group = 'com.browserstack' +version = '1.0-SNAPSHOT' +description = 'junit-browserstack' +sourceCompatibility = '1.8' + +def browserstackSDKArtifact = configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts.find { it.name == 'browserstack-java-sdk' } + +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} + +tasks.withType(Test) { + systemProperties = System.properties + jvmArgs += "-javaagent:${browserstackSDKArtifact.file}" +} + +task sampleTest(type: Test) { + dependsOn cleanTest + useJUnit() + + include 'com/browserstack/FirstTest*' + + jvmArgs "-javaagent:${configurations.testRuntimeClasspath.find { it.name.contains('browserstack-java-sdk') }}" +} + + +task sampleLocalTest(type: Test) { + dependsOn cleanTest + useJUnit() + + include 'com/browserstack/LocalTest*' + + jvmArgs "-javaagent:${configurations.testRuntimeClasspath.find { it.name.contains('browserstack-java-sdk') }}" +} \ No newline at end of file diff --git a/junit-4/android/settings.gradle b/junit-4/android/settings.gradle new file mode 100644 index 0000000..bd31be8 --- /dev/null +++ b/junit-4/android/settings.gradle @@ -0,0 +1,15 @@ +pluginManagement { + repositories { + mavenCentral() + mavenLocal() + gradlePluginPortal() + } + + resolutionStrategy { + eachPlugin { + if (requested.id.id == "com.browserstack.gradle-sdk") { + useModule("com.browserstack:gradle-sdk:1.1.2") + } + } + } +} \ No newline at end of file diff --git a/junit-4/ios/build.gradle b/junit-4/ios/build.gradle new file mode 100644 index 0000000..71eb450 --- /dev/null +++ b/junit-4/ios/build.gradle @@ -0,0 +1,50 @@ +plugins { + id 'java' + id 'com.browserstack.gradle-sdk' version "1.1.2" +} + +repositories { mavenCentral() } + +dependencies { + testImplementation 'junit:junit:4.13.2' + implementation 'commons-io:commons-io:2.11.0' + implementation 'org.seleniumhq.selenium:selenium-java:4.4.0' + implementation 'io.appium:java-client:8.1.1' + implementation 'com.googlecode.json-simple:json-simple:1.1.1' + implementation 'com.browserstack:browserstack-java-sdk:latest.release' +} + +group = 'com.browserstack' +version = '1.0-SNAPSHOT' +description = 'junit-browserstack' +sourceCompatibility = '1.8' + +def browserstackSDKArtifact = configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts.find { it.name == 'browserstack-java-sdk' } + +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} + +tasks.withType(Test) { + systemProperties = System.properties + jvmArgs += "-javaagent:${browserstackSDKArtifact.file}" +} + +task sampleTest(type: Test) { + dependsOn cleanTest + useJUnit() + + include 'com/browserstack/FirstTest*' + + jvmArgs "-javaagent:${configurations.testRuntimeClasspath.find { it.name.contains('browserstack-java-sdk') }}" +} + + +task sampleLocalTest(type: Test) { + dependsOn cleanTest + useJUnit() + + include 'com/browserstack/LocalTest*' + + jvmArgs "-javaagent:${configurations.testRuntimeClasspath.find { it.name.contains('browserstack-java-sdk') }}" +} \ No newline at end of file diff --git a/junit-4/ios/settings.gradle b/junit-4/ios/settings.gradle new file mode 100644 index 0000000..bd31be8 --- /dev/null +++ b/junit-4/ios/settings.gradle @@ -0,0 +1,15 @@ +pluginManagement { + repositories { + mavenCentral() + mavenLocal() + gradlePluginPortal() + } + + resolutionStrategy { + eachPlugin { + if (requested.id.id == "com.browserstack.gradle-sdk") { + useModule("com.browserstack:gradle-sdk:1.1.2") + } + } + } +} \ No newline at end of file diff --git a/junit-5/android/build.gradle b/junit-5/android/build.gradle new file mode 100644 index 0000000..5db9cbd --- /dev/null +++ b/junit-5/android/build.gradle @@ -0,0 +1,51 @@ +plugins { + id 'java' + id 'com.browserstack.gradle-sdk' version "1.1.2" +} + +repositories { mavenCentral() } + +dependencies { + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0' + implementation 'commons-io:commons-io:2.11.0' + implementation 'org.seleniumhq.selenium:selenium-java:4.4.0' + implementation 'io.appium:java-client:8.1.1' + implementation 'com.googlecode.json-simple:json-simple:1.1.1' + implementation 'com.browserstack:browserstack-java-sdk:latest.release' +} + +group = 'com.browserstack' +version = '1.0-SNAPSHOT' +description = 'junit-browserstack' +sourceCompatibility = '1.8' + +def browserstackSDKArtifact = configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts.find { it.name == 'browserstack-java-sdk' } + +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} + +tasks.withType(Test) { + systemProperties = System.properties + jvmArgs += "-javaagent:${browserstackSDKArtifact.file}" +} + +task sampleTest(type: Test) { + dependsOn cleanTest + useJUnitPlatform() + + include 'com/browserstack/FirstTest*' + + jvmArgs "-javaagent:${configurations.testRuntimeClasspath.find { it.name.contains('browserstack-java-sdk') }}" +} + + +task sampleLocalTest(type: Test) { + dependsOn cleanTest + useJUnitPlatform() + + include 'com/browserstack/LocalTest*' + + jvmArgs "-javaagent:${configurations.testRuntimeClasspath.find { it.name.contains('browserstack-java-sdk') }}" +} \ No newline at end of file diff --git a/junit-5/android/settings.gradle b/junit-5/android/settings.gradle new file mode 100644 index 0000000..bd31be8 --- /dev/null +++ b/junit-5/android/settings.gradle @@ -0,0 +1,15 @@ +pluginManagement { + repositories { + mavenCentral() + mavenLocal() + gradlePluginPortal() + } + + resolutionStrategy { + eachPlugin { + if (requested.id.id == "com.browserstack.gradle-sdk") { + useModule("com.browserstack:gradle-sdk:1.1.2") + } + } + } +} \ No newline at end of file diff --git a/junit-5/ios/build.gradle b/junit-5/ios/build.gradle new file mode 100644 index 0000000..5db9cbd --- /dev/null +++ b/junit-5/ios/build.gradle @@ -0,0 +1,51 @@ +plugins { + id 'java' + id 'com.browserstack.gradle-sdk' version "1.1.2" +} + +repositories { mavenCentral() } + +dependencies { + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0' + implementation 'commons-io:commons-io:2.11.0' + implementation 'org.seleniumhq.selenium:selenium-java:4.4.0' + implementation 'io.appium:java-client:8.1.1' + implementation 'com.googlecode.json-simple:json-simple:1.1.1' + implementation 'com.browserstack:browserstack-java-sdk:latest.release' +} + +group = 'com.browserstack' +version = '1.0-SNAPSHOT' +description = 'junit-browserstack' +sourceCompatibility = '1.8' + +def browserstackSDKArtifact = configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts.find { it.name == 'browserstack-java-sdk' } + +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} + +tasks.withType(Test) { + systemProperties = System.properties + jvmArgs += "-javaagent:${browserstackSDKArtifact.file}" +} + +task sampleTest(type: Test) { + dependsOn cleanTest + useJUnitPlatform() + + include 'com/browserstack/FirstTest*' + + jvmArgs "-javaagent:${configurations.testRuntimeClasspath.find { it.name.contains('browserstack-java-sdk') }}" +} + + +task sampleLocalTest(type: Test) { + dependsOn cleanTest + useJUnitPlatform() + + include 'com/browserstack/LocalTest*' + + jvmArgs "-javaagent:${configurations.testRuntimeClasspath.find { it.name.contains('browserstack-java-sdk') }}" +} \ No newline at end of file diff --git a/junit-5/ios/settings.gradle b/junit-5/ios/settings.gradle new file mode 100644 index 0000000..bd31be8 --- /dev/null +++ b/junit-5/ios/settings.gradle @@ -0,0 +1,15 @@ +pluginManagement { + repositories { + mavenCentral() + mavenLocal() + gradlePluginPortal() + } + + resolutionStrategy { + eachPlugin { + if (requested.id.id == "com.browserstack.gradle-sdk") { + useModule("com.browserstack:gradle-sdk:1.1.2") + } + } + } +} \ No newline at end of file From b33549ea6b6efecd04050d7434bb2147798a0392 Mon Sep 17 00:00:00 2001 From: rhisav-25 Date: Wed, 2 Apr 2025 14:11:11 +0000 Subject: [PATCH 13/19] resolving comments for consistency --- .github/workflows/sanity-workflow.yml | 16 ++++----- README.md | 52 ++++++++++++++++++++------- junit-5/android/build.gradle | 2 +- junit-5/android/settings.gradle | 2 +- junit-5/ios/build.gradle | 2 +- junit-5/ios/settings.gradle | 2 +- 6 files changed, 51 insertions(+), 25 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 352b08d..a643564 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -72,19 +72,19 @@ jobs: cd junit-4/ios mvn compile mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.ipa" - - name: Run gradle test for junit4 android + - name: Run gradle test for junit4 android run: | cd junit-4/android gradle clean sampleTest - - name: Run gradle sample-local-test for junit4 android + - name: Run gradle sample-local-test for junit4 android run: | cd junit-4/android gradle clean sampleLocalTest -D"browserstack.app"="./LocalSample.apk" - - name: Run gradle test for junit4 ios + - name: Run gradle test for junit4 ios run: | cd junit-4/ios gradle clean sampleTest - - name: Run gradle sample-local-test for junit4 ios + - name: Run gradle sample-local-test for junit4 ios run: | cd junit-4/ios gradle clean sampleLocalTest -D"browserstack.app"="./LocalSample.ipa" @@ -108,19 +108,19 @@ jobs: cd junit-5/ios mvn compile mvn test -P sample-local-test -D"browserstack.app"="./LocalSample.ipa" - - name: Run gradle test for junit5 android + - name: Run gradle test for junit5 android run: | cd junit-5/android gradle clean sampleTest - - name: Run gradle sample-local-test for junit4 android + - name: Run gradle sample-local-test for junit5 android run: | cd junit-5/android gradle clean sampleLocalTest -D"browserstack.app"="./LocalSample.apk" - - name: Run gradle test for junit4 ios + - name: Run gradle test for junit5 ios run: | cd junit-5/ios gradle clean sampleTest - - name: Run gradle sample-local-test for junit4 ios + - name: Run gradle sample-local-test for junit5 ios run: | cd junit-5/ios gradle clean sampleLocalTest -D"browserstack.app"="./LocalSample.ipa" diff --git a/README.md b/README.md index 1a8c947..8728e37 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,13 @@ These code samples are currently based on: - For Windows, download latest java version from [here](https://java.com/en/download/) and run the installer executable - For Mac and Linux, run `java -version` to see what java version is pre-installed. If you want a different version download from [here](https://java.com/en/download/) -2. Maven +2. Maven (Only required if using Maven as the build tool) + - If Maven is not downloaded, download it from [here](https://maven.apache.org/download.cgi) - For installation, follow the instructions [here](https://maven.apache.org/install.html) - 3. Gradle +3. Gradle (Only required if using Gradle as the build tool) + - If Gradle is not downloaded, download it from [here](https://gradle.org/releases/) - For installation, follow the instructions [here](https://gradle.org/install/) @@ -73,13 +75,25 @@ Getting Started with Appium tests in Junit4 and Junit5 on BrowserStack couldn't - Junit4 - Update `browserstack.yml` file at root level of [Android Junit4 examples](junit-4/android) or [iOS Junit4 examples](junit-4/ios) with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings) - - Run `mvn test -P sample-test` to run in maven enviroment. - - Run `gradle clean sampleTest` to run in gradle enviroment. + - **For Maven:** Run the following command to execute tests in the Maven environment: + ```sh + mvn test -P sample-test + ``` + - **For Gradle:** Run the following command to execute tests in the Gradle environment: + ```sh + gradle clean sampleTest + ``` - Junit5 - Update `browserstack.yml` file at root level of [Android Junit5 examples](junit-5/android) or [iOS Junit5 examples](junit-5/ios) with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings) - - Run `mvn test -P sample-test` - - Run `gradle clean sampleTest` to run in gradle enviroment. + - **For Maven:** Run the following command to execute tests in the Maven environment: + ```sh + mvn test -P sample-test + ``` + - **For Gradle:** Run the following command to execute tests in the Gradle environment: + ```sh + gradle clean sampleTest + ``` ### **Use Local testing for apps that access resources hosted in development or testing environments :** @@ -89,17 +103,29 @@ Getting Started with Appium tests in Junit4 and Junit5 on BrowserStack couldn't ``` browserstackLocal: true ``` - - Run `mvn test -P sample-local-test` to run in maven enviroment. - - Run `gradle clean sampleLocalTest` to run in gradle enviroment. + - **For Maven:** Run the following command to execute tests in the Maven environment: + ```sh + mvn test -P sample-local-test + ``` + - **For Gradle:** Run the following command to execute tests in the Gradle environment: + ```sh + gradle clean sampleLocalTest + ``` - - Junit5 - - Update `browserstack.yml` file at root level of Android Junit5 examples or iOS Junit5 examples with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings) - - Simply configure the browserstackLocal parameter in the browserstack.yml file accordingly in [Android Junit5 examples](junit-5/android) or [iOS Junit5 examples](junit-5/ios). +- Junit5 + - Update `browserstack.yml` file at root level of Android Junit5 examples or iOS Junit5 examples with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings) + - Simply configure the browserstackLocal parameter in the browserstack.yml file accordingly in [Android Junit5 examples](junit-5/android) or [iOS Junit5 examples](junit-5/ios). ``` browserstackLocal: true ``` - - Run `mvn test -P sample-local-test` to run in maven enviroment. - - Run `gradle clean sampleLocalTest` to run in gradle enviroment. + - **For Maven:** Run the following command to execute tests in the Maven environment: + ```sh + mvn test -P sample-local-test + ``` + - **For Gradle:** Run the following command to execute tests in the Gradle environment: + ```sh + gradle clean sampleLocalTest + ``` **Note**: If you are facing any issues, refer [Getting Help section](#Getting-Help) diff --git a/junit-5/android/build.gradle b/junit-5/android/build.gradle index 5db9cbd..1757ca2 100644 --- a/junit-5/android/build.gradle +++ b/junit-5/android/build.gradle @@ -48,4 +48,4 @@ task sampleLocalTest(type: Test) { include 'com/browserstack/LocalTest*' jvmArgs "-javaagent:${configurations.testRuntimeClasspath.find { it.name.contains('browserstack-java-sdk') }}" -} \ No newline at end of file +} diff --git a/junit-5/android/settings.gradle b/junit-5/android/settings.gradle index bd31be8..3e5b662 100644 --- a/junit-5/android/settings.gradle +++ b/junit-5/android/settings.gradle @@ -12,4 +12,4 @@ pluginManagement { } } } -} \ No newline at end of file +} diff --git a/junit-5/ios/build.gradle b/junit-5/ios/build.gradle index 5db9cbd..1757ca2 100644 --- a/junit-5/ios/build.gradle +++ b/junit-5/ios/build.gradle @@ -48,4 +48,4 @@ task sampleLocalTest(type: Test) { include 'com/browserstack/LocalTest*' jvmArgs "-javaagent:${configurations.testRuntimeClasspath.find { it.name.contains('browserstack-java-sdk') }}" -} \ No newline at end of file +} diff --git a/junit-5/ios/settings.gradle b/junit-5/ios/settings.gradle index bd31be8..3e5b662 100644 --- a/junit-5/ios/settings.gradle +++ b/junit-5/ios/settings.gradle @@ -12,4 +12,4 @@ pluginManagement { } } } -} \ No newline at end of file +} From c0a2118c90177fd8517702f8230da7730ceea035 Mon Sep 17 00:00:00 2001 From: rhisav-25 Date: Thu, 3 Apr 2025 13:01:22 +0000 Subject: [PATCH 14/19] fixing space issue --- junit-4/android/build.gradle | 2 +- junit-4/android/settings.gradle | 2 +- junit-4/ios/build.gradle | 2 +- junit-4/ios/settings.gradle | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/junit-4/android/build.gradle b/junit-4/android/build.gradle index 71eb450..67ee4cd 100644 --- a/junit-4/android/build.gradle +++ b/junit-4/android/build.gradle @@ -47,4 +47,4 @@ task sampleLocalTest(type: Test) { include 'com/browserstack/LocalTest*' jvmArgs "-javaagent:${configurations.testRuntimeClasspath.find { it.name.contains('browserstack-java-sdk') }}" -} \ No newline at end of file +} diff --git a/junit-4/android/settings.gradle b/junit-4/android/settings.gradle index bd31be8..3e5b662 100644 --- a/junit-4/android/settings.gradle +++ b/junit-4/android/settings.gradle @@ -12,4 +12,4 @@ pluginManagement { } } } -} \ No newline at end of file +} diff --git a/junit-4/ios/build.gradle b/junit-4/ios/build.gradle index 71eb450..67ee4cd 100644 --- a/junit-4/ios/build.gradle +++ b/junit-4/ios/build.gradle @@ -47,4 +47,4 @@ task sampleLocalTest(type: Test) { include 'com/browserstack/LocalTest*' jvmArgs "-javaagent:${configurations.testRuntimeClasspath.find { it.name.contains('browserstack-java-sdk') }}" -} \ No newline at end of file +} diff --git a/junit-4/ios/settings.gradle b/junit-4/ios/settings.gradle index bd31be8..3e5b662 100644 --- a/junit-4/ios/settings.gradle +++ b/junit-4/ios/settings.gradle @@ -12,4 +12,4 @@ pluginManagement { } } } -} \ No newline at end of file +} From 76b087ff9e8c8352a3297e2ff7b8b9667ccc7761 Mon Sep 17 00:00:00 2001 From: rhisav-25 Date: Fri, 4 Apr 2025 07:11:54 +0000 Subject: [PATCH 15/19] Trigger Semgrep scan From 9531a3606f03f908d9661eeb82a1a9a231a70d19 Mon Sep 17 00:00:00 2001 From: Aditya Mane Date: Tue, 9 Dec 2025 13:21:19 +0530 Subject: [PATCH 16/19] Update device --- junit-4/android/browserstack.yml | 8 ++++---- junit-4/ios/browserstack.yml | 6 +++--- junit-5/android/browserstack.yml | 8 ++++---- junit-5/ios/browserstack.yml | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/junit-4/android/browserstack.yml b/junit-4/android/browserstack.yml index d32968c..6fea125 100644 --- a/junit-4/android/browserstack.yml +++ b/junit-4/android/browserstack.yml @@ -38,11 +38,11 @@ platforms: - deviceName: Samsung Galaxy S22 Ultra platformVersion: 12.0 platformName: android - - deviceName: Samsung Galaxy S21 - platformVersion: 11.0 + - deviceName: Google Pixel 8 Pro + platformVersion: 14.0 platformName: android - - deviceName: Google Pixel 6 Pro - platformVersion: 12.0 + - deviceName: OnePlus 11R + platformVersion: 13.0 platformName: android # ======================= diff --git a/junit-4/ios/browserstack.yml b/junit-4/ios/browserstack.yml index 5a22aa2..4d0851c 100644 --- a/junit-4/ios/browserstack.yml +++ b/junit-4/ios/browserstack.yml @@ -36,13 +36,13 @@ app: ./BStackSampleApp.ipa # Entire list available here -> (https://www.browserstack.com/list-of-browsers-and-platforms/automate) platforms: - - deviceName: iPhone 14 Pro + - deviceName: iPhone 14 Pro Max platformVersion: 16 platformName: ios - - deviceName: iPhone 13 Pro + - deviceName: iPhone XR platformVersion: 15 platformName: ios - - deviceName: iPhone 12 + - deviceName: iPhone 15 platformVersion: 17 platformName: ios diff --git a/junit-5/android/browserstack.yml b/junit-5/android/browserstack.yml index 35eb933..96eb1f5 100644 --- a/junit-5/android/browserstack.yml +++ b/junit-5/android/browserstack.yml @@ -39,11 +39,11 @@ platforms: - deviceName: Samsung Galaxy S22 Ultra platformVersion: 12.0 platformName: android - - deviceName: Samsung Galaxy S21 - platformVersion: 11.0 + - deviceName: Google Pixel 8 Pro + platformVersion: 14.0 platformName: android - - deviceName: Google Pixel 6 Pro - platformVersion: 12.0 + - deviceName: OnePlus 11R + platformVersion: 13.0 platformName: android # ======================= diff --git a/junit-5/ios/browserstack.yml b/junit-5/ios/browserstack.yml index 13bc751..1809087 100644 --- a/junit-5/ios/browserstack.yml +++ b/junit-5/ios/browserstack.yml @@ -36,13 +36,13 @@ app: ./BStackSampleApp.ipa # Entire list available here -> (https://www.browserstack.com/list-of-browsers-and-platforms/automate) platforms: - - deviceName: iPhone 14 Pro + - deviceName: iPhone 14 Pro Max platformVersion: 16 platformName: ios - - deviceName: iPhone 13 Pro + - deviceName: iPhone XR platformVersion: 15 platformName: ios - - deviceName: iPhone 12 Pro + - deviceName: iPhone 15 platformVersion: 17 platformName: ios From 111c3bc28c847cd34ed2a0c8766a0428f2ac3aa7 Mon Sep 17 00:00:00 2001 From: Aditya Mane Date: Tue, 16 Dec 2025 14:33:24 +0530 Subject: [PATCH 17/19] Run semgrep From 06f4f65c8cf3ef42632a4a804a9c1319c2f059ec Mon Sep 17 00:00:00 2001 From: Aditya Mane Date: Thu, 15 Jan 2026 12:09:41 +0530 Subject: [PATCH 18/19] Replace iPhone XR --- junit-4/ios/browserstack.yml | 2 +- junit-5/ios/browserstack.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/junit-4/ios/browserstack.yml b/junit-4/ios/browserstack.yml index 4d0851c..54b6d10 100644 --- a/junit-4/ios/browserstack.yml +++ b/junit-4/ios/browserstack.yml @@ -39,7 +39,7 @@ platforms: - deviceName: iPhone 14 Pro Max platformVersion: 16 platformName: ios - - deviceName: iPhone XR + - deviceName: iPhone 13 platformVersion: 15 platformName: ios - deviceName: iPhone 15 diff --git a/junit-5/ios/browserstack.yml b/junit-5/ios/browserstack.yml index 1809087..3d79ba1 100644 --- a/junit-5/ios/browserstack.yml +++ b/junit-5/ios/browserstack.yml @@ -39,7 +39,7 @@ platforms: - deviceName: iPhone 14 Pro Max platformVersion: 16 platformName: ios - - deviceName: iPhone XR + - deviceName: iPhone 13 platformVersion: 15 platformName: ios - deviceName: iPhone 15 From d0923c1b47b7063d9f35497d6a30026ca62b0984 Mon Sep 17 00:00:00 2001 From: bstack-security-github <116066275+bstack-security-github@users.noreply.github.com> Date: Fri, 19 Jun 2026 18:36:02 +0530 Subject: [PATCH 19/19] semgrep workflow: pin Docker image and actions to version tags Pin returntocorp/semgrep container image to a specific version and GitHub Actions to major version tags to prevent :latest tag resolution and reduce supply-chain attack surface. Fixes: LCNC-15821 Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/Semgrep.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/Semgrep.yml b/.github/workflows/Semgrep.yml index 0347afd..95c5710 100644 --- a/.github/workflows/Semgrep.yml +++ b/.github/workflows/Semgrep.yml @@ -27,8 +27,7 @@ jobs: container: # A Docker image with Semgrep installed. Do not change this. - image: returntocorp/semgrep - + image: returntocorp/semgrep:1.166.0 # Skip any PR created by dependabot to avoid permission issues: if: (github.actor != 'dependabot[bot]')