Welcome to the repository for API testing of an online store using Rest Assured. This project is dedicated to ensuring the quality and reliability of various e-commerce functionalities through automated API testing.
The project structure is organized as follows:
src/main/java
: Contains the main source code for the API testing framework.models
: Includes model classes such asProduct.java
.trainingxyz
: Holds the main test classApiTests.java
.
src/test/resources
: Contains testing-related resource files..classpath
and.project
: Project configuration files.pom.xml
: Maven configuration file.
Here are some of the test cases included in the project:
getCategories
: Tests the endpoint for retrieving product categories and validates the response.getProduct
: Tests the endpoint for retrieving a product by ID and validates the response.createProduct
: Tests the endpoint for creating a new product and logs the response.updateProduct
: Tests the endpoint for updating a product and logs the response.deleteProduct
: Tests the endpoint for deleting a product and logs the response.createSerializedProduct
: Tests the endpoint for creating a new product using a serialized object.createSweatband
: Tests the endpoint for creating a sweatband product and logs the response.updateSweatBand
: Tests the endpoint for updating a sweatband product and logs the response.getSweatband
: Tests the endpoint for retrieving a sweatband product by ID and logs the response.deleteSweatband
: Tests the endpoint for deleting a sweatband product and logs the response.getProducts
: Tests the endpoint for retrieving all products and validates the response.getDeserializedProduct
: Tests the endpoint for retrieving a product and deserializes the response into an object.getMultiVitamins
: Tests the endpoint for retrieving multi-vitamins product and validates the response.
To get started with this API testing framework:
- Clone this repository to your local machine.
- Configure the project based on your testing environment and requirements.
- Install the necessary dependencies specified in
pom.xml
using Maven. - Run the desired test cases to perform API testing of the online store using Rest Assured.
This project relies on the following dependencies:
- Rest Assured
- JUnit
- Gson (for deserialization)
- Maven
Contributions to enhance the framework and test coverage are highly encouraged. If you have improvements or bug fixes to contribute, please fork the repository and submit pull requests.
This project is licensed under the MIT License.