Website Automation framework for Insomnia cookies.
-
Installation process
1.1 Pycharm IDE 1.2 Allure reporting library 1.4 Pip
Import the code in Pycharm IDE and start off with coding
-
Software dependencies
2.1 All software dependencies are present in requirements.txt present in the same repository
- Import the code in Pycharm IDE.
- Go to Settings > Tools > Python Integrated Tools
- Go to Package requirements file
- Browse the location of requirements.txt file present in the repository and click OK.
- Install the dependencies by clicking on Install requirements.
- Go to Add Configuration
- Select pytest from the dropdown
- Set the location of the Testcase file starting with "test_" in the Target field.
- Provide the additional arguments such as (-S <server_name> , -m <markers_to_be_executed>, -n <number_of_parallel_threads> ,-O <os_name> --alluredir =<path_to_results>)
- The testcases can also be run from commandline using py.test <path_to_testcases>
- After merge command: pytest -s TestCases -v -m regression/smoke -S "web.stage"
-
Create a directory for collecting the Allure reports
-
Add the following argument when running the tests:
--alluredir=<allure_directory_path>
-
After finishing running the tests, run the following command:
allure serve <allure_directory_path>
- Installation process
- Download and install Docker
- You must have docker credentials in order to use docker containers (Free)
- Configuration:
We use docker-compose to create our environment. In order to properly run test we need to update the
devops/docker-compose.yml
- Makefile
- With Makefile you will need to run
make build
to build the environment
- With Makefile you will need to run
- Download and install Docker
- Be sure containers are running
- Makefile
make start
- Start/Verify containers are runningmake tests
- Run All testsmake single_run
- Run all test (start and stop e2e-container automatically, reports are generated)
- Reports are generated and can be viewed om in the
allure
andjunit
folder. - Makefile
- To run a single test use the following command
docker-compose -f Devops/docker-compose.yml exec -T e2e-tests pytest -O Linux -n 1 -U "<URL>" <Test> -H "True" --junitxml=junit/test-results.xml --alluredir=allure
- Docker container is always running. if Command Entered into docker compose after the command executes the container will shutdown.
- selenium session hub:
- To view active selenium sessions
- `http://{localIPAddress}:4444/wd/hub/static/resource/hub.html`