SlideShare a Scribd company logo
1 of 13
JMeter Features
By Tharinda Liyanage
XPath
• XPath is used to navigate through elements and attributes in an XML
    document
//form[@name='fm1']//input[@name='lt']/@value
XPath Extractor
//form[@name='fm1']//input[@name='lt']/@value
• JMeter variable
  – ${t}
Regular Expression
• Matches string patterns
• input type="hidden" name="lt" value="(.*)"




  Reference Name: MYREF
  Regex: name="(.+?)" value="(.+?)"
  Template: $1$$2$
Reg Ex
•   ( ) - grouping
•   [ ] - character classes
•   { } - repetition
•   * + ? - repetition
•   . - wild-card character
•    - escape character
•   | - alternatives
•   ^ $ - start and end of string or line
Functions
• __log()
• __threadNum()- The thread number function simply returns the number of the thread currently being
    executed
                 ${__log(${__threadNum},,,******Thread_Number is*********:: )}
• __machineName()
    The machineName function returns the local host name
• __RandomString ()




RandomString(var1,var2,var3),where:
var1 - Random string length
var2 - Chars to use for random string generation
var3 - Name of variable in which to store the result (optional)
• Counter
Database Testing
•   Step 1: Put downloaded JDBC driver (sqljdbc4.jar) under "JMeter/lib/" directory.
•   Step 2 : Adding JDBC Connection Configuration
•   Step 3: Adding JDBC Request

More Related Content

What's hot

Grid search (parameter tuning)
Grid search (parameter tuning)Grid search (parameter tuning)
Grid search (parameter tuning)Akhilesh Joshi
 
Python Workshop Part 2. LUG Maniapl
Python Workshop Part 2. LUG ManiaplPython Workshop Part 2. LUG Maniapl
Python Workshop Part 2. LUG ManiaplAnkur Shrivastava
 
Java chapter 6 - Arrays -syntax and use
Java chapter 6 - Arrays -syntax and useJava chapter 6 - Arrays -syntax and use
Java chapter 6 - Arrays -syntax and useMukesh Tekwani
 
The Ring programming language version 1.7 book - Part 35 of 196
The Ring programming language version 1.7 book - Part 35 of 196The Ring programming language version 1.7 book - Part 35 of 196
The Ring programming language version 1.7 book - Part 35 of 196Mahmoud Samir Fayed
 
Coding with LINQ, Patterns & Practices
Coding with LINQ, Patterns & PracticesCoding with LINQ, Patterns & Practices
Coding with LINQ, Patterns & PracticesTuomas Hietanen
 
R for Pirates. ESCCONF October 27, 2011
R for Pirates. ESCCONF October 27, 2011R for Pirates. ESCCONF October 27, 2011
R for Pirates. ESCCONF October 27, 2011Mandi Walls
 
Datastructures in python
Datastructures in pythonDatastructures in python
Datastructures in pythonhydpy
 
Parts of python programming language
Parts of python programming languageParts of python programming language
Parts of python programming languageMegha V
 
Implementing a many-to-many Relationship with Slick
Implementing a many-to-many Relationship with SlickImplementing a many-to-many Relationship with Slick
Implementing a many-to-many Relationship with SlickHermann Hueck
 
Developing Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginnersDeveloping Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginnersSaeid Zebardast
 
Python programming: Anonymous functions, String operations
Python programming: Anonymous functions, String operationsPython programming: Anonymous functions, String operations
Python programming: Anonymous functions, String operationsMegha V
 
Functions & closures
Functions & closuresFunctions & closures
Functions & closuresKnoldus Inc.
 
Array within a class
Array within a classArray within a class
Array within a classAAKASH KUMAR
 
JavaScript Fundamentals with Angular and Lodash
JavaScript Fundamentals with Angular and LodashJavaScript Fundamentals with Angular and Lodash
JavaScript Fundamentals with Angular and LodashBret Little
 
Machine Learning Game Changer for IT - Maartens Lourens
Machine Learning Game Changer for IT - Maartens LourensMachine Learning Game Changer for IT - Maartens Lourens
Machine Learning Game Changer for IT - Maartens LourensOpenCredo
 

What's hot (20)

Grid search (parameter tuning)
Grid search (parameter tuning)Grid search (parameter tuning)
Grid search (parameter tuning)
 
Python Workshop Part 2. LUG Maniapl
Python Workshop Part 2. LUG ManiaplPython Workshop Part 2. LUG Maniapl
Python Workshop Part 2. LUG Maniapl
 
