JMeter Beginner Tutorial 16 - Functions and Variables

preview_player
Показать описание
------------ PERFORMANCE TESTING ------------

functions : any method that can populate a field in any other element of a test plan
syntax : ${__functionName}
${__functionName(var1, var2, …..)}

variable : container that can store a value which can be referenced by any other element within the thread. (local to a thread)
syntax : ${variableName}

function - caseSensitive | camelCasing

Functions:
—————
1. log - ${__log(“message”)}
2. time -
3. threadNum
4. intSum

Options - Jmeter Function Helper

________ ONLINE COURSES TO LEARN ________

------------ UI TESTING ------------

------------ API TESTING ------------

------------ MOBILE TESTING ------------

------------ CI | CD | DEVOPS ------------

------------ VERSION CONTROL SYSTEM ------------

------------ PROGRAMMING ------------

------------ IDE ------------

------------ MAVEN ------------

------------ OTHERS ------------

Keep Learning,
Raghav

----------- Connect with Raghav ------------

You can support my mission for education by sharing this knowledge and helping as many people as you can.
Рекомендации по теме
Комментарии
Автор

Thanks for uploading -- pls keep the good work

seleniumtest
Автор

Hi Raghav, your tutorials are really awesome. It helped me a lot to quicken my understanding on Jmeter.

There are few questions about Jmeter which are not clearly mentioned anywhere online.
Hope you take a question and answer session soon.

Thanks
Sruthi

sruthiparitala
Автор

Thanks again! I am learning several things with you!

LatinRemixes
Автор

Best JMeter Tutorial series :-) Keep up the good work

SameeraSenarathna
Автор

I really loved your sessions. Thanks for your effort. I am looking for some ideas on how to write back to the CSV. Do you have anything handy ?

josephthadeus
Автор

Hi Raghav,

Hope you are well. Your videos are great. Thanks for all the good work.

In my project application, after login dashboard can be seen in which there is a Projects section where we can see a sequence of projects with an edit icon to open it. I'm recording a scenario where after login I'm opening the project record and then entering details in the second tab.

TransactionController1 for Login: There is 2 step authentication for login where I used regex

Result1: Passed with 2 requests.

TransactionController2 for Open project, Redirect and Save data in second tab: Now when I open the record, it redirects me to a new page with many tabs where default focus is on the first tab and then I click on the second tab where I have to enter all details and save. 3 requests are generated: 1 for opening the project, 2nd for redirecting to 2nd tab, 3rd for saving details.

Result2: When I run this, the results show me an error like this "Oops! It seems some error has occurred. Sorry for the inconvenience. Click Here to go back to Home page" for the navigated page of first request, but the details entered for the second request second tab is executed properly as the data is reflected in the front end in the second tab of the project after execution. Again the same error is displayed for the 3rd request.

Unable to handle the session for every new requests which have viewstates and eventvalidations.

Note: I'm verifying the HTML response in results mostly.

I hope you understand the scenario and request you to provide a solution for the above issue. The request link is generated at run time when we open the record but can't be seen in the response body.
Also I was unable to record this with JMeter so I used Blazemeter.

My Questions are:
1. How to handle runtime request value change in JMeter which is generated in results?
2. Also, I did li'l research, when I open the project record the generated request is encrypted which can be seen in the address bar.. So how to create a function for handling such encrypted requests?

Sorry for such a long question... Thanks again...

deepakgawande
Автор

hi sir thanks for providing videos. it is very useful to learnig about jmeter pls provide a video on FOREACH CONTROLLER.

VijayKumar-qjcy
Автор

In version 5.1 "function helper dialog" is under the tools menu

Praveenkumar-gywt
Автор

Hi, can you do a video on creating custom functions. You would need to extend the AbstractFunction class in java then import it into the jmeter lib folder. I do not quite understand how to utilise the composite variables in the methods in the AbstractFunction class

soonie
Автор

thank you for the amazing tuto!! can you help me for integrating jmeter with gitlab cli?

rimwerda
Автор

Hi, Raghav, I hope your were doing well, all I said is your JMeter - Beginner tutorial were awesome that's helps me a lot to understand the automation using JMeter tool we test lot of testing like API testing, database Testing, load testing etc..
There are few question about JMeter as I'm using JMeter-5.4.3 and while i watching your tutorials I didn't few features which you were using there, I hope you take a question and answer here on chat or email me which is more appropriated for you .
Thanks
Hassan Ali

hassanali
Автор

@Raghav, can you please tell the exact use of log function?

Here my doubt is even if we give some plain text it will reflect as same in the label of result na but log function is also doing the same....

aravapallimanikanta
Автор

Hi Raghav, the tutorials are really great for any learner.In this tutorial session, you have created 3 thread groups within a test plan, can you pls give an example of real use-case where we would need more than 1 thread group in a test Plan?

kavyasringari
Автор

thanks for this amazing tutorial series. can you pls share all jmx file, It may save a lot of time of me & others

ShivshankarSharma
Автор

I have a value extracted from regular expression extractor which I am supposed to pass in another api but that value is in double quotes, how can I remove double qutoes and pass it to another http req

abhilashasharma
Автор

Hello! Could you please give me some hint about how can I transfer session id from response to next request? in Soap UI it is property transerf function but cannot find anything like that in JMeter. Thanks!

mariadmitrieva
Автор

Hi Raghav,

How to find the "threadnum" of all the "HTTP Request" in a "Recording Controller"

Is there a way for it?

guhanshanmugasundaram
Автор

could you elaborate practical use of this and beanshell use

ashokverma
Автор

Hi, How can i login to specific site with valid credentials using JMeter?
Please suggest me, is any process to take credentials as variables?

santhoshkumarkolluri
Автор

Sir In my desktop i add function as u say but after run program my result shown only http request 3, no. Function shown in view table as u r showing

kanchangaur