{"id":14490,"date":"2013-06-20T01:00:28","date_gmt":"2013-06-19T22:00:28","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=14490"},"modified":"2013-06-19T08:22:42","modified_gmt":"2013-06-19T05:22:42","slug":"jmeter-custom-function-implementation","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html","title":{"rendered":"JMeter custom function implementation"},"content":{"rendered":"<p>JMeter provides functions that can be used in the sampler. While writing complex test-plan you feel that JMeter is lacking some of the methods. You use Beanshell script to define your own custom method. JMeter invokes Beanshell interpreter to run script the script. This works fine as long as you don\u2019t generate high load (high number of threads). But once JMeter tries to generate high load it run out of resources and slows down dramatically. If JMeter custom functions are used instead then JMeter is able to generate high load effortlessly. The only problem is figuring out implementation requirement and how to integrate with JMeter. There are hardly any document provided by JMeter about custom function implementation. But after looking through JMeter source code and Googling, I found the way to implement JMeter custom function.<\/p>\n<h2>Custom method implementation<\/h2>\n<p>Lets dive into the details of implementation. There are certain requirement that should be satisfied. These are as following.<\/p>\n<ul>\n<li>Function class package name must contain \u201c.functions.\u201d<\/li>\n<li>Function class must extend AbstractFunction and implement execute(), setParameters(), getReferenceKey() and getArgumentDesc() methods<\/li>\n<li>Make jar file and put in &lt;JMETER_HOME&gt;\/lib\/ext directory and restart JMeter<\/li>\n<\/ul>\n<h2>Package name<\/h2>\n<p>JMeter is design in such a way that it can run without GUI(Grapical User Interface). It loads the core classes and execute the test-plan. It provides high priority to core classes and prefer to load those classes first. In order to make sure that GUI and core\/backend doesn\u2019t get mixed it segregate the classes based on the package name. It tries to follow convention that the function implmentation class should be present in package which should contain \u2018functions\u2019 word in it e.g <code>com.code4reference.jmeter.functions<\/code>. Under the hood it looks in jmeter.properties file and try to find the following property values.<\/p>\n<pre class=\" brush:java\">classfinder.functions.contain=.functions.<\/pre>\n<p>As you can see the default value provided is <code>\".functions.\"<\/code>. you can change this to something else, but you have to make sure that the same word should exist in the custom function class package name. It\u2019s preferred that to keep default value. Once you define the package now it\u2019s time to write the Function implementation class.<\/p>\n<h2>Function implementation class<\/h2>\n<p>While writing this class you have to implement the following methods.<\/p>\n<ol>\n<li><strong>String getReferenceKey():<\/strong> Name of the function which can be called from sampler. Convention is to put two \u201c__\u201d(underscore) before the name of the function e.g <code> __TimeInMillis<\/code> and function name should be same as the class name which has implemented this function. This function name should be stored in some static final String variable so that it can\u2019t be change during the execution.<\/li>\n<li><strong><strong>List<\/strong><\/strong>getArgumentDesc():This method basically returns the argument description in a list of string. This description appears in Function helper (shown in the below picture)<\/li>\n<li><strong><strong>void setParameters(Collection<\/strong><\/strong>parameters):This method is called by JMeter and it passes the values passed in the function call. The variables are passed as collection of CompoundVariable. This method is get called even there is no argument provided. In this method global variable can be set and accessed in execute() method.<\/li>\n<li><strong>String execute(SampleResult previousResult, Sampler currentSampler):<\/strong> JMeter passes previous SampleResult and the current SampleResult. This method returns a string which get used as a replacement value for the function call. This method get called by multiple threads so it has to be threadsafe. Strange thing about this method is that after processing the arguments the result has to be converted to string and returned<\/li>\n<\/ol>\n<p><figure style=\"width: 600px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/Function-Helper_021.png\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/Function-Helper_021.png\" width=\"600\" height=\"210\" \/><\/a><figcaption class=\"wp-caption-text\">JMeter function helper<\/figcaption><\/figure><div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<h2>Source code<\/h2>\n<p>In sample source code below, I have implemented one function called <code>__TimeInMillis<\/code>. This method returns time in milliseconds after adjusting the current time with provided offset. For example, this ${__TimeInMillis(2000)} method call returns 1371413879000 when current time is 1371413877000.<\/p>\n<pre class=\" brush:java\">package com.code4reference.jmeter.functions;\r\n\r\nimport java.util.Collection;\r\nimport java.util.LinkedList;\r\nimport java.util.List;\r\nimport java.util.Calendar;\r\n\r\nimport org.apache.jmeter.engine.util.CompoundVariable;\r\nimport org.apache.jmeter.functions.AbstractFunction;\r\nimport org.apache.jmeter.functions.InvalidVariableException;\r\nimport org.apache.jmeter.samplers.SampleResult;\r\nimport org.apache.jmeter.samplers.Sampler;\r\nimport org.apache.jorphan.logging.LoggingManager;\r\nimport org.apache.log.Logger;\r\n\r\npublic class TimeInMillis extends AbstractFunction {\r\n\r\n    private static final List&lt;String&gt; desc = new LinkedList&lt;String&gt;();\r\n    private static final String KEY = \"__TimeInMillis\";\r\n    private static final int MAX_PARAM_COUNT = 1;\r\n    private static final int MIN_PARAM_COUNT = 0;\r\n    private static final Logger log = LoggingManager.getLoggerForClass();\r\n    private Object[] values;\r\n\r\n    static {\r\n        desc.add(\"(Optional)Pass the milliseconds that should be added\/subtracted from current time.\");\r\n    }\r\n\r\n    \/**\r\n     * No-arg constructor.\r\n     *\/\r\n    public TimeInMillis() {\r\n        super();\r\n    }\r\n\r\n    \/** {@inheritDoc} *\/\r\n    @Override\r\n    public synchronized String execute(SampleResult previousResult, Sampler currentSampler)\r\n            throws InvalidVariableException {\r\n        \/\/JMeterVariables vars = getVariables();\r\n        Calendar cal = Calendar.getInstance();\r\n\r\n        if (values.length == 1 ) { \/\/If user has provided offset value then adjust the time.\r\n            log.info(\"Got one paramenter\");\r\n            try {\r\n                Integer offsetTime =  new Integer(((CompoundVariable) values[0]).execute().trim());\r\n                cal.add(Calendar.MILLISECOND, offsetTime);\r\n            } catch (Exception e) { \/\/In case user pass invalid parameter.\r\n                throw new InvalidVariableException(e);\r\n            }           \r\n        }\r\n\r\n        return String.valueOf(cal.getTimeInMillis());\r\n    }\r\n\r\n    \/** {@inheritDoc} *\/\r\n    @Override\r\n    public synchronized void setParameters(Collection&lt;CompoundVariable&gt; parameters) throws InvalidVariableException {\r\n        checkParameterCount(parameters, MIN_PARAM_COUNT, MAX_PARAM_COUNT);\r\n        values = parameters.toArray();\r\n    }\r\n\r\n    \/** {@inheritDoc} *\/\r\n    @Override\r\n    public String getReferenceKey() {\r\n        return KEY;\r\n    }\r\n\r\n    \/** {@inheritDoc} *\/\r\n    @Override\r\n    public List&lt;String&gt; getArgumentDesc() {\r\n        return desc;\r\n    }\r\n}<\/pre>\n<p>I have highlight some of the crucial part of the code. In line 19, function name is set where as in line 26 function description is provided. In line 60, the number of arguments are check and made sure that the right number of arguments have been provided. The main part of code is highlighted between 44 to 51 where current time is adjusted and returned as string object. If you are interested to check other function implementation then checkout the entire source code present on <a title=\"JMeter custom functions source code.\" href=\"https:\/\/github.com\/rakeshcusat\/Code4Reference\/tree\/master\/JMeter\" target=\"_blank\">github\/Code4Reference<\/a>. Once code is written, compile it and make jar file and place it in &lt;JMETER_HOME&gt;\/lib\/ext directory. You can get a sample Gradle script for building jar file in <a title=\"Gradle build file for JMeter plugin development\" href=\"http:\/\/code4reference.com\/2013\/05\/gradle-build-file-for-jmeter-plugin-development-2\/\">this post<\/a>. If you don\u2019t know about Gradle, then you can use <a title=\"How to make jar file using jar command.\" href=\"http:\/\/code4reference.com\/2013\/05\/how-to-make-jar-file-using-jar-command\/\">commands to generate jar file<\/a>. The easiest way of creating jar file by exporting the package in Eclipse and select the export destination as Jar file.<br \/>\n&nbsp;<\/p>\n<div style=\"border: 1px solid #D8D8D8; background: #FAFAFA; width: 100%; padding-left: 5px;\"><b><i>Reference: <\/i><\/b><a href=\"http:\/\/code4reference.com\/2013\/06\/jmeter-custom-function-implementation\/\">JMeter custom function implementation<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Rakesh Cusat at the <a href=\"http:\/\/code4reference.com\/\">Code4Reference<\/a> blog.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>JMeter provides functions that can be used in the sampler. While writing complex test-plan you feel that JMeter is lacking some of the methods. You use Beanshell script to define your own custom method. JMeter invokes Beanshell interpreter to run script the script. This works fine as long as you don\u2019t generate high load (high &hellip;<\/p>\n","protected":false},"author":274,"featured_media":68,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[430],"class_list":["post-14490","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-apache-jmeter"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JMeter custom function implementation<\/title>\n<meta name=\"description\" content=\"JMeter provides functions that can be used in the sampler. While writing complex test-plan you feel that JMeter is lacking some of the methods. You use\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JMeter custom function implementation\" \/>\n<meta property=\"og:description\" content=\"JMeter provides functions that can be used in the sampler. While writing complex test-plan you feel that JMeter is lacking some of the methods. You use\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2013-06-19T22:00:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-jmeter-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Rakesh Cusat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rakesh Cusat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/jmeter-custom-function-implementation.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/jmeter-custom-function-implementation.html\"},\"author\":{\"name\":\"Rakesh Cusat\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/913ac3950434ad48c2c2b98e23d86a49\"},\"headline\":\"JMeter custom function implementation\",\"datePublished\":\"2013-06-19T22:00:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/jmeter-custom-function-implementation.html\"},\"wordCount\":799,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/jmeter-custom-function-implementation.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-jmeter-logo.jpg\",\"keywords\":[\"Apache JMeter\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/jmeter-custom-function-implementation.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/jmeter-custom-function-implementation.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/jmeter-custom-function-implementation.html\",\"name\":\"JMeter custom function implementation\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/jmeter-custom-function-implementation.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/jmeter-custom-function-implementation.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-jmeter-logo.jpg\",\"datePublished\":\"2013-06-19T22:00:28+00:00\",\"description\":\"JMeter provides functions that can be used in the sampler. While writing complex test-plan you feel that JMeter is lacking some of the methods. You use\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/jmeter-custom-function-implementation.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/jmeter-custom-function-implementation.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/jmeter-custom-function-implementation.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-jmeter-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-jmeter-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/06\\\/jmeter-custom-function-implementation.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"JMeter custom function implementation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/913ac3950434ad48c2c2b98e23d86a49\",\"name\":\"Rakesh Cusat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/232ae7fa9c21c4a55e50bb934653939d45522ec03f0c2045ae3bb139faa275bb?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/232ae7fa9c21c4a55e50bb934653939d45522ec03f0c2045ae3bb139faa275bb?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/232ae7fa9c21c4a55e50bb934653939d45522ec03f0c2045ae3bb139faa275bb?s=96&d=mm&r=g\",\"caption\":\"Rakesh Cusat\"},\"sameAs\":[\"http:\\\/\\\/code4reference.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Rakesh-Cusat\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JMeter custom function implementation","description":"JMeter provides functions that can be used in the sampler. While writing complex test-plan you feel that JMeter is lacking some of the methods. You use","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html","og_locale":"en_US","og_type":"article","og_title":"JMeter custom function implementation","og_description":"JMeter provides functions that can be used in the sampler. While writing complex test-plan you feel that JMeter is lacking some of the methods. You use","og_url":"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2013-06-19T22:00:28+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-jmeter-logo.jpg","type":"image\/jpeg"}],"author":"Rakesh Cusat","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Rakesh Cusat","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html"},"author":{"name":"Rakesh Cusat","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/913ac3950434ad48c2c2b98e23d86a49"},"headline":"JMeter custom function implementation","datePublished":"2013-06-19T22:00:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html"},"wordCount":799,"commentCount":1,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-jmeter-logo.jpg","keywords":["Apache JMeter"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html","url":"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html","name":"JMeter custom function implementation","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-jmeter-logo.jpg","datePublished":"2013-06-19T22:00:28+00:00","description":"JMeter provides functions that can be used in the sampler. While writing complex test-plan you feel that JMeter is lacking some of the methods. You use","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-jmeter-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-jmeter-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2013\/06\/jmeter-custom-function-implementation.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"JMeter custom function implementation"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/913ac3950434ad48c2c2b98e23d86a49","name":"Rakesh Cusat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/232ae7fa9c21c4a55e50bb934653939d45522ec03f0c2045ae3bb139faa275bb?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/232ae7fa9c21c4a55e50bb934653939d45522ec03f0c2045ae3bb139faa275bb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/232ae7fa9c21c4a55e50bb934653939d45522ec03f0c2045ae3bb139faa275bb?s=96&d=mm&r=g","caption":"Rakesh Cusat"},"sameAs":["http:\/\/code4reference.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Rakesh-Cusat"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/14490","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/274"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=14490"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/14490\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/68"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=14490"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=14490"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=14490"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}