Brig
Brig

Reputation: 10321

How do I call a Custom Function in JMeter

I've created a custom function in JMeter that returns a n length string with random characters. Where should I define the function, and how do I call it?

Upvotes: 3

Views: 5585

Answers (2)

BlackGaff
BlackGaff

Reputation: 7707

You can do this in a beanshell script or via a javascript call. See the manual on

functions and on the beanshell preprocessor.

Upvotes: 0

Binod Pant
Binod Pant

Reputation: 267

As long as your function is in the jmeter classpath, you should be able to call it just like any standard function with ${...} syntax, as described here.

Do make sure your jar file containing your function is in lib/ext, or added to the jmeter classpath via search_path's input option

Upvotes: 3

Related Questions