Skip to content

Commit

Permalink
Develop (#52)
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 attached with this PR?
  * [ ] Yes
  * [ ] No (Please explain why)

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

* Does the PR contain changes to modules shared with other teams?
* [ ] Yes (Needs approval from at least one of the other teams that use
the module)
  * [ ] No

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


### To be filled by the PR reviewer:

* [ ] Verify the attached run report passed in GitHub Actions (Justify
if local 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 21, 2024
2 parents 2898597 + e3fce88 commit cf04114
Show file tree
Hide file tree
Showing 42 changed files with 83 additions and 182 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ LICENSE export-ignore
screenshots export-ignore
scripts export-ignore
selenium_drivers export-ignore
install.sh export-ignore
env_install.sh export-ignore
install_scripts export-ignore
12 changes: 4 additions & 8 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@

* A brief description of the changes made -

* Do we have clean latest run report attached with this PR?
* 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 BP core file?
* [ ] Yes (Needs approval from at least 2 people)
* [ ] No

* Does the PR contain changes to modules shared with other teams?
* [ ] Yes (Needs approval from at least one of the other teams that use the module)
* Does the PR contain changes to any core file?
* [ ] Yes (Needs approval from at least 1 people)
* [ ] No

* Is it
Expand All @@ -21,7 +17,7 @@

### To be filled by the PR reviewer:

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

* General
* [ ] Use the best strategy to locate the elements
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/android_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
include:
- name: Android Mobile
tags: 'android_mobile_tests'
config_file: ./configs/android_mobile_BS.json
config_file: ./env_configs/android_mobile_BS.json
html_report: android-mobile
testrail_configuration_name: 'Samsung Galaxy S23 Ultra'

Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Setup dependencies
run: |
sh install.sh
sh setup_install.sh
- name: Run All Tests
run: |
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
id: setup_dependencies
if: steps.co_code.outcome == 'success'
run: |
sh install.sh
sh setup_install.sh
- name: Run Manual Job Tests
id: run_manual_job
Expand All @@ -139,7 +139,7 @@ jobs:
source $HOME/.bp-venv/bin/activate
python -m pytest -v --driver Appium \
--selenium-host '${{secrets.BROWSERSTACK_API_USERNAME}}:${{secrets.BROWSERSTACK_ACCESS_KEY}}@hub-cloud.browserstack.com' \
--variables './configs/android_mobile_BS.json' \
--variables './env_configs/android_mobile_BS.json' \
--tags="$TAGS" --html=report.html \
--self-contained-html
Expand Down
19 changes: 3 additions & 16 deletions .github/workflows/api_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Workflow for executing API tests
name: API Workflow

env:
Expand All @@ -16,30 +15,24 @@ on:
required: true
default: 'api'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
run-api-test-schedule:
if: github.event_name == 'schedule'
# The type of GH runner where the job will run on
name: API Regression
runs-on: ubuntu-latest
steps:
# Setup Python
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

# Checkout the latest code from the repo
- name: Check out code
uses: actions/checkout@v4

# Setup dependencies by running requirement.txt
- name: Setup dependencies
run: |
sh install.sh
sh setup_install.sh
# Execute tests. If test tag/s are provided while triggering manually it will pick that otherwise pick the default tags from Env section
- name: Run tests
run: |
if [ "${{ github.event.inputs.tags }}" != "" ]
Expand Down Expand Up @@ -74,7 +67,6 @@ jobs:
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: allure-history

# Upload html results as GH artifact
- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
Expand All @@ -91,22 +83,18 @@ jobs:
runs-on: ubuntu-latest
steps:

# Setup Python
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

# Checkout the latest code from the repo
- name: Check out code
uses: actions/checkout@v4

# Setup dependencies by running requirement.txt
- name: Setup dependencies
run: |
sh install.sh
sh setup_install.sh
# Execute tests. If test tag/s are provided while triggering manually it will pick that otherwise pick the default tags from Env section
- name: Run tests
run: |
if [ "${{ github.event.inputs.tags }}" != "" ]
Expand Down Expand Up @@ -141,7 +129,6 @@ jobs:
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: allure-history

# Upload html results as GH artifact
- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
Expand All @@ -150,4 +137,4 @@ jobs:
./*.html
./output/
./assets/
if: ${{ always() }}
if: ${{ always() }}
8 changes: 4 additions & 4 deletions .github/workflows/docker_android_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
id: setup_dependencies
if: steps.run_emulator.outcome == 'success'
run: |
sh install.sh
sh setup_install.sh
- name: Run Tests
id: run_manual_job
Expand All @@ -82,7 +82,7 @@ jobs:
env
source $HOME/.bp-venv/bin/activate
python -m pytest -v --driver Appium --selenium-host 'localhost' --selenium-port '4723' \
--variables './configs/android_mobile_docker.json' \
--variables './env_configs/android_mobile_docker.json' \
--tags="$TAGS" \
--html=report.html \
--self-contained-html \
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
id: setup_dependencies
if: steps.co_code.outcome == 'success'
run: |
sh install.sh
sh setup_install.sh
- name: Run Tests
id: run_manual_job
Expand All @@ -177,7 +177,7 @@ jobs:
env
source $HOME/.bp-venv/bin/activate
python -m pytest -v --driver Appium --selenium-host 'localhost' --selenium-port '4723' \
--variables './configs/android_mobile_docker.json' \
--variables './env_configs/android_mobile_docker.json' \
--tags="android_mobile_tests" \
--html=report.html \
--self-contained-html \
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docker_ios_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
id: setup_dependencies
if: steps.open_ios_simulator.outcome == 'success'
run: |
sh install.sh
sh setup_install.sh
- name: Run Tests
id: run_manual_job
Expand All @@ -77,7 +77,7 @@ jobs:
env
source $HOME/.bp-venv/bin/activate
python -m pytest -v --driver Appium --selenium-host 'localhost' --selenium-port '4723' \
--variables './configs/ios_mobile_docker.json' \
--variables './env_configs/ios_mobile_docker.json' \
--tags="$TAGS" \
--html=report.html \
--self-contained-html \
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
id: setup_dependencies
if: steps.open_ios_simulator.outcome == 'success'
run: |
sh install.sh
sh setup_install.sh
- name: Run Tests
id: run_manual_job
Expand All @@ -163,7 +163,7 @@ jobs:
env
source $HOME/.bp-venv/bin/activate
python -m pytest -v --driver Appium --selenium-host 'localhost' --selenium-port '4723' \
--variables './configs/ios_mobile_docker.json' \
--variables './env_configs/ios_mobile_docker.json' \
--tags="$TAGS" \
--html=report.html \
--self-contained-html \
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/docker_ui_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@ jobs:
- name: Linux Chrome
baseurl: https://opensource-demo.orangehrmlive.com
tags: web_tests
config_file: ./configs/docker_chrome.json
config_file: ./env_configs/docker_chrome.json
html_report: linux-chrome
concurrent_thread: 3

- name: Linux Firefox
baseurl: https://opensource-demo.orangehrmlive.com
tags: web_tests
config_file: ./configs/docker_firefox.json
config_file: ./env_configs/docker_firefox.json
html_report: linux-firefox
concurrent_thread: 3

- name: Linux Edge
baseurl: https://opensource-demo.orangehrmlive.com
tags: web_tests
config_file: ./configs/docker_edge.json
config_file: ./env_configs/docker_edge.json
html_report: linux-edge
concurrent_thread: 3

Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Setup dependencies
id: setup_dependencies
run: |
sh install.sh
sh setup_install.sh
- name: Run All Tests
if: steps.setup_dependencies.outcome == 'success'
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
id: setup_dependencies
if: steps.docker_compose.outcome == 'success'
run: |
sh install.sh
sh setup_install.sh
- name: Run Manual Job Tests
id: run_manual_job
Expand All @@ -203,14 +203,14 @@ jobs:
concurrent_thread=3
if [[ "${{ github.event.inputs.browser }}" == "chrome" ]]; then
BROWSER=./configs/docker_chrome.json
BROWSER=./env_configs/docker_chrome.json
fi
if [[ "${{ github.event.inputs.browser }}" == "firefox" ]]; then
BROWSER=./configs/docker_firefox.json
BROWSER=./env_configs/docker_firefox.json
fi
if [[ "${{ github.event.inputs.browser }}" == "edge" ]]; then
BROWSER=./configs/docker_edge.json
BROWSER=./env_configs/docker_edge.json
fi
env
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ios_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
include:
- name: IOS Mobile
tags: 'ios_mobile_test'
config_file: ./configs/ios_mobile_BS.json
config_file: ./env_configs/ios_mobile_BS.json
html_report: ios-mobile
testrail_configuration_name: 'iPhone 15 Plus'

Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Setup dependencies
run: |
sh install.sh
sh setup_install.sh
- name: Run All Tests
run: |
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
id: setup_dependencies
if: steps.co_code.outcome == 'success'
run: |
sh install.sh
sh setup_install.sh
- name: Run Manual Job Tests
id: run_manual_job
Expand All @@ -141,7 +141,7 @@ jobs:
source $HOME/.bp-venv/bin/activate
python -m pytest -v --driver Appium \
--selenium-host '${{secrets.BROWSERSTACK_API_USERNAME}}:${{secrets.BROWSERSTACK_ACCESS_KEY}}@hub-cloud.browserstack.com' \
--variables './configs/ios_mobile_BS.json' \
--variables './env_configs/ios_mobile_BS.json' \
--tags="$TAGS" --html=report.html \
--self-contained-html
Expand Down
Loading

0 comments on commit cf04114

Please sign in to comment.