How to add random string in Json???


I am new to gatling and I want to add the Random string to json every time…Because my api will not support the same title of post every time…So for that I have to add
some random string every time…How to add???please help me…Here I am giving the brief info of my code

val TestRequest: String = new JSONObject(Map(“title” → “Gatling Stress Test”,“description” → “Gatling is a highly capable stress testing tool.”)).toString()

.body(new StringBody(TestRequest))

So for title I have to add random string for each user every time…How to do that???Please suggest other than the values from session…


Here is an article that describes how to create random strings in scala

Create the string and set in session. In your exec chain builder call the variable.

Gatling documentation and this forum has everything that you need.

Thanks…its working…