From 29e3f563dab90607b7be7ead80450259e76f5419 Mon Sep 17 00:00:00 2001 From: Dipjyoti Metia Date: Sun, 22 Aug 2021 18:15:36 +1000 Subject: [PATCH 1/5] updating actions and reporting --- .github/workflows/gradle.yml | 23 +++++++++++++++-------- .gitignore | 1 + README.md | 3 ++- build.gradle | 2 +- gradle.properties | 2 -- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index fea1b752..d020a41a 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -9,6 +9,9 @@ on: jobs: build: runs-on: ubuntu-latest + env: + BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} + BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} steps: - uses: actions/checkout@v2 - name: Grant execute permission for gradlew @@ -16,13 +19,17 @@ jobs: # https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#example-6 - name: Upload app and set app location run: | - APP_UPLOAD_RESPONSE=$(curl -u "$USERNAME:$ACCESS" -X POST https://api-cloud.browserstack.com/app-automate/upload -F "url=https://github.com/dipjyotimetia/GIT_LFS/raw/master/com.booking_2020-12-16.apk") + APP_UPLOAD_RESPONSE=$(curl -u "BROWSERSTACK_USERNAME:BROWSERSTACK_ACCESS_KEY" -X POST https://api-cloud.browserstack.com/app-automate/upload -F "url=https://github.com/dipjyotimetia/GIT_LFS/raw/master/com.booking_2020-12-16.apk") echo "APP_URL=$(echo $APP_UPLOAD_RESPONSE | jq -r '.app_url')" >> $GITHUB_ENV - env: - USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} - ACCESS: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - - name: Build with Gradle + - name: Gradle Run Test run: ./gradlew task e2e - env: - BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} - BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} + - name: Generate Report + run: ./gradlew task allureReport + - uses: actions/upload-artifact@v2 + with: + name: allure-report + path: build/reports/allure-report + - uses: actions/upload-artifact@v2 + with: + name: extent-report + path: Reports diff --git a/.gitignore b/.gitignore index a1eae78e..e5d81ecb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .gradle .idea +.allure allure-results build out diff --git a/README.md b/README.md index 0c4e1d08..8638b1f1 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,8 @@ $ import project from intelij as a gradle project $ gradle clean $ gradle build $ gradle task E2E -$ allureServe +$ gradle allureReport +$ gradle allureServe ``` ### Execution Gif ![browserstack](https://github.com/dipjyotimetia/MobileTestFramework/blob/master/docs/gif/videogif.gif) diff --git a/build.gradle b/build.gradle index d5aca000..7be16b88 100644 --- a/build.gradle +++ b/build.gradle @@ -56,7 +56,7 @@ allure { useTestNG { version = allureVersion } - downloadLink = 'https://dl.bintray.com/qameta/maven/io/qameta/allure/allure-commandline/$allureVersion/allure-commandline-$allureVersion.zip' + downloadLink = 'https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/$allureVersion/allure-commandline-$allureVersion.zip' } dependencies { diff --git a/gradle.properties b/gradle.properties index 18007d86..e69de29b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +0,0 @@ -systemProp.sonar.host.url=http://localhost:9000 -systemProp.sonar.login= \ No newline at end of file From 827368da28b1ebdf9a4ace625878ba3225261423 Mon Sep 17 00:00:00 2001 From: Dipjyoti Metia Date: Sun, 22 Aug 2021 18:19:08 +1000 Subject: [PATCH 2/5] updating actions and reporting --- .github/workflows/gradle.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index d020a41a..5a9cb148 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -9,9 +9,6 @@ on: jobs: build: runs-on: ubuntu-latest - env: - BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} - BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} steps: - uses: actions/checkout@v2 - name: Grant execute permission for gradlew @@ -19,10 +16,16 @@ jobs: # https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#example-6 - name: Upload app and set app location run: | - APP_UPLOAD_RESPONSE=$(curl -u "BROWSERSTACK_USERNAME:BROWSERSTACK_ACCESS_KEY" -X POST https://api-cloud.browserstack.com/app-automate/upload -F "url=https://github.com/dipjyotimetia/GIT_LFS/raw/master/com.booking_2020-12-16.apk") + APP_UPLOAD_RESPONSE=$(curl -u "$USERNAME:$ACCESS" -X POST https://api-cloud.browserstack.com/app-automate/upload -F "url=https://github.com/dipjyotimetia/GIT_LFS/raw/master/com.booking_2020-12-16.apk") echo "APP_URL=$(echo $APP_UPLOAD_RESPONSE | jq -r '.app_url')" >> $GITHUB_ENV + env: + USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} + ACCESS: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - name: Gradle Run Test run: ./gradlew task e2e + env: + BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} + BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - name: Generate Report run: ./gradlew task allureReport - uses: actions/upload-artifact@v2 From 72d84111c5aadb6464d51b25bffea4aaee05438a Mon Sep 17 00:00:00 2001 From: Dipjyoti Metia Date: Sun, 22 Aug 2021 18:24:26 +1000 Subject: [PATCH 3/5] update build.gradle --- build.gradle | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 7be16b88..61f3a52e 100644 --- a/build.gradle +++ b/build.gradle @@ -49,14 +49,12 @@ buildscript { } } -def allureVersion = "2.14.0" - allure { - version = allureVersion + version = '2.14.0' useTestNG { - version = allureVersion + version = '2.14.0' } - downloadLink = 'https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/$allureVersion/allure-commandline-$allureVersion.zip' + downloadLink = 'https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/$allureVersion/allure-commandline-2.14.0.zip' } dependencies { From 02381df70ceb9de8e5af5e5e8d1ea6c5622c2761 Mon Sep 17 00:00:00 2001 From: Dipjyoti Metia Date: Sun, 22 Aug 2021 18:27:50 +1000 Subject: [PATCH 4/5] update build.gradle --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 61f3a52e..6b7a27fc 100644 --- a/build.gradle +++ b/build.gradle @@ -54,7 +54,7 @@ allure { useTestNG { version = '2.14.0' } - downloadLink = 'https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/$allureVersion/allure-commandline-2.14.0.zip' + downloadLink = 'https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/2.14.0/allure-commandline-2.14.0.zip' } dependencies { From 92f27d4ae5ec14935d4f0e47d50a2063f6fb73bc Mon Sep 17 00:00:00 2001 From: Dipjyoti Metia Date: Sun, 22 Aug 2021 18:36:49 +1000 Subject: [PATCH 5/5] updated readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8638b1f1..d1d8fe20 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ ## Mobile Test Framework -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/6aaf27fdb62e4792ba5a3a9841ce13ee)](https://www.codacy.com/app/dipjyotimetia/MobileTestFramework?utm_source=github.com&utm_medium=referral&utm_content=TestautoDev/MobileTestFramework&utm_campaign=Badge_Grade) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/8958948e2b0048a785417344e0dffe43)](https://www.codacy.com/gh/dipjyotimetia/MobileTestFramework/dashboard?utm_source=github.com&utm_medium=referral&utm_content=dipjyotimetia/MobileTestFramework&utm_campaign=Badge_Grade) ![CI](https://github.com/dipjyotimetia/MobileTestFramework/workflows/CI/badge.svg) -### Full fledged Mobile, API and Database framework using appium and rest-assured +### Full-fledged Mobile, API and Database framework using appium and rest-assured