Selenium Tests using GitHub action
rahulbhave
Posted on December 6, 2021
My Workflow
This flow is created, to setup github action for running selenium Tests using headless chrome browser.
GitHub action steps:
I. Install dependencies-
name: Run Python Test
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Python 3
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
set -ex
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install msedge-selenium-tools
II. Run Tests
# Execute Test
- name: Run test
run: python -m pytest tests/test_form.py
Submission Category:
DIY Deployments
Yaml File:
name: Run Python Test
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Python 3
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
set -ex
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install msedge-selenium-tools
# Execute Test
- name: Run test
run: python -m pytest tests/test_form.py
💖 💪 🙅 🚩
rahulbhave
Posted on December 6, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.