From 21cc173dfdeef2c9d75ea42c9473ca81b43a5e59 Mon Sep 17 00:00:00 2001 From: Abhinav Goel Date: Thu, 18 Jul 2024 16:23:36 +1000 Subject: [PATCH] Update README.md --- README.md | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 98 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ceaae53..8070225 100644 --- a/README.md +++ b/README.md @@ -1 +1,98 @@ -# cba_api_framework \ No newline at end of file +# cba_api_framework +# Overview +This is a java and [rest-assured](https://rest-assured.io/) based test automation framework for the testing of web api's/microservices. +The build tool is [Maven](https://maven.apache.org/) and the [testng](https://testng.org/doc/) test automation framework is used for specifying, arranging and running the tests. +[Allure](https://docs.qameta.io/allure/) reporting is used to give a detailed overview of test result including steps with attached cURLs and response/request payloads. +This project helps test all GET, POST, PUT and DELETE API calls for teh Swagger Petstore API. + +## Prerequisites +1. Java 8 or higher +2. Maven 3.6 or higher +3. An IDE such as IntelliJ or Eclipse + +## Setup + +## Clone the repository +`````` +git clone https://github.com/goelabhinav/cba_api_framework.git +`````` +## Add Dependecies +```` + + + + io.rest-assured + rest-assured + 5.5.0 + test + + + + + org.testng + testng + 7.10.2 + test + + + + io.qameta.allure + allure-testng + 2.28.0 + + + + +```` +## Add Plugins +```` + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + + -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/1.9.22.1/aspectjweaver-1.9.22.1.jar" + + + + + + org.aspectj + aspectjweaver + 1.9.22.1 + + + + + +```` + +## Running Tests +You can run your tests using intelliJ straight away. +Or you can run with maven and view the Allure report. +``` +mvn clean test +``` +If you want to view the Allure report after: + +Download allure from github https://github.com/allure-framework/allure2/releases + +Copy the allure bin path where you have placed the allure unzipped file. In my case, it’s “D:\Allure\allure-2.17.3\allure-2.17.3\bin”. Select the “PATH” variable from system variables and click on Edit. Click on New in edit environment variables and paste the copied allure bin path. Save the settings. + +RUN THE ALLURE REPORTS: +``` +allure serve allure-results +``` +This will fire up the allure server and open the results in your default browser. + +This README provides a comprehensive guide to setting up and using the RestAssured API testing framework.