What I am trying to do is to generate a feeder to give me email addresses in the form
testemail_00001@test.com
testemail_00002@test.com
…
testemail_20000@test.com
What I current have is
val feeder=Iterator.continually(Map("email"->("testemail_"+ (Random.nextInt(20000)+"@test.com"))))
That generates in the format
testemail_2324@test.com
testemail_312@test.com
So after looking through scala documentation, that suggests using lpad, but it appears that lpad is not supported in Gatling. So I’m currently got
val feeder=Iterator.continually(Map("email"->("testemail_" + (lpad(Random.nextInt(20000).toString, 5, 0) + "@test.com"))))
Which generates an error about unknown value lpad. Is there a better way of achieving leading zeros with gatling. I haven’t seen anything in the documentation for gatling that seems to deal with leading zeros outside of a println, which I don’ think will work with the above feeder structure.
Many thanks, Ian