From f8381399b5188be338250debf2c027bf653dc41b Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Thu, 18 Apr 2024 14:19:43 +0500 Subject: [PATCH 1/3] visual fix --- frontend/test_project/features/web/web_tests.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/test_project/features/web/web_tests.feature b/frontend/test_project/features/web/web_tests.feature index d93faa16..c2e87faf 100644 --- a/frontend/test_project/features/web/web_tests.feature +++ b/frontend/test_project/features/web/web_tests.feature @@ -152,7 +152,7 @@ Feature: OrangeHRM Login and Modus QA blog When The element 'Modus_Site > Careers > resume_link' is displayed And I click on button 'Modus_Site > Careers > resume_link' And I set text 'testing resume' to field 'Modus_Site > Careers > resume_text' - And I move to an element 'Modus_Site > Careers > move_form_dropdown' with offset '50' '50' + And I move to an element 'Modus_Site > Careers > move_form_dropdown' with offset '0' '100' And I click item 'Please select the country where you are living' for element 'Modus_Site > Careers > form_dropdown' And I click item 'Afghanistan' for element 'Modus_Site > Careers > country_dropdown' And I set text 'Modus Create' to field 'Modus_Site > Careers > current_company' From 0548bebd3f06258abed3095588bcc2ce61b78425 Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Thu, 18 Apr 2024 14:58:07 +0500 Subject: [PATCH 2/3] suites workflows --- .github/workflows/ui_suites_workflow.yml | 100 ++++++++++++++++++ .github/workflows/ui_workflow.yml | 7 -- .../features/web/web_tests.feature | 14 +-- 3 files changed, 107 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/ui_suites_workflow.yml diff --git a/.github/workflows/ui_suites_workflow.yml b/.github/workflows/ui_suites_workflow.yml new file mode 100644 index 00000000..7be673fb --- /dev/null +++ b/.github/workflows/ui_suites_workflow.yml @@ -0,0 +1,100 @@ +name: BS - Web UI Suites Tests + +env: + TAGS: 'web_tests' + BASE_URL: https://opensource-demo.orangehrmlive.com + BROWSERSTACK_USER: ${{secrets.BROWSERSTACK_API_USERNAME}} + BROWSERSTACK_ACCESS_KEY: ${{secrets.BROWSERSTACK_ACCESS_KEY}} + HRM_USER_NAME: ${{ secrets.HRM_USER_NAME }} + HRM_PASSWORD: ${{ secrets.HRM_PASSWORD }} + +on: + schedule: + - cron: '0 20 * * *' + workflow_dispatch: + inputs: + tags: + description: Gherkin Tags + required: true + default: 'web_tests' + +jobs: + web-suites-regression: + strategy: + max-parallel: 1 + fail-fast: true + matrix: + include: + - name: Win Chrome + baseurl: https://opensource-demo.orangehrmlive.com + tags: 'web_tests and healthcheck' + config_file: ./env_configs/win_chrome.json + html_report: win-chrome + + - name: Win Firefox + baseurl: https://opensource-demo.orangehrmlive.com + tags: 'web_tests and firefox and smoke' + config_file: ./env_configs/win_firefox.json + html_report: win-firefox + + - name: Win Edge + baseurl: https://opensource-demo.orangehrmlive.com + tags: 'web_tests and sanity' + config_file: ./env_configs/win_edge.json + html_report: win-edge + + - name: Mac Safari + baseurl: https://opensource-demo.orangehrmlive.com + tags: 'web_tests and regression' + config_file: ./env_configs/mac_safari.json + html_report: mac-safari + + name: ${{ matrix.name }} - Regression + runs-on: ubuntu-latest + steps: + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + + - name: BrowserStack Env Setup + uses: browserstack/github-actions/setup-env@master + with: + username: ${{secrets.BROWSERSTACK_API_USERNAME}} + access-key: ${{secrets.BROWSERSTACK_ACCESS_KEY}} + + - name: BrowserStack Local Tunnel Setup + uses: browserstack/github-actions/setup-local@master + with: + local-testing: start + local-identifier: random + + - name: Check out code + uses: actions/checkout@v4 + + - name: Setup dependencies + run: | + sh setup_install.sh + + - name: Run All Tests + run: | + env + source $HOME/.bp-venv/bin/activate + sh ci_run_web.sh ${{secrets.BROWSERSTACK_API_USERNAME}} ${{secrets.BROWSERSTACK_ACCESS_KEY}} "${{ matrix.config_file }}" "${{ matrix.tags }}" "${{ matrix.baseurl }}" "${{secrets.SLACK_WEBHOOK_URL}}" "${{secrets.TEAMS_WEBHOOK_URL}}" + + - name: BrowserStackLocal Stop + uses: browserstack/github-actions/setup-local@master + with: + local-testing: stop + if: ${{ always() }} + + - name: Upload HTML run report in the Artifacts Folder + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.html_report }} + path: | + ./*.html + ./output/ + ./assets/ + ./test_data/visualtesting/test/*.png + if: ${{ always() }} \ No newline at end of file diff --git a/.github/workflows/ui_workflow.yml b/.github/workflows/ui_workflow.yml index 009532ac..22d5d67f 100644 --- a/.github/workflows/ui_workflow.yml +++ b/.github/workflows/ui_workflow.yml @@ -170,13 +170,6 @@ jobs: with: local-testing: stop if: ${{ always() }} - - name: Get Allure history - uses: actions/checkout@v4 - if: always() - continue-on-error: true - with: - ref: gh-pages - path: gh-pages - name: Upload HTML run report in the Artifacts Folder uses: actions/upload-artifact@v4 diff --git a/frontend/test_project/features/web/web_tests.feature b/frontend/test_project/features/web/web_tests.feature index c2e87faf..7efa95c5 100644 --- a/frontend/test_project/features/web/web_tests.feature +++ b/frontend/test_project/features/web/web_tests.feature @@ -1,7 +1,7 @@ @nondestructive @web_tests Feature: OrangeHRM Login and Modus QA blog - @hrm_login @hrm_logout @automated @firefox + @hrm_login @hrm_logout @automated @firefox @healthcheck Scenario: Login into OrangeHRM system and logout Given I set web base url '{%BASE_URL%}' And Browser is maximized @@ -17,7 +17,7 @@ Feature: OrangeHRM Login and Modus QA blog And I click item 'Logout' for element 'OrangeHRM > logout_button' Then The element 'OrangeHRM > username' is displayed - @hrm_add_user @automated @firefox + @hrm_add_user @automated @firefox @smoke Scenario: Login and add admin user in OrangeHRM system Given I set web base url '{%BASE_URL%}' And Browser is maximized @@ -58,7 +58,7 @@ Feature: OrangeHRM Login and Modus QA blog And I click on button 'OrangeHRM > User > delete_confirm' Then The element 'OrangeHRM > User > success_message' is displayed - @blog_search @automated @firefox + @blog_search @automated @firefox @sanity Scenario: Check QA modus blog Search Given I set web base url 'https://moduscreate.com' And The browser resolution is '1024' per '768' @@ -80,7 +80,7 @@ Feature: OrangeHRM Login and Modus QA blog And The element 'Modus_Site > sub_popup_close' is displayed - @sd_login @sd_login_error @sd_checkout @automated @firefox + @sd_login @sd_login_error @sd_checkout @automated @firefox @sanity Scenario: Login into saucedemo site with valid credentials Given I set web base url 'https://www.saucedemo.com' And Browser is maximized @@ -115,7 +115,7 @@ Feature: OrangeHRM Login and Modus QA blog And The element 'SourceDemo_Site > Checkout_page > thank_you_message' is displayed - @sd_failure_message @automated @firefox + @sd_failure_message @automated @firefox @regression Scenario: Try to login into saucedemo site with in-valid credentials Given I set web base url 'https://www.saucedemo.com' And Browser is maximized @@ -126,7 +126,7 @@ Feature: OrangeHRM Login and Modus QA blog And I click on element 'SourceDemo_Site > login_button' Then The element 'SourceDemo_Site > login_error_message' is displayed - @job_search @automated + @job_search @automated @healthcheck Scenario: Check QA modus job Search Given I set web base url 'https://moduscreate.com' And Browser is maximized @@ -176,7 +176,7 @@ Feature: OrangeHRM Login and Modus QA blog And I click item 'data protection apps upon hire' for element 'Modus_Site > Careers > form_dropdown' And I click item 'Yes' for element 'Modus_Site > Careers > protection_dropdown' - @gmail @automated @firefox + @gmail @automated @firefox @regression Scenario: Email Verification with email link Given I set web base url '{%BASE_URL%}' And Browser is maximized From e9eb1522cb40b14bd3d6cb8c3ce715fc573e6b61 Mon Sep 17 00:00:00 2001 From: tauqirsarwar1 Date: Thu, 18 Apr 2024 14:59:09 +0500 Subject: [PATCH 3/3] suites workflows --- frontend/test_project/features/web/web_tests.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/test_project/features/web/web_tests.feature b/frontend/test_project/features/web/web_tests.feature index 7efa95c5..7702b74c 100644 --- a/frontend/test_project/features/web/web_tests.feature +++ b/frontend/test_project/features/web/web_tests.feature @@ -152,7 +152,7 @@ Feature: OrangeHRM Login and Modus QA blog When The element 'Modus_Site > Careers > resume_link' is displayed And I click on button 'Modus_Site > Careers > resume_link' And I set text 'testing resume' to field 'Modus_Site > Careers > resume_text' - And I move to an element 'Modus_Site > Careers > move_form_dropdown' with offset '0' '100' + And I move to an element 'Modus_Site > Careers > move_form_dropdown' with offset '50' '100' And I click item 'Please select the country where you are living' for element 'Modus_Site > Careers > form_dropdown' And I click item 'Afghanistan' for element 'Modus_Site > Careers > country_dropdown' And I set text 'Modus Create' to field 'Modus_Site > Careers > current_company'