Selenium (Page Object Model) Automation Framework using PyTest
Browser supported : Chrome , FireFox, IE
SETUP
Steps to Set up the Framework on Local Repository
-
Checkout the repository from GIT by below command
-- git clone https://github.com/amits0003/PytestAutomationAssignment.git
-
open the repository in PyCharm / any other IDE and then navigate to Terminal
-
Create a virtual Environment by typing below command in the terminal
python3 -m venv venv
or,
python -m venv venv
(any of the above command will run as per sysytem's python installation property
There are two ways to install the required libraries into the virtual environment
1. Close the terminal and then again open the terminal (a virtual environment should be loaded in the terminal already)
then type the below command
pip install -r requirements.txt
2. type the below command to install the libraries in to the virtual environemnt
python setup.py install
or
python3 setup.py install
Now the Environment set up is completed...
Steps to Run the Test Scripts -
Pre-Requisites - Make Sure that the Python 3.8 is installed in the Local System.
- Clone the Directory to a Folder
- Activate the Virtual Environment using "python -m venv venv"
- activate terminal to the root folder of the project.
- Install the requirements using "pip install -r requirements.txt"
** Running the individual test Scripts **
- navigate to the test Script folder
- Run the individual test scripts using "pytest test_DDLCommands.py --html='output_1.html' "
- similarly run the test from all the other files
** Running all the test Scripts using run_test.py file **
- Navigate to the testRunner folder in command terminal
- run the command "python run_test.py"
this way all the test will be executed and their html report will be saved to the test folder.