csv feeder file is detected but the values are not pulled run time

Hi,

I am running into an issue where the content of csv file is not getting substituted in the actual http request in spite of file is found.( I have confirmed the file path and existence to be sure by faking the path and name which resulted in Caused by: java.lang.IllegalArgumentException: Could not locate feeder file: Resource users1.csv not found.)

error:

Simulation com.qa.desktop.simulations.SEOUserSimulation started…
20:27:36.138 [ERROR] i.g.h.a.HttpRequestAction - ‘httpRequest-3’ failed to execute: No attribute named ‘urls’ is defined

I have attached the whole set of scripts for anyone to take a look and help further.

Thanks,
Vijay

urls.csv

urls
mail
imghp
webhp

gatling.conf (enabled the resources directory and added data at the end)

resources = user-files/resources/data
package com.qa.desktop.requests

import io.gatling.core.Predef._
import io.gatling.http.Predef._

object SEORequest {

  val urlsFeeder = csv ("data/urls.csv")

  val check_seo_urls_feeder = exec(http("Login user request")
    .get("${urls}")).feed(urlsFeeder)
}

qa-gatling-framework.zip (99.1 KB)

Order…

@slandelle, could you help me with re-ordering the code?

i tried keeping the feed outside of the exec, but no luck.

feed(urlsFeeder) should have done before http("Login user request")

Hi Pujitha,

thanks for your response. In fact I have tried that but end result is same.

Simulation com.qa.desktop.simulations.SEOUserSimulation started…
11:09:12.811 [ERROR] i.g.h.a.HttpRequestAction - ‘httpRequest-1’ failed to execute: No attribute named ‘urls’ is defined

package com.qa.desktop.requests

import io.gatling.core.Predef._
import io.gatling.http.Predef._

object SEORequest {

  val urlsFeeder = csv ("data/urls.csv")

  feed(urlsFeeder)
  val check_seo_urls_feeder = exec(http("Login user request")
    .get("${urls}"))
}

@Stepahne Landelle - is that something you could help me here?

Thanks in advance.

-Vijay

.feed needs to be a part of the chain…

val check_seo_urls_feeder = feed(urlsFeeder)
.exec(
http(“Login user request”)
.get("${urls}")
)

thanks a lot James, that fixed the issue.

appreciate your help!

-Vijay