Forum Discussion

MarkcSS's avatar
11 years ago

Dynamic JSON requests

Hi Guys,

Completely new to this so please bare with me, I am using SoapUI and LoadUI and making a simple TestSuite, importing it to LoadUI, that sends a JSON request to an endpoint logging it into a database and returning items that are present in the database with the same id. The only problem i am facing is that each JSON request:
{
"package": {
"tenant_id": 1,
"consignment_id":3,
"status": 1,
"package_id": 1,
"package_type":1,
"description":1,
"package_barcode":1,
"package_state":1
}
}

Updates the database with an item with consignment_id of 3 and returns each item with the same consignment_id. So when i get to 100 requests in my LoadUI test i am returning 100 responses of that same item. still with me? (This isnt good for my tests)

So is there a way to when making a JSON request change the information in the request? Maybe a script which dynamically creates a JSON with new information each time?

Then run that in LoadUI with a random user generator so each time there is a new JSON request and response?

Cheers,
Mark