gatling

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

Using a feeder to pass in header values (Gatling)

巧了我就是萌 提交于 2019-12-11 10:55:22
问题 I'm attempting to use gatling against a server that uses HAWK Authentication. The issue is that the header needs to be generated for each request and pass in the key id and key. Which makes sending requests from multiple users hard. I've gotten this Hawk java library working with hard coded keys. However, I'd like to simulate multiple users using a feeder. I can't seem to get this working as the feeders aren't properly passed into function calls. I have the following code: class

Simple feeder in Gatling without using a csv file

老子叫甜甜 提交于 2019-12-11 10:05:50
问题 How can I create a simple feeder in Gatling without using a csv file? I have tried scripts from the Gatling documentation. I have seen one example in the documentation val random = new util.Random val feeder = Iterator.continually(Map("email" -> random.nextString(20) + "@foo.com")) I don't understand the above code. I tried a script with a feeder that uses a csv file and was executed successfully. Instead of feeding data from a csv file, how do I write a feeder that can take a defined value.

Main class not found when using Manifest jar with JavaExec in Gradle

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 08:56:57
问题 I have the below gradle script from the Jhipster framework. It is used to run Gatling tests and due to the command line limit on windows I have tried using a manifest only jar approach. A detailed discussion regarding this can be found here Jhipster issue But the below script seems to generate the Manifest jar properly but JavaExec is unable to find the main class, some pointer on this would be really helpfull. A console log of error is below as well I have posted this on the gradle forum

How to run multiple Gatling simulations in a sequence (sequence will be provides by us)

若如初见. 提交于 2019-12-11 07:35:50
问题 When I run Gatling from my command prompt I get a list of simulations like this: Choose a simulation number: 1,2,3,4 When I type 3 third simulation will run but this sequence is auto-generated.Suppose I want to list them according to my wish like: 3,2,1,4 Is it possible to give user defined sequence for simulations list.If yes how it is possible? 回答1: As far as I know there is no possibility in Gatling to provide sequence of simulations. You can achieve this by writing for example bash script

Getting the String out of a Gatling expression

◇◆丶佛笑我妖孽 提交于 2019-12-11 07:09:01
问题 I want to write a function to format Vaadin messages. These messages have the format 108|0ff1255e-e2be-4e7b-ac5c-1ff2709ce886[["0_11_12_13_login_username","v","v",["text",["s","Agent00232"]]]] The first number is the length then there some kind of session id (later called vaadin_security_key) followed by the payload. (In this example I set the value "Agent00232" to the textfield with the connector id "0_11_12_13_login_username") I wrote a function like this: def sendMessage(name: String,

How can I import a scala class into another using gatling?

时光怂恿深爱的人放手 提交于 2019-12-11 00:01:49
问题 note: I am new to gatling and know almost nothing about Scala. I am starting the process of converting my load tests from Jmeter to gatling. And I am stuck on how to organize the code base. All the examples that I have been able to find are single file examples. How can import code from one simulation class into another? I have this class and test scenario working now: package default import scala.concurrent.duration._ import io.gatling.core.Predef._ import io.gatling.http.Predef._ import io

How to add Status = KO in Gatling script?

霸气de小男生 提交于 2019-12-10 23:49:27
问题 Is it possible to fail my request? I would like to put Status = KO in asLongAs() section. My condition is like, if I get WorkflowFailed = True or Count > 8 then I want to fail that request using Status = KO. I have seen somewhere about session.markAsFailed but how and where to use this? Thanks. Here is the code, class LaunchResources extends Simulation { val scenarioRepeatCount = Integer.getInteger("scenarioRepeatCount", 1).toInt val userCount = Integer.getInteger("userCount", 1).toInt val

How to use saved variable values outside of gatling scenario in scala file

自古美人都是妖i 提交于 2019-12-10 17:18:42
问题 One of gatling get request is giving multiple string values and I am saving them using saveAs like this: val scn = scenario("ReadLogs") .exec(http("logEvent") .get("""/xyz/abc""") .check(jsonPath("$.data[*].message").findAll.saveAs("mList"))) /* My scala code to achieve some requirements*/ I can see in log that "mList" is a vector which have my required string messages. I want to process those messages in my scala code. How to do that in simple way? I think if i can use "mList" variable

Gatling plugin for Jenkins without pom.xml

半腔热情 提交于 2019-12-10 15:59:49
问题 Has anyone tried to use gatling plugin for jenkins, but without maven? I don't have maven project, but I generate results using Gatling from terminal (bash script). Using -rf switch I change results folder destination to /var/lib/jenkins/jobs/Gatling_test/builds/newest_build/results , but anyway there is error: Archiving Gatling reports... ERROR: Publisher com.excilys.ebi.gatling.jenkins.GatlingPublisher aborted due to exception java.lang.IllegalArgumentException: Could not find a Gatling