HI All,
I am trying to connect to DB to fetch values form a table and use them as feed to my scenario. But I am getting the following error. Could someone please help resolving this issue?
object RecordSeqFeederBuilder is not a member of package io.gatling.core.feeder
`
class Extract_JDBC extends Simulation {
val s1 = new File(“src/test/resources/data/extractOP.csv”)
val url: String = “https://abc.com”
private val dbConnectionString = “jdbc:oracle:thin:>>>>>>”
private val sqlQuery = “SELECT DCN FROM …”
private val sqlUserName = “abc”
private val sqlPassword = “12345”
private val message = “${DCN}”
val sqlQueryFeeder: RecordSeqFeederBuilder[Any] = jdbcFeeder(dbConnectionString,
sqlUserName,
sqlPassword,
sqlQuery
)
//assigning base URL to a variable. we define the .baseURL() that will be prepended to all HTTP requests.
val httpProtocol = http.baseUrl(url)
//defining header for our http request. We can have multiple headers if our requests need different headers
val header = Map(
“Content-Type” → “application/soap+xml;charset=UTF-8”,
“Connection” → “alive”,
//“User-agent” → “Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0”)
“User-agent” → “Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko”) //-----For Internet Explorer
//“User-agent” → “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36”) //-----For Chrome
//defining object here to address our requests
object payload_myUHC{
val pl1 = scenario(“ExtractData”)
.feed(sqlQueryFeeder)
.exec(http(“Get_Obj_Id”)
.post("/wsi/")
.headers(header)
.check(status.is(200))
`