Java chapter 6 - Arrays -syntax and use
Java chapter 6 - Arrays -syntax and useJava chapter 6 - Arrays -syntax and use
Java chapter 6 - Arrays -syntax and use
 
Python : Dictionaries
Python : DictionariesPython : Dictionaries
Python : Dictionaries
 
The Ring programming language version 1.7 book - Part 35 of 196
The Ring programming language version 1.7 book - Part 35 of 196The Ring programming language version 1.7 book - Part 35 of 196
The Ring programming language version 1.7 book - Part 35 of 196
 
Coding with LINQ, Patterns & Practices
Coding with LINQ, Patterns & PracticesCoding with LINQ, Patterns & Practices
Coding with LINQ, Patterns & Practices
 
R for Pirates. ESCCONF October 27, 2011
R for Pirates. ESCCONF October 27, 2011R for Pirates. ESCCONF October 27, 2011
R for Pirates. ESCCONF October 27, 2011
 
Datastructures in python
Datastructures in pythonDatastructures in python
Datastructures in python
 
Parts of python programming language
Parts of python programming languageParts of python programming language
Parts of python programming language
 
Js types
Js typesJs types
Js types
 
Lesson11
Lesson11Lesson11
Lesson11
 
Dictionary in python
Dictionary in pythonDictionary in python
Dictionary in python
 
Implementing a many-to-many Relationship with Slick
Implementing a many-to-many Relationship with SlickImplementing a many-to-many Relationship with Slick
Implementing a many-to-many Relationship with Slick
 
Developing Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginnersDeveloping Applications with MySQL and Java for beginners
Developing Applications with MySQL and Java for beginners
 
Python programming: Anonymous functions, String operations
Python programming: Anonymous functions, String operationsPython programming: Anonymous functions, String operations
Python programming: Anonymous functions, String operations
 
Functions & closures
Functions & closuresFunctions & closures
Functions & closures
 
Array within a class
Array within a classArray within a class
Array within a class
 
JavaScript Fundamentals with Angular and Lodash
JavaScript Fundamentals with Angular and LodashJavaScript Fundamentals with Angular and Lodash
JavaScript Fundamentals with Angular and Lodash
 
Machine Learning Game Changer for IT - Maartens Lourens
Machine Learning Game Changer for IT - Maartens LourensMachine Learning Game Changer for IT - Maartens Lourens
Machine Learning Game Changer for IT - Maartens Lourens
 
Python programming : Arrays
Python programming : ArraysPython programming : Arrays
Python programming : Arrays
 

Viewers also liked

Introduction to Performance Testing
Introduction to Performance TestingIntroduction to Performance Testing
Introduction to Performance TestingTharinda Liyanage
 
Rpt ppt for training
Rpt ppt for trainingRpt ppt for training
Rpt ppt for trainingsindhu T
 
TDM: Masking, Subsetting and generating Synthetic Data
TDM: Masking, Subsetting and generating Synthetic Data TDM: Masking, Subsetting and generating Synthetic Data
TDM: Masking, Subsetting and generating Synthetic Data CA Technologies
 
Apache JMeter from the Ground Up
Apache JMeter from the Ground UpApache JMeter from the Ground Up
Apache JMeter from the Ground UpCA Technologies
 
Performance Testing With Jmeter
Performance Testing With JmeterPerformance Testing With Jmeter
Performance Testing With JmeterAdam Goucher
 

Viewers also liked (7)

Introduction to Performance Testing
Introduction to Performance TestingIntroduction to Performance Testing
Introduction to Performance Testing
 
JMeter
JMeterJMeter
JMeter
 
Beanshell scripting in Apache JMeter
Beanshell scripting in Apache JMeterBeanshell scripting in Apache JMeter
Beanshell scripting in Apache JMeter
 
Rpt ppt for training
Rpt ppt for trainingRpt ppt for training
Rpt ppt for training
 
TDM: Masking, Subsetting and generating Synthetic Data
TDM: Masking, Subsetting and generating Synthetic Data TDM: Masking, Subsetting and generating Synthetic Data
TDM: Masking, Subsetting and generating Synthetic Data
 
Apache JMeter from the Ground Up
Apache JMeter from the Ground UpApache JMeter from the Ground Up
Apache JMeter from the Ground Up
 
