scala-gatling

Gatling Scala:Unable to send auth token to the method using session variable

萝らか妹 提交于 2021-02-05 11:22:32
问题 It seems session variable used in below code is not able to pass the Token Type --> Bearer and access_token using session variable,here is the full code ,is it possible with you to have a look ,here is code provided ..no worries all tokens are dummy tokens as i haven changed before pasting code here.Test expects the login method to be executed first and then the CreatePrivateEvent method as the latter takes tokens from Login method hence i have written From Logs It looks Token Type --> Bearer

Injecting 0 users in scenario message during rampup users in gatling

余生长醉 提交于 2020-01-16 06:21:07
问题 I am using a simple setup to ramp up the users but getting the following error and the run is going on infinite loop code in my Scenario: setUp( scenarioBuilder.inject( rampUsers(numUser).during(duration minutes) ) ).protocols(protocolBuilder) Error message which goes infinite loop: 09:35:46.495 [GatlingSystem-akka.actor.default-dispatcher-2] DEBUG io.gatling.core.controller.inject.open.OpenWorkload - Injecting 0 users in scenario xxSimulation, continue=true 09:35:47.494 [GatlingSystem-akka

Gatling for loop inside inject

北城以北 提交于 2019-12-25 01:14:46
问题 I am new to Scala and Gatling so bear with me! I want to have a for loop inside inject where I can set how many times I want atOnceUsers() instead of just repeating the code x times, but this code is giving me an error so I was wondering if this way is not supported. val numTimes = 3 val scn = scenario("Some scenario").exec(someScenario) setUp( scn.inject( for (i <- 1 to numTimes) atOnceUsers(10) ).protocols(httpProtocol) ) 回答1: you're close... .inject takes an array of steps (which a

How do you use Gatling's checkIf method?

佐手、 提交于 2019-12-24 05:18:21
问题 Documented here, Gatling's checkIf method is intended for conditional checking. It's not available on ScenarioBuilder 's fluent API but I can see it in the CheckSupport class. I have scoured the internet and cannot find a single example. I'm using Gatling 2.3.1. 回答1: I found an example in their unit tests as follows: http("untypedCheckIf").get("/") .check( checkIf("${bool}") { jsonPath("$..foo") } ) 来源: https://stackoverflow.com/questions/51328868/how-do-you-use-gatlings-checkif-method

Custom DSL by extending Gatling: How to Scala?

南楼画角 提交于 2019-12-23 03:36:22
问题 We're using Gatling to load test our application (and it works great). We're attempting to DRY up some of the code by making composable extensions on the Gatling classes (like ScenarioBuilder / ChainBuilder / etc. found in io.gatling.core.structure). Here is an example of one of our scenarios: val scn = scenario("Whatever") .exec(Authentication.FeederLogin(userCsvFile, password)) .exec(User.ExtractId(User.SignIn())) .exec(FindPeople(50, "personIds")) // SPA load .exec(User.FetchLandingPageFor

Exctract data from encoded response in Gatling

跟風遠走 提交于 2019-12-11 14:38:01
问题 I have a problem with extracting data from one response, I check it in Fiddler and I get message that this response is encoded: https://i.postimg.cc/G3VfMtxh/2019-10-15-12-31-41-Progress-Telerik-Fiddler-Web-Debugger.png When I copy this content to https://jsonpath.com/ I see https://i.postimg.cc/rpYP4wh4/2019-10-14-22-41-19-jsonpath-online-evaluator.png So I tried to use regex, I checked it here https://regex101.com/ https://i.postimg.cc/DZ6m6RX1/2019-10-14-22-58-57-Online-regex-tester-and