Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Performance Testing with JMeter  3

You're reading from   Performance Testing with JMeter 3 Enhance the performance of your web application

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781787285774
Length 166 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Bayo Erinle Bayo Erinle
Author Profile Icon Bayo Erinle
Bayo Erinle
Arrow right icon
View More author details
Toc

JMeter functions


JMeter functions are special values that can populate fields or any sampler or other element in the test plan. They take the following form:

${__functionName(var1,var2,var3)} 

Here, __functionName matches one of the many function names JMeter offers. Parentheses surround the parameters sent to the function, which can vary from function to function. Functions with no parameters don't need the parentheses, for example, ${__threadNum}. A list of all available functions can be found on JMeter's website at http://jmeter.apache.org/usermanual/functions.html. Functions are divided into seven main categories. They are given here, along with their examples:

  • Information: threadNum, machineIP, time, and so on
  • Input: CSVRead, XPath, and so on
  • Calculation: counter, Random, UUID, and so on
  • Scripting: javaScript, BeanShell, and so on
  • Properties: property, P, setProperty, and so on
  • Variables: split, eval, and so on
  • String: char, unescape, and so on

Functions can prove useful in certain situations...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime