diff --git a/.github/workflows/docker_ui_workflow.yml b/.github/workflows/docker_ui_workflow.yml index a7edd972..5e9b24ce 100644 --- a/.github/workflows/docker_ui_workflow.yml +++ b/.github/workflows/docker_ui_workflow.yml @@ -60,7 +60,7 @@ jobs: - name: Linux Firefox baseurl: https://opensource-demo.orangehrmlive.com - tags: web_tests and firefox + tags: "web_tests and firefox" config_file: ./env_configs/docker_firefox.json html_report: linux-firefox concurrent_thread: 3 diff --git a/.github/workflows/ui_workflow.yml b/.github/workflows/ui_workflow.yml index 74f6c5e1..2a2e53ed 100644 --- a/.github/workflows/ui_workflow.yml +++ b/.github/workflows/ui_workflow.yml @@ -72,7 +72,7 @@ jobs: - name: Win Firefox baseurl: https://opensource-demo.orangehrmlive.com - tags: 'web_tests and firefox' + tags: "web_tests and firefox" config_file: ./env_configs/win_firefox.json html_report: win-firefox testrail_configuration_name: 'Firefox, Windows' @@ -88,7 +88,7 @@ jobs: - name: Mac Firefox baseurl: https://opensource-demo.orangehrmlive.com - tags: 'web_tests and firefox' + tags: "web_tests and firefox" config_file: ./env_configs/mac_firefox.json html_report: mac-firefox testrail_configuration_name: 'Firefox, MacOS' @@ -157,7 +157,7 @@ jobs: 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}}" + 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}}" # --pytest-testrail-export-test-results \ # --testrail-project-id "${{ env.TESTRAIL_PROJECT_ID }}" \ # --pytest-testrail-test-plan-id "${{ env.TEST_PLAN_ID }}" \ @@ -293,7 +293,7 @@ jobs: env source $HOME/.bp-venv/bin/activate - sh ci_run_web.sh ${{secrets.BROWSERSTACK_API_USERNAME}} ${{secrets.BROWSERSTACK_ACCESS_KEY}} "$BROWSER" $TAGS "$BASE_URL" "${{secrets.SLACK_WEBHOOK_URL}}" "${{secrets.TEAMS_WEBHOOK_URL}}" + sh ci_run_web.sh ${{secrets.BROWSERSTACK_API_USERNAME}} ${{secrets.BROWSERSTACK_ACCESS_KEY}} "$BROWSER" "$TAGS" "$BASE_URL" "${{secrets.SLACK_WEBHOOK_URL}}" "${{secrets.TEAMS_WEBHOOK_URL}}" - name: BrowserStackLocal Stop uses: browserstack/github-actions/setup-local@master diff --git a/ci_run_web.sh b/ci_run_web.sh index ec276ae3..ddafe6d4 100755 --- a/ci_run_web.sh +++ b/ci_run_web.sh @@ -2,6 +2,6 @@ # Run Web tests python -m pytest -vv -s --gherkin-terminal-reporter --driver=Remote --selenium-host "$1":"$2""@hub-cloud.browserstack.com" --variables=$3 --html="./output/reports/" \ ---tags="$4" --reruns 1 --reruns-delay 2 --self-contained-html --capability headless False --base-url=$5 --slack-webhook-url=$6 --slack-channel=pytest-test-automation \ +--tags=$4 --reruns 1 --reruns-delay 2 --self-contained-html --capability headless False --base-url=$5 --slack-webhook-url=$6 --slack-channel=pytest-test-automation \ --slack-results-url=https://tweag.github.io/pytest-automation-boilerplate --teams-webhook-url=$7 \ --teams-results-url=https://tweag.github.io/pytest-automation-boilerplate --slack-failure-only=true --teams-failure-only=true \ No newline at end of file diff --git a/frontend/test_project/features/api/test_feature.py b/frontend/test_project/features/api/test_feature.py index 22e051a8..8cd9c3a8 100644 --- a/frontend/test_project/features/api/test_feature.py +++ b/frontend/test_project/features/api/test_feature.py @@ -6,8 +6,6 @@ import pytest from selenium import webdriver -from selenium.webdriver.common.by import By -from time import sleep from main.frontend.common.step_definitions import open_base_url, maximize, page_title @@ -45,37 +43,6 @@ def test_send_post_request(request, api_response_container): ) -@pytest.mark.nondestructive -@pytest.mark.automated -@pytest.mark.hrmlogin -@pytest.mark.test_name("Login into OrangeHRM system and logout") -def test_login(): - logger.info( - "Scenario is started" - ) - chrome_driver.get('https://lambdatest.github.io/sample-todo-app/') - chrome_driver.maximize_window() - - title = chrome_driver.title - assert 'Sample page - lambdatest.com' in title - - first_checkbox = chrome_driver.find_element(By.XPATH, "//input[@name='li1']") - first_checkbox.click() - second_checkbox = chrome_driver.find_element(By.XPATH, "//input[@name='li2']") - second_checkbox.click() - field = chrome_driver.find_element(By.XPATH, "//input[@id='sampletodotext']") - field.send_keys("testing") - button = chrome_driver.find_element(By.XPATH, "//input[@id='addbutton']") - button.click() - result = chrome_driver.find_element(By.XPATH, "//li[6]/span[@class='done-false']").text - assert 'testing' in result - sleep(5) - chrome_driver.close() - logger.info( - "Scenario is completed successfully" - ) - - # A sample test to verify the open API call @pytest.mark.nondestructive @pytest.mark.automated