API AUTOMATION FRAMEWORK - FANCODE

API Automation Framework for the given problem statement

Problem Statement

Task : To Automate the Below Scenario.

Scenario :- All the users of City FanCode should have more than half of their todos task completed.

Given User has the todo tasks

And User belongs to the city FanCode

Then User Completed task percentage should be greater than 50%

Note :-

  • You can use any language to write api automation/Framework.
  • Fancode City can be identified by lat between ( -40 to 5) and long between ( 5 to 100) in users api

Prerequisites

Before using this framework, ensure that you have following installed on you machine:

  • Java Development Kit (JDK)
  • Java Version 17
  • Maven Build tool
  • Eclipse or IntelliJ any Integrated Development Environment (IDE)
  • Git

Setup

  1. Clone the repository on local machine
git clone https://github.com/akash19jain/fanCodeSDET.git
  1. Open the project in your preferred IDE

  2. Build the project using Maven to resolve the dependencies

    mvn clean install

Running Test

  1. Navigate to the testng.xml file under src/test/resources/suites/testng.xml and then Right Click on it select Run.

Result

Once we run the test we can view the result of the test Run along with a report and the logs.

  • The result can be viewed in the console tab along with all the logged messages and the overall result.
  • A HTML report will be generated under reports folder. Open the file on any browser to view the HTML report.
  • A log file is also generated under logs folder.

Images

CONSOLE RUN

Screenshot 2024-09-28 at 4 35 16 PM

HTML REPORT

Screenshot 2024-09-28 at 4 17 52 PM

LOGS

Screenshot 2024-09-28 at 4 23 40 PM

Tools and Technologies used

  • Java
  • Maven
  • Intellij
  • Rest Assured
  • TestNG
  • Lombok
  • Log4j2
  • Extent Reports
  • Jackson API

UML Diagram

Screenshot 2024-09-28 at 3 54 42 PM