Google Geolocation API Automation using BDD in Cucumber and Rest Assured for API Tests
- Java JDK 17.0.8
- Maven 3.9.6
- IDE (IntelliJ IDEA, Eclipse, etc.)
-
Clone the repository:
git clone https://github.com/NamanKhurana/GeolocationAPITests_BDD_RestAssured.git
-
Navigate to the project directory:
cd GeolocationAPITests_BDD_RestAssured
-
Install the dependencies:
mvn clean install
GeolocationAPITests_BDD_RestAssured
|-- src
|
|-- test
|
|-- java
| |-- runners
| | |-- TestRunner
| |
| |-- stepDefinitions
| |
| |-- utils
|
|-- resources
|-- features
| |-- ValidateEdgeCases.feature
| |-- ValidateNegativeCases.feature
| |-- ValidatePositiveCases.feature
|
|-- responseData
|
|-- testData
|
|-- config.properties
|
|-- extent.properties
/src/test/resources/config.properties
: Contains the configuration settings such as the API endpoint, API key, and other necessary parameters./src/test/resources/extent.properties
: Configuration for ExtentReports for generating test reports.
Important: Make sure to update the API key in config.properties
before running the test suite. Failure to do so may result in authentication errors or failed tests.
To run the tests, use the following command:
mvn test