RestSharp Extent API Automation Framework

Dhirendra Kumar Jha
2 min readAug 2, 2020

A basic framework which is created using the below tools to perform the API Automation —
1. RestSharp (https://restsharp.dev/)
2. NUnit
3. ExtentReports
4. DotNet (C#)

Clone the project from location — RestSharpNUnitExtentFramework and import into the Visual Studio.
Now you are ready to execute the sample test and get the reports.

Configuration Used in Framework
1. Used Class Library (.Net Framework) project

2. Used following NuGet packages in the same order as mentioned below
RestSharp.106.11.4 =>For rest methods (Get, Post, Put, Delete)
NUnit.3.12.0 =>For Scripts Execution
ExtentReports.4.0.3 => For Generating the report
System.Configuration.ConfigurationManager 4.7.0 => For reading App.config file
3. Framework Folder Structure —

4. Test Execution Configuration — Need to update Parameters in App.config
<appSettings>
<add key=”baseurl” value=”https://reqres.in" />
<add key=”PROJECTNAME” value=”API Automation” />
<add key=”REPORTNAME” value=”API Automation” />
<add key=”REPORTSERVER” value=”false” />
</appSettings>

5. Test Scripts Execution— From Menu, select Test->Windows->Test Explorer

6. Test Execution Reports (Available under Reports Folder) —

Test Wise Execution
Tag Wise Execution
Dashboard

You can find the video of this demo at location — FrameworkVideo

--

--