Writing Feeder value to a file

I have a scenario, something like this:

  1. Create user using id generated from Feeder, it’s a Dynamic Feeder
  2. Do some stuff
  3. Search other users by Ids. Ids is a type of list

I’m having trouble with implementing the step 3.

Since the Id are dynamically generated, I need a way to capture these Ids somewhere , may be to a file and use them in Step 3. I could n’t figure out how to write Ids generated by Feeder into a File.

Tried the following, but could not get this working. ${userId} is not evaluated correctly at the writer.println, the same when used in http get call it’s being evaluated properly. Any thoughts?

val writer = {

val fos = new java.io.FileOutputStream(“data/test-data.txt”)

new java.io.PrintWriter(fos,true)

}

.exec(session => {

writer.println(“userId :” + “${userId}” )

session

}

Hi,

I have the exact same problem. Could you please say if you could solve the issue somehow? highly appreciated…

Srinivas

.exec(session => {

val userId = session(“userId”).as[String]

writer.println(“userId :” + userId )

session

}