Jmeter-Extract data using Postprocessor Part-I

Jmeter-Extract data using Postprocessor Part-I

Jmeter is used to perform load testing. I have already discussed how it is easier and how can we use Jmeter in my earlier blogs. So let’s move some common pro

I have written my fair share of RESTful API but am no expert by any measure. I had never given enough thought about the HTTP Verbs I should be using (like, PUT, POST, PATCH) while writing API. If a resource had to be created, I would automatically go for POST (never considered the idempoten_cy _angle at all) and if a resource had to be modified, I would go for PATCH.

On one of my API assignments, I decided to make a very conscious and deliberated choice of the verbs I will be using; and an API in particular got me thinking.

I had to write an API to modify a resource and this resource happened to have nested resources and numerous attributes. I soon realized that it wasn’t so straight forward to create an elegant PATCH API due to the sheer number of attributes on this resource that can potentially get modified (Why did you design a resource with so many attributes in the first place? you might ask. But that is a topic for another day)

So, coming back to the task in hand, I was aware of only two choices to go about writing a PATCH call. Either, send just the attributes requiring modifications to the API (Approach 1) or end the entire resource to API after making changes to the necessary attributes at consumers’ end (Approach 2). We will examine both the approaches in the context of the below two classes (Employee and Address)

public class Employee


  public int EmployeeId {get; set;}

  public string EmployeeName {get; set;}

  public Address EmployeeAddress {get; set;}

  public string WorkLocation {get; set;}

  public List<string> PreferredWorkLocations {get; set;}


public class EmployeeAddress


  public string HouseNumber {get; set;}

  public string AddressLine1 {get; set;}

  public string AddressLine2 {get; set;}


_Approach 1: _The consumer of the PATCH API will send the entire resource, after changing a few select attribute that need to be modified. At the API end, the PATCH payload will be handed over to the repository layer which would then update the entire resource to the database. Other than some basic validations, no additional work is needed at the API end. A sample PATCH call (almost a PUT) would look like below



  "EmployeeName" : "ename",

  "EmployeeAddress" : {

       "HouseNumber" : "F32",

       "AddressLine1" : "Addr1",

       "AddressLine2" : "Addr2"


  "WorkLocation" : "Brazil",

  "PreferredWorkLocations" : ["Brazil","France"]


loadtesting quality assessment (qa) scala testing extractdata jmeter json postprocessor

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Combining Gatling Reports

In this blog, we shall discuss about the report generation through Gatling and combining Gatling Reports. As you may already know, when we run a Gatling test the report gets generated automatically.

Karate DSL : Getting started

This is a short blog on how to setup a maven project in karate DSL and small introduction to it's directory and file structure. So let's start with,

Recording of Jmeter Script Part-2

Here in this blog, we will learn the 2nd way of Jmeter request recording-Using Jmeter Proxy.

How Easier the Performance Testing with Jmeter.

Many developers were struggling with HP LoadRunner/Performance Center. To overcome these difficulties, it’s important to utilize easy to use testing tools.

Software Testing Company. QA & Software Testing Services | TestFort

TestFort is the leading QA & software testing company with 18+ years of experience, has been providing a full range of QA & software testing services: manual and automated testing, QA outsourcing and QA consulting. Dedicated team of certified QA engineers can help achieve world-class quality in your projects.