Note: Please refer master branch for a stable code base. Other branches are for new addition / Code refactoring purpose only.
This is a multi module weather comparator project to compare weather attributes extracted from UI with API. The project has separate layers to independently run Automated test on UI as well as API. Executing the complete project does following,
- Creates Weather Object
- Run the UI automation suite
- Run the API automation suite
- Compares weather object attributes extracted from step 2 & 3.
UI Automation
- An automated UI testing suite written in cucumber BDD
API automation
- An automated API testing suite built using REST assured library
Object comparator
- A comparator module for Weather object which is extended to perform comparison based on magnitude of variance.
- This module can be extended to perform custom object comparison.
Object Model/Creator
- A Weather information data model created using simple Pojo's which produce object of type Weather.
- The attributes of this object can be
Temperature,Humidity,Wind, etc.
- The public weather API by https://openweathermap.org/
- Website - https://www.ndtv.com/
- Section - Weather
- Download and install intelliJ (https://www.jetbrains.com/idea/download/#section=mac)
- Clone this repo (Make sure you are on Master branch):
https://github.com/ShoaibShaikh-SSH/GUI-API-ComparatorAutomation.git
- Import cloned repo in step 2 as Maven project in IntelliJ:
- File->Import->Project from existing sources
- Choose
GUI-API-ComparatorAutomation->pom.xmland open as a project
- Install Maven. Run following command in terminal ->
brew install maven(Pre requisite: brew should be present in the system) - Install Allure. Run following command in terminal ->
brew install allure
Run Automated Tests of whole project - Separate UI & API automated tests along with Weather object comparator
- Navigate to 'GUI-API-ComparatorAutomation' folder from terminal window
- Run following command ->
mvn clean test
- From 'GUI-API-ComparatorAutomation' folder ->go to 'APImodule' / 'WeatherObjectComparator'-> navigate to 'target' folder from terminal
- Run following command ->
allure serve allure-results - An Allure report will open in browser with the last run report.
Navigate to 'GUI-API-ComparatorAutomation' -> 'UImodule' -> 'target' -> 'cucumber' & open index.html (Open in one of the browsers)
- Cucumber
- REST-assured
- Maven
- Junit5
- Allure Reports
- Java
- IntelliJ
- Git