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
![image](https://private-user-images.githubusercontent.com/34313493/254467817-a13ee5a7-0c12-44f3-878a-2491fb11098f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkyMDk3ODQsIm5iZiI6MTcxOTIwOTQ4NCwicGF0aCI6Ii8zNDMxMzQ5My8yNTQ0Njc4MTctYTEzZWU1YTctMGMxMi00NGYzLTg3OGEtMjQ5MWZiMTEwOThmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI0VDA2MTEyNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUxMTU1ZGVkNWU3NDU2ZTU4OTQwOTJmNDJkNDdkNTQyZWJiZTJkNmUwNTgwNjRkODcxY2I1MDQ5M2I3MDI3MjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.UoAR7P2uCoTxlQizpnytSwo4jacGx8651ULJYgZA89g)
- 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`