The current project is a test project executed due to the Robot Framework.
The project used the commonly used design patterns like Page object, Page element, Loadable component, Lib provider, Steps.
The project has multilayer structure:
framework
- used to keep custom libraries that can be reused in any other projectsoutput
- used to keep test reportssample
- sample is project for illustrating how we can use more than one project in reporesources
- used to keep keywords that can be used only in current projectstests
- contains tests
weather
- main projectdata
- used to keep variableslib
- used to keep specific librariesresources
- used to keep keywords that can be used only in current projectsapi
- used to keep keywords for API callspages
- used to keep keywords related to specific pagessteps
- used to keep keywords related actions which used in tests
tests
- contains testsAPI
- which runs via APIE2E
- which runs via API and UI bothUI
- which runs via UI
.
├── framework
├── output
├── sample
│ ├── resources
│ └── tests
└── weather
├── data
├── lib
├── resources
│ ├── api
│ │ ├── endpoints
│ │ └── steps
│ ├── pages
│ └── steps
└── tests
├── API
├── E2E
├── UI
The project interactions between layers is displayed on the next scheme:
The TESTS layer can interact with the DATA, PAGES (API), and STEPS layers. The gray arrow from STEPS to ROBOT LIBS means that the Log keyword of the robot framework can be used for logging. Any other direct interaction with ROBOT LIBS from STEPS is limited.
The STEPS layer can interact with the PAGES (API) and ROBOT LIBS layers.
The PAGES layer includes sublayers PAGES (an entity of Page object pattern) and API sublayer. Can interact with FRAMEWORK, ROBOT LIBS, LIB, and DATA layers.
The project has the next dependencies in the requirements file
-
Install browser driver
For this project, used only the chromedriver. Go to https://chromedriver.chromium.org/downloads and download the latest chromedriver. And also make sure that the Chrome version on your computer is updated to the latest version. Now place the driver file in a folder anywhere on your machine and add the path in the.bash_profile
file or.zshrc
file if you use it. -
Clone project to your PC by the following command:
git clone https://github.com/andreynav/weather.git
- Open the root of the project with the requirements file specified and run the following command:
pip install -r requirements.txt
To run tests, open the root of the project and run the following command:
robot -d output -L TRACE tests/
flag -d
points the output report directory
flag -L
points the output report level
The project is open source software provided under the Apache License 2.0.