Questions tagged [scala-gatling]

426 questions
2
votes
1 answer

Using Gatlin load testing, how do requests get classified as "KO?"

I am using https://gatling.io for load testing an application. I really appreciate the default reporting from the tool. After searching the documentation, it's not clear to me how particular requests get classified as "KO." (or not ok) We are…
Michael Rosario
  • 838
  • 1
  • 11
  • 26
2
votes
1 answer

Gatling token refresh heart beat

I'm trying to mimic a periodic token refresh. We have javascript code in our frontend that periodically checks if a token refresh needs to occur, and if so, issues a call to refresh the token. This is ran every couple minutes or so as long as…
CamHart
  • 3,825
  • 7
  • 33
  • 69
2
votes
1 answer

Why does Gatling stop simulation when any scenario exists and doesn't wait until the end?

Let's say I have this configuration val scn = (name: String) => scenario(name) .forever() { .exec(request) } setUp( scn("scn1").inject(atOnceUsers(1)) .throttle( jumpToRps(1), holdFor(10 seconds) ), …
user219882
  • 15,274
  • 23
  • 93
  • 138
2
votes
1 answer

Gatling.io share data between virtual users

I'm using Gatling.io to test a website. I have a scenario with multiple virtual users. val users = scenario("Users").exec(Session.browse) val admins = scenario("Admins").exec(Session.create) I want the admin user to create a "session" on the…
Shengis
  • 176
  • 1
  • 12
2
votes
1 answer

Build dynamic checks in Gatling

I'm looking to validate the response body dynamically. I have an endpoint which, depending on the user permissions, returns different bodies. For example: user: a { "one": "a", "two": "b" } user: b { "one": "a", "three": "c" } I know…
Rene Enriquez
  • 1,418
  • 1
  • 13
  • 33
2
votes
0 answers

Gatling doesnt replace dynamic params using feed

I have the follow gatling script: val wagerFeeder = csv("wagers.csv").random val placeBetScenario = scenario("request") .feed(wagerFeeder) .exec(http("send requests") .post(apiPlaceBet) .headers(sentHeaders) …
rayman
  • 20,786
  • 45
  • 148
  • 246
2
votes
1 answer

Gatling - Is there way to run multiple simulation files at the same

I have multiple simulation files testing multiple scenarios. I would like to run all of them at the same time in windows. Is there a programmatic or a commandline way to run all the simulations from each file
sam
  • 568
  • 1
  • 8
  • 16
2
votes
1 answer

Is there a recommended way to parameterise Gatling simulations?

I'd like to be able to run Gatling via SBT and parameterize the number of constant users per second and the total duration of the simulation. Something like: setUp(testScenario.inject(constantUsersPerSec() during(
Gabriel C
  • 1,012
  • 3
  • 12
  • 30
1
vote
1 answer

Gatling: Using userId from the Session API

I want to use a userId from the Session API inside my test. I could find this comment on the userId: "The userId is a simple sequence and is unique across users." It will work perfectly for me if it's a simple sequence since I want to use it as an…
1
vote
1 answer

How to run Karate and Gatling with Gradle build system for performance testing

I'm trying to run a Karate test as a Gatling performance test. I am being use Gradle however. When trying to run under Gradle the below disaster unfolds. Appreciate any ideas what might be causing KarateAction to crash. i have added Gatling…
1
vote
0 answers

Scala - Gatling check jsonPath if one element is gte another element

I have the following JSON response of an API which I want to test with Gatling (Scala) checks. running_event": { "event_name": "Running Event", "event_start_time": 1664127840, "event_end_time": 1665769440 } I need to check…
Sudipta Dhara
  • 608
  • 1
  • 5
  • 21
1
vote
1 answer

Why gatling project don't work with maven?

I am starting with gatling, I have a project with maven with the latest versions of gatling and scala, I have already checked all the parameterization within the ide I have changed versions and nothing works here show my pom.xml
1
vote
4 answers

How to generate 15 digit random number using Scala

I am new to Scala programming, I want to generate random number with 15 digits, So can you please let share some example. I have tried the below code to get the alpha number string with 10 digits. var ranstr = s"${(Random.alphanumeric take…
Quick learner
  • 699
  • 4
  • 22
  • 39
1
vote
0 answers

Gatling - have certain percent of users do specific flow

Is it possible in Gatling to have a scenario where 20% of users would do certain actions, 10% of users some other action, and 70% of users another different set of actions? I thought that randomSwitch does that, but I think it is not doing that. It…
mismas
  • 1,236
  • 5
  • 27
  • 55
1
vote
1 answer

Gatling. What would be the best way to pass feeder data to other functions?

I'm trying to write a load test for service. I want to build DeliveryObjects and publish them, each delivery must have a unique id. The problem I encounter is that I cant pass variables from the session to a function that I wrote (I know the…