title: gatling and csv ( fetching data from csv)
body: <p>I am working to create a gatling test that would fetch data from a csv. My test is a survey with one question and user picks one option as an answer. It says the test passed but I do not see the option being selected on the survey (It works fine without csv). Here is my sample code:</p>
  
  <pre><code> val uri = """http://localhost:8090/test"""    
  val onlyone = csv("onlyone.csv").queue    
      val scn = scenario("onlyone")    
          .exec(http("request_0")
              .get("""/test/login""")
              .headers(headers_0))
          .pause(13)
          .feed(onlyone)
          .exec(http("request_1")
              .post("""/test/login-check""")
              .headers(headers_0)
              .formParam("""j_username""", """${username}""")
              .formParam("""j_password""", """${password}"""))
          .pause(4)
          .exec(http("request_36")
              .get("""/test/land/survey/view/${sid}""")
              .headers(headers_0))
          .pause(3)
          .exec(
              http("request_101")
              .post(uri + """/land/survey/showQuestion?mapping=app""")
              .headers(headers_2)
              .body(RawFileBody("onlyone_request_0101.txt"))) 
          .pause(3)
              .exec(http("request_133")
              .post(uri + """/land/survey/saveQuestion?mapping=app""")
              .headers(headers_2)
              .body(RawFileBody("onlyone_request_0133.txt")))
          .pause(4)
  
      setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)
  }
  </code></pre>
  
  <p>My csv file has</p>
  
  <pre><code>username,password,sid,qid,q1,a1
  user1,testpwd1,1234567,2345678,3456789,4567890
  </code></pre>
  
  <p>And these are the contents of the request bodies</p>
  
  <pre><code>request_101: {"questionText":"only one","id":"${q1}"}
  request_133: {"questionText":"only one","id":"${q1}","selectedOption":"${a1}"}
  </code></pre>
  
  <p>Please help me to find out what did I miss and where. Thank you!</p>