{"id":63,"date":"2018-06-21T09:44:32","date_gmt":"2018-06-21T07:44:32","guid":{"rendered":"https:\/\/blog.tests-performance.fr\/?p=63"},"modified":"2018-07-25T13:53:13","modified_gmt":"2018-07-25T11:53:13","slug":"jmeter-version-4-0","status":"publish","type":"post","link":"https:\/\/www.tests-performance.fr\/?p=63","title":{"rendered":"Jmeter 4.0"},"content":{"rendered":"<div class=\"social-media\">\n<p><span style=\"font-size: 35px; font-weight: bold;\">Jmeter Version 4.0<\/span><\/p>\n<\/div>\n<div class=\"section\">\n<h2 id=\"New and Noteworthy\" class=\"ch_section\">New and Noteworthy<\/h2>\n<h3 class=\"ch_title\">Core improvements<\/h3>\n<p>JMeter now supports JAVA 9.<\/p>\n<p>New\u00a0<a href=\"https:\/\/jmeter.apache.org\/usermanual\/component_reference.html#Boundary_Extractor\"><span class=\"code\">Boundary Extractor<\/span><\/a>\u00a0element available which provides easy extraction with better performances<\/p>\n<figure><a href=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/boundary_extractor.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/boundary_extractor.png\" alt=\"\" width=\"1078\" height=\"315\" \/><\/a><\/figure>\n<p>New\u00a0<a href=\"https:\/\/jmeter.apache.org\/usermanual\/component_reference.html#JSON_Assertion\"><span class=\"code\">JSON Assertion<\/span><\/a>\u00a0element available to assert on JSON responses.<\/p>\n<figure><a href=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/json_assertion.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/json_assertion.png\" alt=\"\" width=\"1095\" height=\"307\" \/><\/a><\/figure>\n<p>New\u00a0<a href=\"https:\/\/jmeter.apache.org\/usermanual\/component_reference.html#Precise_Throughput_Timer\"><span class=\"code\">Precise Throughput Timer<\/span><\/a>\u00a0element available which produces Poisson arrivals with given constant throughput.<\/p>\n<figure><a href=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/precise_throughput_timer.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/precise_throughput_timer.png\" alt=\"\" width=\"1080\" height=\"381\" \/><\/a><\/figure>\n<p>JMS Point-to-Point sampler has been enhanced with\u00a0<span class=\"code\">read<\/span>,\u00a0<span class=\"code\">browse<\/span>,\u00a0<span class=\"code\">clear<\/span>\u00a0options.<\/p>\n<figure><a href=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/jmsptp_communication_styles.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/jmsptp_communication_styles.png\" alt=\"\" width=\"1080\" height=\"489\" \/><\/a><\/figure>\n<p>Best property values are now selected on many Test Elements to ensure best practices are the defaults:<\/p>\n<ul>\n<li>Newly added\u00a0<span class=\"code\">If Controller<\/span>\u00a0now uses by default Expression which is the most performing option.<br \/>\n<figure><a href=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/if_controller_condition.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/if_controller_condition.png\" alt=\"\" width=\"716\" height=\"248\" \/><\/a><\/figure>\n<figure><a href=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/if_controller_expression.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/if_controller_expression.png\" alt=\"\" width=\"717\" height=\"251\" \/><\/a><\/figure>\n<\/li>\n<li>Newly added JSR223 Test Element now cache compiled script by default if language used provides this feature.<br \/>\n<figure><a href=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/jsr223_cache_compilation.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/jsr223_cache_compilation.png\" alt=\"\" width=\"346\" height=\"49\" \/><\/a><\/figure>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/jmeter.apache.org\/usermanual\/component_reference.html#Loop_Controller\"><span class=\"code\">Loop controller<\/span><\/a>\u00a0and\u00a0<a href=\"https:\/\/jmeter.apache.org\/usermanual\/component_reference.html#ForEach_Controller\"><span class=\"code\">ForEach Controller<\/span><\/a>\u00a0now expose their current iteration as a variable named\u00a0<span class=\"code\">__jm__&lt;Name of your element&gt;__idx<\/span>\u00a0that you can use like this for example for a Loop Controller named\u00a0<span class=\"code\">MyLoopController<\/span>:<\/p>\n<pre class=\"source\">${__jm__MyLoopController__idx}<\/pre>\n<p>. See\u00a0<a href=\"https:\/\/bz.apache.org\/bugzilla\/show_bug.cgi?id=61802\">Bug 61802<\/a>Cookies are now shown in View Results Tree during recording. They were previously always shown as empty.<\/p>\n<p><a href=\"https:\/\/jmeter.apache.org\/usermanual\/component_reference.html#Response_Assertion\"><span class=\"code\">Response Assertion<\/span><\/a>\u00a0now allows you to customize assertion message and assert on Request Data.<\/p>\n<figure><a href=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/response_assertion_enhancements.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/response_assertion_enhancements.png\" alt=\"\" width=\"909\" height=\"617\" \/><\/a><\/figure>\n<h3 class=\"ch_title\">UX improvements<\/h3>\n<p>JMeter now uses\u00a0<a href=\"https:\/\/github.com\/bulenkov\/Darcula\">Darcula LAF<\/a>\u00a0by default<\/p>\n<p>Workbench has been dropped from UI, you can now use Non Test Elements as immediate children of Test Plan.<\/p>\n<figure><a href=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/goodbye_workbench.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/goodbye_workbench.png\" alt=\"\" width=\"282\" height=\"144\" \/><\/a><\/figure>\n<p>Menu UX have been improved to make most used elements available more rapidly.<\/p>\n<figure><a href=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/menu_organization.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/menu_organization.png\" alt=\"\" width=\"711\" height=\"322\" \/><\/a><\/figure>\n<p>HTTP(S) Test Script Recorder now allows you to name your transactions while recording in a more human readable way.<\/p>\n<figure><a href=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/recorder_naming_samplers.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/recorder_naming_samplers.png\" alt=\"\" width=\"1011\" height=\"502\" \/><\/a><\/figure>\n<p>UX improvements made on, among the most notable :<\/p>\n<ul>\n<li>Module Controller informs user at least one Controller is required<\/li>\n<li>Function Helper Dialog (The wizard that helps using and testing functions) has been improved in many fields.<br \/>\n<figure><a href=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/function_helper_dialog_enhancements.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jmeter.apache.org\/images\/screenshots\/changes\/4.0\/function_helper_dialog_enhancements.png\" alt=\"\" width=\"772\" height=\"315\" \/><\/a><\/figure>\n<\/li>\n<li>Switch Controller trims text to avoid issues when a space is introduced before\/after name<\/li>\n<li>Test Plan is now saved before running the test plan<\/li>\n<\/ul>\n<h3 class=\"ch_title\">Functions<\/h3>\n<p>New Function\u00a0<a href=\"https:\/\/jmeter.apache.org\/usermanual\/functions.html#__digest\"><span class=\"code\">__digest<\/span><\/a>\u00a0provides easy computing of SHA-XXX, MDX hashes:<\/p>\n<pre class=\"source\">${__digest(MD5,Apache JMeter 4.0 rocks !,,,)}<\/pre>\n<p>will return\u00a0<span class=\"code\">0e16c3ce9b6c9971c69ad685fd875d2b<\/span>New Function\u00a0<a href=\"https:\/\/jmeter.apache.org\/usermanual\/functions.html#__dateTimeConvert\"><span class=\"code\">__dateTimeConvert<\/span><\/a>\u00a0provides easy conversion between date formats:<\/p>\n<pre class=\"source\">${__dateTimeConvert(01 Jan 2017,dd MMM yyyy,dd\/MM\/yyyy,)}<\/pre>\n<p>will return\u00a0<span class=\"code\">01\/01\/2017<\/span>New Function\u00a0<a href=\"https:\/\/jmeter.apache.org\/usermanual\/functions.html#__changeCase\"><span class=\"code\">__changeCase<\/span><\/a>\u00a0provides ability to switch to Upper \/ Lower \/ Capitalized cases<\/p>\n<pre class=\"source\">${__changeCase(Avaro omnia desunt\\, inopi pauca\\, sapienti nihil,UPPER,)}<\/pre>\n<p>will return\u00a0<span class=\"code\">AVARO OMNIA DESUNT, INOPI PAUCA, SAPIENTI NIHIL<\/span>New Functions\u00a0<a href=\"https:\/\/jmeter.apache.org\/usermanual\/functions.html#__isVarDefined\"><span class=\"code\">__isVarDefined<\/span><\/a>\u00a0and\u00a0<a href=\"https:\/\/jmeter.apache.org\/usermanual\/functions.html#__isPropDefined\"><span class=\"code\">__isPropDefined<\/span><\/a>\u00a0provide testing of properties and variables availability<\/p>\n<pre class=\"source\">${__isPropDefined(START.HMS)}<\/pre>\n<p>will return\u00a0<span class=\"code\">true<\/span><\/p>\n<pre class=\"source\">${__isVarDefined(JMeterThread.last_sample_ok)}<\/pre>\n<p>will return\u00a0<span class=\"code\">true<\/span><\/p>\n<h3 class=\"ch_title\">Scripting and Plugin Development<\/h3>\n<p>You can now call\u00a0<span class=\"code\">SampleResult#setIgnore()<\/span>\u00a0if you don&#8217;t want your sampler to be visible in results<\/p>\n<p><span class=\"code\">JavaSamplerContext<\/span>\u00a0used by\u00a0<span class=\"code\">AbstractJavaSamplerClient<\/span>\u00a0has been enhanced with new methods to easy plugin development.<\/p>\n<p>JMeter now distributes additional Maven sources and javadoc artifacts into\u00a0<a href=\"https:\/\/repo1.maven.org\/maven2\/org\/apache\/jmeter\/ApacheJMeter_core\/4.0\/\">Maven repository<\/a><\/p>\n<p>Plugins can now register listeners to be notified when a Test Plan is opened\/closed<\/p>\n<\/div>\n<p>And more :\u00a0<a href=\"https:\/\/jmeter.apache.org\/changes.html\">https:\/\/jmeter.apache.org\/changes.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jmeter Version 4.0 New and Noteworthy Core improvements JMeter now supports JAVA 9. New\u00a0Boundary Extractor\u00a0element available which provides easy extraction with better performances New\u00a0JSON Assertion\u00a0element available to assert on JSON responses. New\u00a0Precise Throughput Timer\u00a0element available which produces Poisson arrivals with given constant throughput. JMS Point-to-Point sampler has been enhanced with\u00a0read,\u00a0browse,\u00a0clear\u00a0options. Best property values are now [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[27],"class_list":["post-63","post","type-post","status-publish","format-standard","hentry","category-jmeter","tag-tests-de-performance"],"acf":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=\/wp\/v2\/posts\/63","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=63"}],"version-history":[{"count":6,"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=\/wp\/v2\/posts\/63\/revisions"}],"predecessor-version":[{"id":1017,"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=\/wp\/v2\/posts\/63\/revisions\/1017"}],"wp:attachment":[{"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tests-performance.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}