Performance Testing With Jmeter
Performance Testing With JmeterPerformance Testing With Jmeter
Performance Testing With Jmeter
 

Similar to Useful JMeter functions for scripting

Achieving Parsing Sanity In Erlang
Achieving Parsing Sanity In ErlangAchieving Parsing Sanity In Erlang
Achieving Parsing Sanity In ErlangSean Cribbs
 
Marc’s (bio)perl course
Marc’s (bio)perl courseMarc’s (bio)perl course
Marc’s (bio)perl courseMarc Logghe
 
Ponies and Unicorns With Scala
Ponies and Unicorns With ScalaPonies and Unicorns With Scala
Ponies and Unicorns With ScalaTomer Gabel
 
Lisp Macros in 20 Minutes (Featuring Clojure)
Lisp Macros in 20 Minutes (Featuring Clojure)Lisp Macros in 20 Minutes (Featuring Clojure)
Lisp Macros in 20 Minutes (Featuring Clojure)Phil Calçado
 
Creating Domain Specific Languages in Python
Creating Domain Specific Languages in PythonCreating Domain Specific Languages in Python
Creating Domain Specific Languages in PythonSiddhi
 
2 BytesC++ course_2014_c7_ operator overloading, friends and references
2 BytesC++ course_2014_c7_ operator overloading, friends and references 2 BytesC++ course_2014_c7_ operator overloading, friends and references
2 BytesC++ course_2014_c7_ operator overloading, friends and references kinan keshkeh
 
(map Clojure everyday-tasks)
(map Clojure everyday-tasks)(map Clojure everyday-tasks)
(map Clojure everyday-tasks)Jacek Laskowski
 
Round PEG, Round Hole - Parsing Functionally
Round PEG, Round Hole - Parsing FunctionallyRound PEG, Round Hole - Parsing Functionally
Round PEG, Round Hole - Parsing FunctionallySean Cribbs
 
Macrobrew: Clojure macros distilled
Macrobrew: Clojure macros distilledMacrobrew: Clojure macros distilled
Macrobrew: Clojure macros distilledabhinavomprakash10
 
Thumbtack Expertise Days # 5 - Javaz
Thumbtack Expertise Days # 5 - JavazThumbtack Expertise Days # 5 - Javaz
Thumbtack Expertise Days # 5 - JavazAlexey Remnev
 
Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.Workhorse Computing
 
Functional Programming in Javascript - IL Tech Talks week
Functional Programming in Javascript - IL Tech Talks weekFunctional Programming in Javascript - IL Tech Talks week
Functional Programming in Javascript - IL Tech Talks weekyoavrubin
 
Becoming an Advanced Groovy Developer
Becoming an Advanced Groovy DeveloperBecoming an Advanced Groovy Developer
Becoming an Advanced Groovy DeveloperTom Henricksen
 
Attributes Unwrapped: Lessons under the surface of active record
Attributes Unwrapped: Lessons under the surface of active recordAttributes Unwrapped: Lessons under the surface of active record
Attributes Unwrapped: Lessons under the surface of active record.toster
 
Scala - en bedre og mere effektiv Java?
Scala - en bedre og mere effektiv Java?Scala - en bedre og mere effektiv Java?
Scala - en bedre og mere effektiv Java?Jesper Kamstrup Linnet
 
Linux Shell Scripting.pptx
Linux Shell Scripting.pptxLinux Shell Scripting.pptx
Linux Shell Scripting.pptxVaibhavJha46
 
Interface result set
Interface result setInterface result set
Interface result setmyrajendra
 

Similar to Useful JMeter functions for scripting (20)

Achieving Parsing Sanity In Erlang
Achieving Parsing Sanity In ErlangAchieving Parsing Sanity In Erlang
Achieving Parsing Sanity In Erlang
 
Marc’s (bio)perl course
Marc’s (bio)perl courseMarc’s (bio)perl course
Marc’s (bio)perl course
 
Ponies and Unicorns With Scala
Ponies and Unicorns With ScalaPonies and Unicorns With Scala
Ponies and Unicorns With Scala
 
Lisp Macros in 20 Minutes (Featuring Clojure)
Lisp Macros in 20 Minutes (Featuring Clojure)Lisp Macros in 20 Minutes (Featuring Clojure)
Lisp Macros in 20 Minutes (Featuring Clojure)
 
Hacking XPATH 2.0
Hacking XPATH 2.0Hacking XPATH 2.0
Hacking XPATH 2.0
 
