Skip to content

Commit

Permalink
Develop (#64)
Browse files Browse the repository at this point in the history
### To be filled by the PR creator:

* A brief description of the changes made - 

* Do we have clean latest run report (Docker or Browserstack) attached
with this PR?
  * [ ] Yes
  * [ ] No (Please explain why)

* Does the PR contain changes to any core file?
  * [ ] Yes (Needs approval from at least 1 people)
  * [ ] No

* Is it
  * [ ] New Testcase
  * [ ] Fix


### To be filled by the PR reviewer:

* [ ] Verify the attached run report passed in GitHub Actions (Docker or
Browserstack run)

* General
    * [ ] Use the best strategy to locate the elements
    * [ ] Comments wherever the code is not readable by itself
    * [ ] Use of the right data structure for the use case
    * [ ] Reuse logic/functionality as much as possible
    * [ ] Cleanup of any test data that is generated by the tests
    * [ ] No static waits
  • Loading branch information
Tauqir Sarwar authored Mar 22, 2024
2 parents eff2237 + 0742353 commit a9d993d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/ui_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ jobs:
tags: web_tests
config_file: ./env_configs/win_chrome.json
html_report: win-chrome
concurrent_thread: 2
testrail_configuration_name: 'Chrome, Windows'
testrail_run_name: 'Desktop Chrome'

Expand All @@ -74,7 +73,6 @@ jobs:
tags: web_tests
config_file: ./env_configs/win_firefox.json
html_report: win-firefox
concurrent_thread: 2
testrail_configuration_name: 'Firefox, Windows'
testrail_run_name: 'Desktop Firefox'

Expand All @@ -83,7 +81,6 @@ jobs:
tags: web_tests
config_file: ./env_configs/win_edge.json
html_report: win-edge
concurrent_thread: 2
testrail_configuration_name: 'Edge, Windows'
testrail_run_name: 'Desktop Edge'

Expand All @@ -92,7 +89,6 @@ jobs:
tags: web_tests
config_file: ./env_configs/mac_firefox.json
html_report: mac-firefox
concurrent_thread: 2
testrail_configuration_name: 'Firefox, MacOS'
testrail_run_name: 'MAC Desktop Chrome'

Expand All @@ -101,7 +97,6 @@ jobs:
tags: web_tests
config_file: ./env_configs/mac_chrome.json
html_report: mac-chrome
concurrent_thread: 2
testrail_configuration_name: 'Chrome, MacOS'
testrail_run_name: 'MAC Desktop Chrome'

Expand All @@ -110,7 +105,6 @@ jobs:
tags: web_tests
config_file: ./env_configs/mac_edge.json
html_report: mac-edge
concurrent_thread: 2
testrail_configuration_name: 'Edge, MacOS'
testrail_run_name: 'MAC Desktop Edge'

Expand All @@ -119,7 +113,6 @@ jobs:
tags: web_tests
config_file: ./env_configs/mac_safari.json
html_report: mac-safari
concurrent_thread: 2
testrail_configuration_name: 'Safari, MacOS'
testrail_run_name: 'MAC Desktop Safari'

Expand All @@ -128,7 +121,6 @@ jobs:
tags: visual
config_file: ./env_configs/mac_chrome.json
html_report: mac-chrome-visual
concurrent_thread: 2
testrail_configuration_name: 'Chrome, MacOS'
testrail_run_name: 'MAC Desktop Chrome Visual'

Expand Down Expand Up @@ -163,7 +155,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 }}" "$TAGS" "${{secrets.SLACK_WEBHOOK_URL}}" "${{secrets.TEAMS_WEBHOOK_URL}}" "$BASE_URL" $concurrent_thread
sh ci_run_web.sh ${{secrets.BROWSERSTACK_API_USERNAME}} ${{secrets.BROWSERSTACK_ACCESS_KEY}} "${{ matrix.config_file }}" "$TAGS" "${{secrets.SLACK_WEBHOOK_URL}}" "${{secrets.TEAMS_WEBHOOK_URL}}" "$BASE_URL"
# --pytest-testrail-export-test-results \
# --testrail-project-id "${{ env.TESTRAIL_PROJECT_ID }}" \
# --pytest-testrail-test-plan-id "${{ env.TEST_PLAN_ID }}" \
Expand Down Expand Up @@ -295,7 +287,6 @@ jobs:
BASE_URL="${{ github.event.inputs.baseurl }}"
fi
concurrent_thread=2
if [[ "${{ github.event.inputs.browser }}" == "chrome" && "${{ github.event.inputs.os }}" == "window" ]]; then
BROWSER=./env_configs/win_chrome.json
Expand All @@ -318,7 +309,7 @@ jobs:
env
source $HOME/.bp-venv/bin/activate
sh ci_run_web.sh ${{secrets.BROWSERSTACK_API_USERNAME}} ${{secrets.BROWSERSTACK_ACCESS_KEY}} "$BROWSER" "$TAGS" "${{secrets.SLACK_WEBHOOK_URL}}" "${{secrets.TEAMS_WEBHOOK_URL}}" "$BASE_URL" $concurrent_thread
sh ci_run_web.sh ${{secrets.BROWSERSTACK_API_USERNAME}} ${{secrets.BROWSERSTACK_ACCESS_KEY}} "$BROWSER" "$TAGS" "${{secrets.SLACK_WEBHOOK_URL}}" "${{secrets.TEAMS_WEBHOOK_URL}}" "$BASE_URL"
- name: BrowserStackLocal Stop
uses: browserstack/github-actions/setup-local@master
Expand Down
4 changes: 2 additions & 2 deletions ci_run_web.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

# Run Web tests
python -m pytest -v -s --gherkin-terminal-reporter --driver=Remote --selenium-host $1':'$2'@hub-cloud.browserstack.com' --variables=$3 --html="./output/reports/" \
python -m pytest -v -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 --slack-webhook-url=$5 --slack-channel=pytest-test-automation \
--slack-results-url=https://tweag.github.io/pytest-automation-boilerplate --teams-webhook-url=$6 \
--teams-results-url=https://tweag.github.io/pytest-automation-boilerplate --base-url=$7 -n=$8
--teams-results-url=https://tweag.github.io/pytest-automation-boilerplate --base-url=$7

0 comments on commit a9d993d

Please sign in to comment.