Confession: I am not only a Gatling noob but apparently so LoadRunner-corrupted that I have trouble even getting my brain around Gatling.
So, trying to stay open minded, off we go.
I have built my very first Gatling script of an HTTPS Okta-protected (SSO) web site. The user story is simply to access the target URL and login.
I built the script by using Chrome to build a HAR file, and imported it into the Gatling recorder.
It seems to work, though I actually have some trouble telling if it really does, which is why I am moving on to parameterization.
I need to read Employee id’s from a CSV data file and pass an id randomly into the parts of the SCALA script where it is needed.
This is a cinch in LoadRunner, but apparently a little more complex (at least for me) in Gatling.
Here is what I have:
I have a 200 row CSV file stored in C:\Gatling\user-file\resources
Employee,Password
X006101,ugly898p
X009745,ugly898p
X016260,ugly898p
In the SCALA script I have added a feeder statement to pull the CSV file into memory (assuming I understand how that works):
class DealerPath extends Simulation {
val feeder = csv(“R4-Dealers.csv”).eager.random
val httpProtocol = http
.baseUrl(“https://col.eum-appdynamics.com”)
.inferHtmlResources()
In the script location where the manually entered Employee ID is found I replaced the value with ${Employee}:
.get(uri20 + “/b/ss/deerejddealerpathdev/1/JS-1.6.4-D7QN/s22257548961079?AQB=1&ndh=1&pf=1&t=20%2F1%2F2020%2013%3A49%3A27%204%20360&D=D%3D&mid=77887682783998080434584462396683909568&aamlh=7&ce=UTF-8&pageName=r4%3Amydealerpath%20home&g=https%3A%2F%2Fdealerpathcert85.deere.com%2Fwps%2Fmyportal%2Fdpath%2FHome%2FR4Home%2FDealerPath%2F%21ut%2Fp%2Fz1%2F04_Sj9CPykssy0xPLMnMz0vMAfIjo8ziffxdzDwcTQy9LUIszQwcDT0CDQLMzQ0Mggz0w8EKDFCAo4FTkJGTsYGBu7-RfhTp-pFNIk4_HgVR-I0P14_Ca0WIAVQBPi8SsqQgNzQ0wiDTEwBjrDhu%2Fdz%2Fd5%2FL2dBISEvZ0FBIS&ch=r4&server=dealerpathcert85.deere.com&events=event1&aamb=RKhpRz8krg2tLO6pguXWp5olkAcUniQYPHaMWWgdJ3xzPWQmdj0y&c1=D%3DpageName&v1=D%3DpageName&c2=D%3Dv2&v2=https%3A%2F%2Fdealerpathcert85.deere.com%2Fwps%2Fmyportal%2Fdpath%2FHome%2FR4Home%2FDealerPath%2F%21ut%2Fp%2Fz1%2F04_Sj9CPykssy0xPLMnMz0vMAfIjo8ziffxdzDwcTQy9LUIszQwcDT0CDQLMzQ0Mggz0w8EKDFCAo4FTkJGTsYGBu7-RfhTp-pFNIk4_HgVR-I0P14_Ca0WIAVQBPi8SsqQgNzQ0wiDTEwBjrDhu%2Fdz%2Fd5%2FL2dBISEvZ0FBIS9&c3=D%3Dv3&c5=D%3Dv5&v5=r4&c6=r4%3Amydealerpath%20home&v6=r4%3Amydealerpath%20home&c10=D%3Dv10&v10=2%3A30PM&c11=D%3Dv11&v11=Thursday&c12=D%3Dv12&v12=Weekday&c13=D%3Dv13&v13=New&c15=VisitorAPI%20Present&c17=D%3Dv17&v17=1&c19=D%3Dv19&v19=Employee&c20=D%3Dv20&v20=${Employee}&c21=D%3Dv21&v21=en_US&s=1680x1050&c=24&j=1.6&v=N&k=Y&bw=1680&bh=528&-g=9&AQE=1”)
Immediately before the above .get step in the script, I placed a .feed(feeder) call:
.get(uri13 + “/wps/contenthandler/dpath/!ut/p/digest!CfC_sxRf5skScA7XMP9B0g/dav/fs-type1/themes/dealerpaththeme/css/default/lib/images/ui-bg_flat_75_ffffff_40x100.png”),
http(“request_109”)
.feed(feeder)
.get(uri20 + “/b/ss/deerejddealerpathdev/1/JS-1.6.4-D7QN/s29046673639337?AQB=1&ndh=1&pf=1&t=20%2F1%2F2020%2013%3A49%3A40%204%20360&D=D%3D&mid=77887682783998080434584462396683909568&aamlh=7&ce=UTF-8&pageName=r4%3Am%26a%3Aeleader%20%28the%20leader%29&g=https%3A%2F%2Fdealerpathcert85.deere.com%2Fwps%2Fmyportal%2Fdpath%2FHome%2FR4Home%2FIndPage%2F%21ut%2Fp%2Fz1%2F1VNbb4IwFP4tezDZsrAeqAg-4jCyjelkIsJLU6AoG1blInO_fig-uGQBX9eX9qTf7fSCPLRAHqf7eEnzeMNpUtWu1yPmRO8ZWld8UWf9HmiiMYU3RQEYS8g5AeDX0GBgSQMMMJpIyGvgW_An_1LpOn4DwGvOP0fuALn-fUYXyxax&ch=r4&server=dealerpathcert85.deere.com&events=event1&aamb=RKhpRz8krg2tLO6pguXWp5olkAcUniQYPHaMWWgdJ3xzPWQmdj0y&c1=D%3DpageName&v1=D%3DpageName&c2=D%3Dv2&v2=https%3A%2F%2Fdealerpathcert85.deere.com%2Fwps%2Fmyportal%2Fdpath%2FHome%2FR4Home%2FIndPage%2F%21ut%2Fp%2Fz1%2F1VNbb4IwFP4tezDZsrAeqAg-4jCyjelkIsJLU6AoG1blInO_fig-uGQBX9eX9qTf7fSCPLRAHqf7eEnzeMNpUtWu1yPmRO8ZWld8UWf9HmiiMYU3RQEYS8g5AeDX0GBgSQMMMJpIyGvgW_An_1LpOn4DwGvOP0fuALn-fUYXyxaxc&c3=D%3Dv3&v3=r4%3Amydealerpath%20home&c5=D%3Dv5&v5=r4&c6=r4%3Am%26a&v6=r4%3Am%26a&c7=r4%3Am%26a%3Aeleader%20%28the%20leader%29&v7=r4%3Am%26a%3Aeleader%20%28the%20leader%29&c10=D%3Dv10&v10=2%3A30PM&c11=D%3Dv11&v11=Thursday&c12=D%3Dv12&v12=Weekday&c13=D%3Dv13&v13=New&c15=VisitorAPI%20Present&c17=D%3Dv17&v17=2&c19=D%3Dv19&v19=Employee&c20=D%3Dv20&v20=${Employee}&c21=D%3Dv21&v21=en_US&s=1680x1050&c=24&j=1.6&v=N&k=Y&bw=1680&bh=528&-g=c&AQE=1”)
When I try to run the script, it blows up during the compile.
11:55:53.320 [ERROR] i.g.c.ZincCompiler$ - C:\Gatling\user-files\simulations\DealerPath.scala:612:5: value feed is not a member of io.gatling.http.request.builder.Http
possible cause: maybe a semicolon is missing before `value feed’?
.feed(feeder)
^
11:55:53.367 [ERROR] i.g.c.ZincCompiler$ - one error found
11:55:53.382 [ERROR] i.g.c.ZincCompiler$ - Compilation crashed
sbt.internal.inc.CompileFailed: null
I have read and read about feeders, and I have tried to read quite a few past posts, but I am so green to Scala/Akka and even Java, that it is Greek to me.
I also know that once I figure out this part of the script parameterization I will need to figure out how to paramaterize the SAML activity. That, itself, will for me be an even bigger step up.
All I need to do is login 8000 users in an hour to a web portal. It should not be rocket science.
I am trying to “shift left” performance testing by having Product/Delivery Teams do their own testing instead of relying on a central, shared service testing group. However, I am finding it hard to “teach a man to fish”, since I am apparently so specialized in LoadRunner, that I need to totally revamp my brain.
Thanks,
Randy