Creating Domain Specific Languages in Python
Creating Domain Specific Languages in PythonCreating Domain Specific Languages in Python
Creating Domain Specific Languages in Python
 
Solr @ Etsy - Apache Lucene Eurocon
Solr @ Etsy - Apache Lucene EuroconSolr @ Etsy - Apache Lucene Eurocon
Solr @ Etsy - Apache Lucene Eurocon
 
2 BytesC++ course_2014_c7_ operator overloading, friends and references
2 BytesC++ course_2014_c7_ operator overloading, friends and references 2 BytesC++ course_2014_c7_ operator overloading, friends and references
2 BytesC++ course_2014_c7_ operator overloading, friends and references
 
(map Clojure everyday-tasks)
(map Clojure everyday-tasks)(map Clojure everyday-tasks)
(map Clojure everyday-tasks)
 
Round PEG, Round Hole - Parsing Functionally
Round PEG, Round Hole - Parsing FunctionallyRound PEG, Round Hole - Parsing Functionally
Round PEG, Round Hole - Parsing Functionally
 
DataMapper
DataMapperDataMapper
DataMapper
 
Macrobrew: Clojure macros distilled
Macrobrew: Clojure macros distilledMacrobrew: Clojure macros distilled
Macrobrew: Clojure macros distilled
 
Thumbtack Expertise Days # 5 - Javaz
Thumbtack Expertise Days # 5 - JavazThumbtack Expertise Days # 5 - Javaz
Thumbtack Expertise Days # 5 - Javaz
 
Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.
 
Functional Programming in Javascript - IL Tech Talks week
Functional Programming in Javascript - IL Tech Talks weekFunctional Programming in Javascript - IL Tech Talks week
Functional Programming in Javascript - IL Tech Talks week
 
Becoming an Advanced Groovy Developer
Becoming an Advanced Groovy DeveloperBecoming an Advanced Groovy Developer
Becoming an Advanced Groovy Developer
 
Attributes Unwrapped: Lessons under the surface of active record
Attributes Unwrapped: Lessons under the surface of active recordAttributes Unwrapped: Lessons under the surface of active record
Attributes Unwrapped: Lessons under the surface of active record
 
Scala - en bedre og mere effektiv Java?
Scala - en bedre og mere effektiv Java?Scala - en bedre og mere effektiv Java?
Scala - en bedre og mere effektiv Java?
 
Linux Shell Scripting.pptx
Linux Shell Scripting.pptxLinux Shell Scripting.pptx
Linux Shell Scripting.pptx
 
Interface result set
Interface result setInterface result set
Interface result set
 

More from Tharinda Liyanage

Testing strategy for agile projects updated
Testing strategy for agile projects updatedTesting strategy for agile projects updated
Testing strategy for agile projects updatedTharinda Liyanage
 
"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd Session"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd SessionTharinda Liyanage
 
Formulating Agile Testing Strategy
Formulating Agile Testing StrategyFormulating Agile Testing Strategy
Formulating Agile Testing StrategyTharinda Liyanage
 
Coded UI: Hand Coding based on Page Object Model
Coded UI: Hand Coding based on Page Object ModelCoded UI: Hand Coding based on Page Object Model
Coded UI: Hand Coding based on Page Object ModelTharinda Liyanage
 
Introduction to performance testing
Introduction to performance testingIntroduction to performance testing
Introduction to performance testingTharinda Liyanage
 

More from Tharinda Liyanage (7)

Testing strategy for agile projects updated
Testing strategy for agile projects updatedTesting strategy for agile projects updated
Testing strategy for agile projects updated
 
Qa and Testing
Qa and TestingQa and Testing
Qa and Testing
 
"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd Session"Introduction to JMeter" @ CPTM 3rd Session
"Introduction to JMeter" @ CPTM 3rd Session
 
Formulating Agile Testing Strategy
Formulating Agile Testing StrategyFormulating Agile Testing Strategy
Formulating Agile Testing Strategy
 
Coded UI: Hand Coding based on Page Object Model
Coded UI: Hand Coding based on Page Object ModelCoded UI: Hand Coding based on Page Object Model
Coded UI: Hand Coding based on Page Object Model
 
PerfTest in SOA
PerfTest in SOAPerfTest in SOA
PerfTest in SOA
 
Introduction to performance testing
Introduction to performance testingIntroduction to performance testing
Introduction to performance testing
 

Useful JMeter functions for scripting