Solving Test Data Chaos in Performance Testing with Redis
Thank you so much for stopping by to read this article !
I will be sharing my experience and insights on a recent performance testing engagement I had with a NSW government client, where I elevated the test data management process using Redis. I chose Redis but there are other tools available that could do similar jobs.
My company was engaged to deliver performance testing services for NSW Government client. I was appointed to that project.
This was one of those rare projects where performance testing wasn’t just a checkbox at the end, it was genuinely seen as critical to the success of the entire project. In fact, the application performance was so important that it was one of the key success factors for the whole project. So application has to handle certain load with response time SLAs.
To add more pressure, since ,I was managing key event of high profile Government Client ! the go-live date was fixed, completely immovable.! So not only was performance crucial, but the timelines were extremely tight, with absolutely no room for slippage.
Though this is common pressure for testers!
There was no budget for commercial performance testing tools, and no in-house tooling I could rely on. So bottom line is :
Client wanted champagne solution with beer budget !!
So, I was looking at a high-stakes situation: tight deadlines, critical performance requirements, and zero money for tooling.
Welcome to the world of performance testing! I am sure everyone of you has gone through this situation !
Given the constraints, I opted for JMeter—the most widely adopted open-source tool for performance testing. However, our testing scenario involved a complex scripting structure. For instance, one script would generate data that another script had to use in real time. Each virtual user required unique data, and once a data record was used, it couldn’t be reused.
With traditional parameterization approaches, managing this kind of data flow—and visualizing it—was both difficult and time-consuming. So, I needed to produce a solution that could effectively handle real-time test data coordination and visualization.
After fair study , I came to know that Redis and VTS are the best tools available in market for test data management and visualization !
Both VTS and Redis are opensource. VTS does work very well with Loadrunner . But I chose Redis and with a little bit of custom scripts I found I could use Redis with Jmeter quite easily as there is Redis and Jmeter Plugin readily available.
Issues With traditional Parameterization Techniques :
What Is Redis DB ?
Example of a Education sector application where Parent , Admin , Student Scripts are passing data to each other through Redis. Here Redis is central repository of test data. Scripts can write data to Redis and read data from Redis .
How to setup Redis ?
Here I have used Docker as a preliminary solution for setting up my Redis.
2. Flask API (Port 5000)
3. Redis (Port 6379)
Recommended by LinkedIn
4. JMeter
5. RedisInsight : is used for live inspection and debugging during tests
In docker compose file write " volumes: - redis-data:/data" to make data persistent even though docker is shut down.
We can use RPOP method to remove the data from the Redis as soon as it is read.
We can use flask +python + rpush method to write either bulk CSV data or real time script generated parameter to Redis which can be used by your scripts.
Flush DB (FLUSHALL) before/after tests to avoid stale data.
Below is the example of my Redis Project which I have setup for this walkthrough.
Below are important steps required to be implemented if you want to use Redis with JMeter.
Important URLs :
After installing Redis Data Plug-in from JMeter Plug-in manager , add Redis Data Set to your Test Plan.
Below is the example of my Redis Project which I have setup for this walkthrough.
While configuring Redis Data Set , Maintain the same sequence of Variable names as you have maintained in Redis DB.
Conclusion
We successfully completed the NSW Government Project with economically efficient solution. Redis ensured unique, isolated data access for thousands of concurrent virtual users during test runs !!
Please feel free to ask any question related to implementation.
Thank you so much !!
#Redis #JMter #Testdatamanagement #testdata #manage
Awesome Vidula 👏👏