From e02de7f72b7778b65a87cb8bdb73840d752dd4d2 Mon Sep 17 00:00:00 2001 From: Jason Edstrom Date: Thu, 16 Feb 2023 20:01:30 -0600 Subject: [PATCH 1/6] #29 Setting up pipeline for Browserstack --- .github/workflows/maven.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 6e11a442..d02730cd 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -118,6 +118,11 @@ jobs: echo Cannot run Appium tests when build was triggered by dependabot exit 1 - uses: actions/checkout@v3 + - name: BrowserStack Env Setup + uses: browserstack/github-actions/setup-env@master' + with: + username: ${{ secrets.BROWSERSTACK_USERNAME }} + access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - uses: actions/setup-node@v3 if: matrix.module-name == 'openmaqs-playwright' with: @@ -261,7 +266,7 @@ jobs: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} - name: Deploy Release v${{ needs.getVersion.outputs.buildNumber }} to OSSRH - run: mvn -Drevision=${{ needs.getVersion.outputs.buildNumber }} deploy + run: mvn -Drevision=${{ needs.getVersion.outputs.buildNumber }} -B -e deploy - name: Publish GitHub release v${{ needs.getVersion.outputs.buildNumber }} uses: actions/github-script@v6 with: From 3c6d8697224c61b1fdb65b6c062165630b48071f Mon Sep 17 00:00:00 2001 From: Jason Edstrom Date: Thu, 16 Feb 2023 20:02:46 -0600 Subject: [PATCH 2/6] #29 Setting up pipeline for Browserstack --- .github/workflows/maven.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index d02730cd..72949c0f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -246,7 +246,6 @@ jobs: with: distribution: zulu java-version: 11 - cache: maven - name: Restore Local Maven Cache uses: actions/cache@v3.2.4 with: @@ -256,7 +255,7 @@ jobs: uses: whelk-io/maven-settings-xml-action@v20 with: profiles: '[{"id": "gpg", "properties": { "gpg.keyname": "${{secrets.GPG_KEYNAME_ID}}", "gpg.passphrase": "${{secrets.GPG_PASSPHRASE}}" }}]' - servers: '[{"id": "ossrh", "username": "${{secrets.DEPLOY_PACKAGE_USERNAME}}", "password": "${{secrets.DEPLOY_PACKAGE_PASSWORD}}"}]' + servers: '[{"id": "ossrh", "username": "${{vars.DEPLOY_PACKAGE_USERNAME}}", "password": "${{secrets.DEPLOY_PACKAGE_PASSWORD}}"}]' active_profiles: > [ "ossrh", "release", "gpg" ] - name: Import GPG key From 81eeeb205b9ba11064490511140283d1eb8d6d6c Mon Sep 17 00:00:00 2001 From: Jason Edstrom Date: Tue, 21 Feb 2023 19:38:58 -0600 Subject: [PATCH 3/6] #29 Tests do work locally through TestNG. Testing pipeline --- .github/workflows/maven.yml | 2 +- openmaqs-selenium/browserstack.yml | 12 +++++++ openmaqs-selenium/config.xml | 13 +++---- openmaqs-selenium/pom.xml | 54 +++++++++++++++++++++++++++++- 4 files changed, 70 insertions(+), 11 deletions(-) create mode 100644 openmaqs-selenium/browserstack.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 72949c0f..f100de78 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -164,7 +164,7 @@ jobs: runs-on: ubuntu-latest needs: [test-modules, getVersion] env: - SONAR_ORG: "OpenMAQS" + SONAR_ORG: "openmaqs" SONAR_PROJECT: "OpenMAQS_openmaqs-java" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{secrets.SONAR_TOKEN}} diff --git a/openmaqs-selenium/browserstack.yml b/openmaqs-selenium/browserstack.yml new file mode 100644 index 00000000..e863ecee --- /dev/null +++ b/openmaqs-selenium/browserstack.yml @@ -0,0 +1,12 @@ +framework: testng +platforms: + - os: Windows + osVersion: 11 + browserName: Chrome + browserVersion: latest +parallelsPerPlatform: 5 +browserstackLocal: false +buildIdentifier: ${BUILD_NUMBER} +debug: true +networkLogs: false +consoleLogs: errors \ No newline at end of file diff --git a/openmaqs-selenium/config.xml b/openmaqs-selenium/config.xml index 533810ee..2bd394bb 100644 --- a/openmaqs-selenium/config.xml +++ b/openmaqs-selenium/config.xml @@ -39,17 +39,17 @@ Firefox Edge HEADLESSCHROME--> - HEADLESSCHROME + REMOTE Chrome - http://ondemand.saucelabs.com:80/wd/hub + https://hub.browserstack.com/wd/hub https://openmaqs.github.io/TestingSite/Automation/ 1000 20000 Chrome - OS X 10.11 - 54.0 + + - http://ondemand.saucelabs.com:80/wd/hub + https://hub.browserstack.com/wd/hub 122000 diff --git a/openmaqs-appium/pom.xml b/openmaqs-appium/pom.xml index a320822a..aa672862 100644 --- a/openmaqs-appium/pom.xml +++ b/openmaqs-appium/pom.xml @@ -66,4 +66,56 @@ ${selenium.version} + + + testing + + true + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.3.0 + + + getClasspathFilenames + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${surefire.plugin.version} + + methods + 5 + + ${argLine} -javaagent:@{com.browserstack:browserstack-java-sdk:jar} + + + + + org.apache.maven.surefire + surefire-testng + ${surefire.plugin.version} + + + + + + + + com.browserstack + browserstack-java-sdk + 1.2.1 + + + + + diff --git a/openmaqs-selenium/pom.xml b/openmaqs-selenium/pom.xml index 248a308c..897e7e0e 100644 --- a/openmaqs-selenium/pom.xml +++ b/openmaqs-selenium/pom.xml @@ -49,7 +49,7 @@ methods 5 - ${argLine} -javaagent:${com.browserstack:browserstack-java-sdk:jar} + ${argLine} -javaagent:@{com.browserstack:browserstack-java-sdk:jar}