Questions tagged [scala-gatling]
426 questions
1
vote
1 answer
Gatling execute call in for-each loop using values from list stored in session
The point is to make call to service and collect all taxonomies id and no matter where to store them(Could be session or maybe java List. For now storing it in session because didnt find a way to store in java list).
And then based on this id…

rstkhldntsk1997
- 11
- 2
1
vote
1 answer
Gatling: Enable runMultipleSimulations
I have 30 simulations, and I don't want to crumble all of them into a single simulation file. So I created two files, Simulation1.scala and Simulation2.
The problem is when I try to run the command mvn gatling:test I receive the following error :…

Hosten
- 138
- 1
- 11
1
vote
0 answers
How to use gatling feed / foreach methods correctly?
I'm new in gatling/scala
The main idea of my scenario: I need to pass each item from some prepared List of String into the method, and check that response correct
so it's my scenario
object ForeachScenario extends Scenario {
override def…

Dmytro
- 65
- 1
- 6
1
vote
1 answer
Vector() in JSON string produced by JSON Feeder in Gatling
I am building my scenario like this:
val scene = scenario("testWebSocket").feed(jsonFileFeeder)
.exec(ws("openSocket").connect("")
.onConnected(exec(ws("sendMessage").sendText(StringBody("""{"jsonrpc": "${jsonrpc}", "method": "${method}",…

Jim
- 23
- 2
1
vote
1 answer
Using forEach() in Gatling
I have a scenario where I fetch some ItemBarcodes from Database. These are like this:
627729416990,627729416990,627729416990
I'm using split(",") to extract the individual items and saving it into Seq inside session.
.exec{
session =>…

Viv_Cham
- 31
- 3
1
vote
1 answer
How to create dynamic json using for loop in scala to pass in Gatling post request
I am new to scala ,Any help would be very much appreciated
I have a scala Map which has around 10 ids and 10 weights
Map(id->id,weight->weight)
For post request in gatling , i would like to pass my request on basis of for loop
Expected json: so for…

surbhi khare
- 19
- 4
1
vote
1 answer
How to read the last line in CSV line in GATLING
I use feeders from a csv file, and i want to read always the last line in this file:
val actors= csv("./src/test/resources/Data/ksp-acteurs.csv").circular
.feed(actors)
.exec(http("K_actors")
.get("https://URL/ksp-acteurs/${Col1}") …

youneshassani
- 11
- 2
1
vote
1 answer
How to start gatling scenario with feeder
I have simple scenario that tests single endpoint. I have problems with DSL. Can't figure out how to start scenario with feeder. I have to make useless call first in order to make it compile.
class GetDataSimulation extends Simulation {
val…

Capacytron
- 3,425
- 6
- 47
- 80
1
vote
1 answer
How to get request and response size in gatling
In Postman I can see request and response size
How do I get this in gatling ?
I need to validate the size.

shrusthip
- 85
- 1
- 10
1
vote
1 answer
Getting java.lang.ClassNotFoundException Gatling - when running Gatling
My Gating script is erroring with the below message:
java.lang.ClassNotFoundException: testSimulation
But I didn't do anything off and just followed the documentation. I get this error only on Jenkins, not directly on my machine. So I am thinking…

Sean
- 1,151
- 3
- 15
- 37
1
vote
1 answer
How to iterate over all files within a directory with Gatling?
I need to iterate over a number of files within a directory in order to perform a file upload with each of them. The directory resides in src/test/resources.
I understand Gatling’s file feeders, but I’m not seeing any that allow me to look up files…

ZacharyAKlein
- 633
- 4
- 9
1
vote
1 answer
When to use def and val on Gatling scenarios and chains
I come from a Java background and am taking over a Gatling project where I noticed what seems to me a bit of inconsistency when using what is a val or a def method. The picture below exemplifies that and I was wondering if there's any guidance on…

Francislainy Campos
- 3,462
- 4
- 33
- 81
1
vote
1 answer
How to increment counter in Gatling?
I am new to gatling, I am trying to implement a counter. I am calling a post service by iterating through list of ids and I need to check the status for each iteration and increment the counter variable when the status is 200. I am have below code…

har123
- 49
- 6
1
vote
1 answer
Gatling Required ChainBuilder Found B When ExitOnBlockOrFail. Method Exec Not Recognised
I am wondering why this code shows an error saying that it expects a ChainBuilder but found B, and what B actually is. I'm a few months now wondering about this issue since my code still compiles with it but I would love to remove this error if…

Francislainy Campos
- 3,462
- 4
- 33
- 81
1
vote
0 answers
Is there any way we can compare Gatling report stats with previous execution and compare for any significant degradation?
I have been using Gatling and have been able to cover a lot of simulations for our APIs. But I could not figure out if a given API is being degraded or not.
And the only way is to compare it with previous runs. What all options are there in Gatling…

vdrulerz
- 264
- 3
- 13