From 5f47917b58eaa3a5b56b73b8f4b1e24ee64821a9 Mon Sep 17 00:00:00 2001 From: najeeb1023 Date: Mon, 26 Aug 2024 16:45:05 +0200 Subject: [PATCH 1/8] Example test run. --- src/test/features/UserShoppingByWear.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/features/UserShoppingByWear.feature b/src/test/features/UserShoppingByWear.feature index 1932de6..7de8cbe 100644 --- a/src/test/features/UserShoppingByWear.feature +++ b/src/test/features/UserShoppingByWear.feature @@ -31,4 +31,4 @@ Feature:Verify that the user is able to purchase some item. Examples: | Section | Attire | EmailAddress | FirstName | LastName | Address | City | State | ZipCode | Country | PhoneNumber | - | Women | Bras & Tanks | randomemail@gmail.com | Ronald | McDonald | Any Street 9112 | New York City | New York | 92784 | United States | 873487682 | \ No newline at end of file + | Women | Bras & Tanks | randomemail@gmail.com | Ronald | McDonald | Any Street 9112 | New York City | New York | 92784 | United Tests | 873487682 | \ No newline at end of file From 24abe4e892c0f3f58e68cd1ce90a86451f0449c2 Mon Sep 17 00:00:00 2001 From: najeeb1023 Date: Mon, 26 Aug 2024 18:18:01 +0200 Subject: [PATCH 2/8] new test attempt with different jobs. --- .github/workflows/playwright.yml | 50 ++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 5286431..a53ef21 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,27 +1,50 @@ name: Playwright Tests on: push: - pull_request: - + jobs: - CucumberTests-Job: - timeout-minutes: 60 + Checkout-Code: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + Setup-Node: + needs: Checkout-Code + runs-on: ubuntu-latest + steps: - uses: actions/setup-node@v4 with: node-version: 20 - name: Install dependencies run: npm ci + + Install-Playwright-Chromium: + needs: Setup-Node + runs-on: ubuntu-latest + steps: - name: Install Playwright Chromium run: npx playwright install chromium + + Install-TestRail-CLI: + needs: Setup-Node + runs-on: ubuntu-latest + steps: - name: Install TestRail CLI run: pip install trcli + + Run-Cucumber-Tests: + needs: [Install-Playwright-Chromium, Install-TestRail-CLI] + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: - name: Cucumber-Tests - continue-on-error: true run: npm run cucumber:luma + + Update-TestRail-Result: + needs: Run-Cucumber-Tests + runs-on: ubuntu-latest + steps: - name: Update TestRail Result continue-on-error: true run: trcli -y @@ -32,16 +55,25 @@ jobs: parse_junit --title "magento-webapp_regression" -f "./test-results/reports/junit-report.xml" + + Upload-Cucumber-Report: + needs: Run-Cucumber-Tests + runs-on: ubuntu-latest + steps: - uses: actions/upload-artifact@v4 if: always() with: name: cucumber-report-html path: test-results/reports/cucumber-report.html retention-days: 30 + + Upload-JUnit-Report: + needs: Run-Cucumber-Tests + runs-on: ubuntu-latest + steps: - uses: actions/upload-artifact@v4 if: always() with: - name: junit-report.xml - path: test-results/reports/junit-results.xml - retention-days: 30 - \ No newline at end of file + name: junit-report.xml + path: test-results/reports/junit-results.xml + retention-days: 30 From 341f89437f8426eddb76236d79d740aa4e36699a Mon Sep 17 00:00:00 2001 From: najeeb1023 Date: Mon, 26 Aug 2024 18:21:30 +0200 Subject: [PATCH 3/8] new test attempt with different jobs. --- .github/workflows/playwright.yml | 61 +++++++++----------------------- 1 file changed, 16 insertions(+), 45 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index a53ef21..eca65c7 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -4,45 +4,38 @@ on: pull_request: jobs: - Checkout-Code: + CucumberTests-Job: + timeout-minutes: 60 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - Setup-Node: - needs: Checkout-Code - runs-on: ubuntu-latest - steps: - uses: actions/setup-node@v4 with: node-version: 20 - name: Install dependencies run: npm ci - - Install-Playwright-Chromium: - needs: Setup-Node - runs-on: ubuntu-latest - steps: - name: Install Playwright Chromium run: npx playwright install chromium - - Install-TestRail-CLI: - needs: Setup-Node - runs-on: ubuntu-latest - steps: - name: Install TestRail CLI run: pip install trcli - - Run-Cucumber-Tests: - needs: [Install-Playwright-Chromium, Install-TestRail-CLI] - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - name: Cucumber-Tests + continue-on-error: true run: npm run cucumber:luma + - uses: actions/upload-artifact@v4 + if: always() + with: + name: cucumber-report-html + path: test-results/reports/cucumber-report.html + retention-days: 30 + - uses: actions/upload-artifact@v4 + if: always() + with: + name: junit-report.xml + path: test-results/reports/junit-results.xml + retention-days: 30 Update-TestRail-Result: - needs: Run-Cucumber-Tests + needs: CucumberTests-Job runs-on: ubuntu-latest steps: - name: Update TestRail Result @@ -55,25 +48,3 @@ jobs: parse_junit --title "magento-webapp_regression" -f "./test-results/reports/junit-report.xml" - - Upload-Cucumber-Report: - needs: Run-Cucumber-Tests - runs-on: ubuntu-latest - steps: - - uses: actions/upload-artifact@v4 - if: always() - with: - name: cucumber-report-html - path: test-results/reports/cucumber-report.html - retention-days: 30 - - Upload-JUnit-Report: - needs: Run-Cucumber-Tests - runs-on: ubuntu-latest - steps: - - uses: actions/upload-artifact@v4 - if: always() - with: - name: junit-report.xml - path: test-results/reports/junit-results.xml - retention-days: 30 From 216578b523ca9b685d079eb3ba2a11f21ea044de Mon Sep 17 00:00:00 2001 From: najeeb1023 Date: Mon, 26 Aug 2024 18:25:21 +0200 Subject: [PATCH 4/8] Fixed test job with TRCLI to install before. --- .github/workflows/playwright.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index eca65c7..45d9403 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -38,6 +38,8 @@ jobs: needs: CucumberTests-Job runs-on: ubuntu-latest steps: + - name: Install TestRail CLI + run: pip install trcli - name: Update TestRail Result continue-on-error: true run: trcli -y From 77c109f2b3257e4af38c031b7747566823051405 Mon Sep 17 00:00:00 2001 From: najeeb1023 Date: Mon, 26 Aug 2024 18:25:47 +0200 Subject: [PATCH 5/8] Fixed test job with TRCLI to install before, continue on error removed. --- .github/workflows/playwright.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 45d9403..2d8db1c 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -19,7 +19,6 @@ jobs: - name: Install TestRail CLI run: pip install trcli - name: Cucumber-Tests - continue-on-error: true run: npm run cucumber:luma - uses: actions/upload-artifact@v4 if: always() @@ -41,7 +40,6 @@ jobs: - name: Install TestRail CLI run: pip install trcli - name: Update TestRail Result - continue-on-error: true run: trcli -y -h https://testautomationportfolio.testrail.io --project "magento-webapp" From 76a655b172e326ec1b1ce5c8d5482518649aaec4 Mon Sep 17 00:00:00 2001 From: najeeb1023 Date: Mon, 26 Aug 2024 18:28:55 +0200 Subject: [PATCH 6/8] Fixed test job with TRCLI to install before, continue on error added. --- .github/workflows/playwright.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 2d8db1c..d60589b 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -38,6 +38,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install TestRail CLI + continue-on-error: true run: pip install trcli - name: Update TestRail Result run: trcli -y From e181480071e79aac3221ccc6e6da84986b2779f3 Mon Sep 17 00:00:00 2001 From: najeeb1023 Date: Mon, 26 Aug 2024 18:32:06 +0200 Subject: [PATCH 7/8] Fixed test job with TRCLI to install before, continue on error added in Cucumber-Tests. --- .github/workflows/playwright.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index d60589b..7bda4a9 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -19,6 +19,7 @@ jobs: - name: Install TestRail CLI run: pip install trcli - name: Cucumber-Tests + continue-on-error: true run: npm run cucumber:luma - uses: actions/upload-artifact@v4 if: always() @@ -38,7 +39,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Install TestRail CLI - continue-on-error: true run: pip install trcli - name: Update TestRail Result run: trcli -y From a7790d417ed87906e5535f9e60f142fc3546983c Mon Sep 17 00:00:00 2001 From: najeeb1023 Date: Mon, 26 Aug 2024 18:36:52 +0200 Subject: [PATCH 8/8] fix: playwright.yml reverted --- .github/workflows/playwright.yml | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 7bda4a9..30940f9 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,8 +1,9 @@ name: Playwright Tests on: push: + pull_request: - + jobs: CucumberTests-Job: timeout-minutes: 60 @@ -21,6 +22,16 @@ jobs: - name: Cucumber-Tests continue-on-error: true run: npm run cucumber:luma + - name: Update TestRail Result + continue-on-error: true + run: trcli -y + -h https://testautomationportfolio.testrail.io + --project "magento-webapp" + -u capricorn.najeeb@gmail.com + -p Testrun123! + parse_junit + --title "magento-webapp_regression" + -f "./test-results/reports/junit-report.xml" - uses: actions/upload-artifact@v4 if: always() with: @@ -31,21 +42,6 @@ jobs: if: always() with: name: junit-report.xml - path: test-results/reports/junit-results.xml + path: test-results/reports/junit-report.xml retention-days: 30 - - Update-TestRail-Result: - needs: CucumberTests-Job - runs-on: ubuntu-latest - steps: - - name: Install TestRail CLI - run: pip install trcli - - name: Update TestRail Result - run: trcli -y - -h https://testautomationportfolio.testrail.io - --project "magento-webapp" - -u capricorn.najeeb@gmail.com - -p Testrun123! - parse_junit - --title "magento-webapp_regression" - -f "./test-results/reports/junit-report.xml" + \ No newline at end of file