GUI mode is interesting. At this moment I create one component (i.e. assertion) and then copy and paste it on every place where it's needed. But if I change assertion in some place I must manually change all same assertions in all other places where its used.
Asked
Active
Viewed 2,173 times
2 Answers
6
Reusability in Jmeter can be done in 4 ways:
- include controller when you want to reuse a subset of test (login, logout)
- module controller to reuse controller in existing plan
- user defined variables that you can reuse everwhere
- xxx defaults for some samplers ( Ftp, Http...)
But in your particular case you can do it as below.
Define your expression as a var in User Defined Variable then use it in your assertions:
For sampler use Http Request Defaults to factor what is common between them.
Note that to find elements with same regexp expression yoy can use search feature which highlights results of search.

UBIK LOAD PACK
- 33,980
- 5
- 71
- 116
-
But what should I do if I need repeatedly use HTTP sampler? – Ivan Velichko Aug 29 '12 at 10:42
-
I has understood that there aren`t exists simple way for re usege of any test element. They all need different scenario. Am I right? – Ivan Velichko Aug 29 '12 at 11:49
2
IMHO The cleanest way to reuse components is to use ModuleController with jMeter Plugins' ParametrizedController.
The ParametrizedController link above will explain you how it's done.

Marko Bonaci
- 5,622
- 2
- 34
- 55
-
ParameterizedController link is now http://jmeter-plugins.org/wiki/ParameterizedController/ – mmeyer Dec 19 '14 at 07:35