{"id":24580061,"url":"https://github.com/vdaburon/har-to-jmeter-convertor","last_synced_at":"2025-09-04T04:34:27.700Z","repository":{"id":227106003,"uuid":"770426867","full_name":"vdaburon/har-to-jmeter-convertor","owner":"vdaburon","description":"Convert a HAR file to JMX script file and record XML","archived":false,"fork":false,"pushed_at":"2025-03-27T08:57:27.000Z","size":2374,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-25T20:51:07.117Z","etag":null,"topics":["convertor","har","jmeter","jmeter-plugin","websocket"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vdaburon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-11T14:32:35.000Z","updated_at":"2025-05-22T07:18:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"22800483-2913-4492-ab75-262a70a8405a","html_url":"https://github.com/vdaburon/har-to-jmeter-convertor","commit_stats":null,"previous_names":["vdaburon/har-to-jmeter-convertor"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/vdaburon/har-to-jmeter-convertor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdaburon%2Fhar-to-jmeter-convertor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdaburon%2Fhar-to-jmeter-convertor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdaburon%2Fhar-to-jmeter-convertor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdaburon%2Fhar-to-jmeter-convertor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vdaburon","download_url":"https://codeload.github.com/vdaburon/har-to-jmeter-convertor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdaburon%2Fhar-to-jmeter-convertor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273551137,"owners_count":25125659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["convertor","har","jmeter","jmeter-plugin","websocket"],"created_at":"2025-01-24T01:32:35.862Z","updated_at":"2025-09-04T04:34:27.689Z","avatar_url":"https://github.com/vdaburon.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/vdaburon/har-to-jmeter-convertor/blob/main/doc/har_convertor_logo.png\" alt=\"har to jmeter convertor tool logo\"/\u003e\n\n  \u003cp align=\"center\"\u003eConvert a HAR file to a JMeter script and a Record XML file.\u003c/p\u003e\n  \u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/vdaburon/har-to-jmeter-convertor\"\u003eLink to github project har-to-jmeter-convertor\u003c/a\u003e\u003c/p\u003e\n\u003c/p\u003e\n\n# har-to-jmeter-convertor\n# Convert a HAR file to a JMeter script and a Record XML file.\n\nAn article about motivations to create this tool: https://dzone.com/articles/convert-a-har-file-to-jmeter-script\n\n## Creating a har file and run the tool har-to-jmx-convertor to simulate recording from the JMeter recording template\nThis tool har-to-jmx-convertor try to **simulate** a script JMeter and a record xml file recording from the **JMeter recording template**.\n\nSince version 7.0, **Websocket** is manage with samplers from the plugin \"WebSocket Samplers by Peter Doornbosch\".\n\n### JMeter recording template and HTTP(S) Test Script Recorder - The standard way to record\nThis demonstration use the web site from : https://petstore.octoperf.com\n\nThe JMeter recording template : \u003cbr/\u003e\n![JMeter recording template start](doc/images/jmeter_record_template_begin.png)\n\nThe result of recording with JMeter \"HTTP(S) Test Script Recorder\" : \u003cbr/\u003e\n![JMeter script and record](doc/images/jmeter_record_template_tree_view.png)\n\n### HAR created on a Browser (e.g. Firefox) - The new way with the convertor tool\nRecord the navigation in the web application with Developper tool : **Network** and **save** exchanges in **HAR** file format : \u003cbr/\u003e\n![Browser save HAR file](doc/images/browser_create_har.png)\n\nLaunch the \"Convertor tool\" : \u003cbr/\u003e\n![Step to create script and record from HAR file](doc/images/browsers_har_convertor_script_record.png)\n\nTool results : Open the script created and the record.xml in a View Results Tree \u003cbr/\u003e\n![Open the script created](doc/images/jmeter_script_record_created.png)\n\n\n### Standard HAR file created with Firefox, Chrome, Edge with external csv file for transaction information\nYou could add an external file that contains information about transaction name start and end.\n\n![Step to create script and record from HAR file and external csv file](doc/images/browers_har_external_csv_convertor_script_record.png)\n\nThe CSV format is :\n- \u003ccode\u003eTimestamp iso format GMT;TRANSACTION;transaction name;start\u003c/code\u003e for starting a new transaction\n- \u003ccode\u003eTimestamp iso format GMT;TRANSACTION;transaction name;stop\u003c/code\u003e for ending transaction the precedent transaction\n- Separator \";\"\n- Charset UTF-8\n\nE.g :\n\u003cpre\u003e\n2024-05-06T12:39:58.711Z;TRANSACTION;login;start\n2024-05-06T12:40:08.643Z;TRANSACTION;login;stop\n2024-05-06T12:40:20.880Z;TRANSACTION;home;start\n2024-05-06T12:40:37.634Z;TRANSACTION;home;stop\n\u003c/pre\u003e\n\nA simple tool named \"create-external-file-for-har\" create easily this csv file. https://github.com/vdaburon/create-external-file-for-har\n\nYou need to add the parameter and value : \u003ccode\u003e-external_file_infos c:/Temp/jpetstore.csv\u003c/code\u003e to set the csv file to read\n\n### HAR created with BrowserUp Proxy\nThis tool is compatible with Har file generated with BrowserUp Proxy.\n\nThe BrowserUp Proxy create a har and could filter url or content (no binary).\n\nThe proxy client could be a browser or a client http in an application.\n\nBrowserUp Proxy could be embedded in a java application or in Selenium java code application.\n\n![Step to create script and record from HAR file from BrowserUp](doc/images/browserup-proxy_har_convertor_script_record.png)\n\nThe BrowserUp Proxy **active** project is available at this url : \u003cbr/\u003e\n[Goto the BrowserUp Proxy active project](https://github.com/valfirst/browserup-proxy)\n\nNote : The BrowserMod Proxy tool is no more active (since september 2017) and it's recommended to migrate to BrowerUp proxy https://github.com/valfirst/browserup-proxy the \"valfirst\" GitHub username/project is important.\n\n### HAR created in Chrome Browser with the OpenText Professional Performance Engineering (LoadRunner) Web Recorder Chrome Extension\nThis tool is compatible with Har file generated with the LoadRunner Web Recorder Chrome Extension.\n\nThe main advantage is to declare **Transaction Names when recording** and navigate to the web site. This transactions will be Page Names (Transaction Controllers names) in the JMeter script.\n\n![Step to create script and record from HAR file from LoadRunner Web Recorder](doc/images/lrwr_chrome_extension_har_convertor_script_record.png)\n\nThe OpenText Professional Performance Engineering (LoadRunner) Web Recorder Chrome Extension is available at this url : \u003cbr/\u003e\n[Download the Recorder extension for Chrome : \"HarGeneratorChrome\"](https://marketplace.opentext.com/appdelivery/content/recorder-extension-for-chrome)\n\nYou need to add the parameter and value : \u003ccode\u003e-use_lrwr_infos transaction_name\u003c/code\u003e to indicate that is a HAR file generated with LoadRunner Web Recorder (lrwr).\n\n## Websocket use the plugin \"WebSocket Samplers by Peter Doornbosch\"\nIf your Har file contains WebSocket Connection and Messages, set the parameter \u003ccode\u003e-ws_with_pdoornbosch true\u003c/code\u003e, this tool will try to create Websocket Samplers in the JMeter script generated and the exchanges in the Recording XML file.\n\nDocumentation at : https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/master/\n\nThe HAR is record from **Chrome** Browser not Firefox Browser and not Egde Browser (research in har file the attribute : '_webSocketMessages').\n\nCurrently limitation to only one websocket connection and multi text messages (send or receive) in this websocket connection (binary message is not tested).\n\nText message could be on \"STOMP\" format (https://en.wikipedia.org/wiki/Streaming_Text_Oriented_Messaging_Protocol) or no \"STOMP\" (simple text).\n\nNeed the plugin \"WebSocket Samplers by Peter Doornbosch\" to open the generated script that contain Websocket Samplers.\n\nThis demonstration use the web site : https://websocket.org/tools/websocket-echo-server/\n\n![Script generated with Websocket samplers and xml record messages](doc/images/jmeter_websocket_script_and_xml_record.png)\n\n\n## Parameters\nParameters are :\n* har_in the HAR file to read (exported HAR from Web Browser :  Chrome, Firefox, Edge ...)\n* jmx_out the file JMeter script generated\n* record_out create the record xml file from the har file (could be open with the Listener View Results Tree) \u003cbr/\u003e\n  e.g. record_out = record.xml\n* add_result_tree_record, add a View Result Tree to view the Recording XML File Generated (default true), the record_out must be not empty\n* filter_include, the regular expression matches the URL to Include (first filter) \u003cbr/\u003e\n    * default all = empty (no filter)\n    * e.g. filter_include=https://mysite.com/.*\n* filter_exclude, the regular expression matches the URL to Exclude (second filter) \u003cbr/\u003e\n    * default all = empty (no filter)\n    * e.g. filter_exclude=https://notmysite.com/.*\n    * or filter statics, filter_exclude=(?i).*\\\\.(bmp|css|js|gif|ico|jpe?g|png|swf|eot|otf|ttf|mp4|woff|woff2|svg)\n* add_pause boolean, use with parameter  new_tc_pause (default true), add Flow Control Action Pause\n* new_tc_pause time between 2 urls to create a new page (Transaction Controller) \u003cbr/\u003e\n    * e.g. 5000 for 5 sec between 2 urls\n* remove_cookie, remove header with cookie because use a Cookie Manager (default true)\n* remove_cache_request, remove request cache header because use a Cache Manager (default true)\n* page_start_number, set the start page number for partial recording (default 1, must be an integer \u003e 0)\n* sampler_start_number, set the start sampler number for partial recording (default 1, must be an integer \u003e 0)\n* use_lrwr_infos, the har file has been generated with LoadRunner Web Recorder Chrome extension and contains Transaction Name, expected values : 'transaction_name' or don't add this parameter\n* external_file_infos, external csv file contains information about Timestamp, Transaction Name, date start or end.\n* ws_with_pdoornbosch boolean, manage websocket messages with the JMeter plugin from Peter DOORNBOSH (default false), if true need the plugin 'WebSocket Samplers by Peter Doornbosch' to open the generated script.\n\n## Command line tool (CLI)\nThis tool could be use with script shell Windows or Linux.\n\nHelp to see all parameters :\n\n\u003cpre\u003e\nC:\\apache-jmeter\\bin\u0026gt;java -jar har-to-jmeter-convertor-7.0-jar-with-dependencies.jar -help\n\nINFOS: Start main\nusage: io.github.vdaburon.jmeter.har.HarForJMeter [-add_pause \u0026lt;add_pause\u0026gt;] [-add_result_tree_record\n       \u0026lt;add_result_tree_record\u0026gt;] [-external_file_infos \u0026lt;external_file_infos\u0026gt;] [-filter_exclude \u0026lt;filter_exclude\u0026gt;]\n       [-filter_include \u0026lt;filter_include\u0026gt;] -har_in \u0026lt;har_in\u0026gt; [-help] -jmx_out \u0026lt;jmx_out\u0026gt; [-new_tc_pause \u0026lt;new_tc_pause\u0026gt;]\n       [-page_start_number \u0026lt;page_start_number\u0026gt;] [-record_out \u0026lt;record_out\u0026gt;] [-remove_cache_request\n       \u0026lt;remove_cache_request\u0026gt;] [-remove_cookie \u0026lt;remove_cookie\u0026gt;] [-sampler_start_number \u0026lt;sampler_start_number\u0026gt;]\n       [-use_lrwr_infos \u0026lt;use_lrwr_infos\u0026gt;] [-ws_with_pdoornbosch \u0026lt;ws_with_pdoornbosch\u0026gt;]\nio.github.vdaburon.jmeter.har.HarForJMeter\n -add_pause \u0026lt;add_pause\u0026gt;                             Optional boolean, add Flow Control Action Pause after Transaction\n                                                    Controller (default true)\n -add_result_tree_record \u0026lt;add_result_tree_record\u0026gt;   Optional boolean, add 'View Result Tree' to view the record.xml file\n                                                    created (default true), record_out must be not empty\n -external_file_infos \u0026lt;external_file_infos\u0026gt;         Optional, csv file contains external infos : timestamp transaction\n                                                    name and start or end\n -filter_exclude \u0026lt;filter_exclude\u0026gt;                   Optional, regular expression to exclude url\n -filter_include \u0026lt;filter_include\u0026gt;                   Optional, regular expression to include url\n -har_in \u0026lt;har_in\u0026gt;                                   Har file to read (e.g : my_file.har)\n -help                                              Help and show parameters\n -jmx_out \u0026lt;jmx_out\u0026gt;                                 JMeter file created to write (e.g : script.jmx)\n -new_tc_pause \u0026lt;new_tc_pause\u0026gt;                       Optional, create new Transaction Controller after request ms, same\n                                                    as jmeter property : proxy.pause, need to be \u0026gt; 0 if set. Usefully\n                                                    for Har created by Firefox or Single Page Application (Angular,\n                                                    ReactJS, VuesJS ...)\n -page_start_number \u0026lt;page_start_number\u0026gt;             Optional, the start page number for partial recording (default 1)\n -record_out \u0026lt;record_out\u0026gt;                           Optional, file xml contains exchanges likes recorded by JMeter\n -remove_cache_request \u0026lt;remove_cache_request\u0026gt;       Optional boolean, remove cache header in the http request (default\n                                                    true because add a Cache Manager)\n -remove_cookie \u0026lt;remove_cookie\u0026gt;                     Optional boolean, remove cookie in http header (default true because\n                                                    add a Cookie Manager)\n -sampler_start_number \u0026lt;sampler_start_number\u0026gt;       Optional, the start sampler number for partial recording (default 1)\n -use_lrwr_infos \u0026lt;use_lrwr_infos\u0026gt;                   Optional, the har file has been generated with LoadRunner Web\n                                                    Recorder and contains Transaction Name, expected value :\n                                                    'transaction_name' or don't add this parameter\n -ws_with_pdoornbosch \u0026lt;ws_with_pdoornbosch\u0026gt;         Optional boolean, Manage websocket messages with the JMeter plugin\n                                                    from Peter DOORNBOSH (default false), if true need the plugin from\n                                                    Peter DOORNBOSH to open the generated script\nE.g : java -jar har-for-jmeter-\u0026lt;version\u0026gt;-jar-with-dependencies.jar -har_in myhar.har -jmx_out scriptout.jmx -record_out\nrecording.xml -add_result_tree_record true -new_tc_pause 5000 -add_pause true -filter_include \"https://mysite/.*\"\n-filter_exclude \"https://notmysite/*\" -page_start_number 50 -sampler_start_number 250 -ws_with_pdoornbosch false\n\n\u003c/pre\u003e\n\n\n\u003cpre\u003e\nC:\\apache-jmeter\\bin\u003ejava -jar har-to-jmeter-convertor-7.1-jar-with-dependencies.jar -har_in \"myhar.har\" -jmx_out \"script_out.jmx\" -filter_include \"https://mysite.com/.*\" -filter_exclude \"https://notmysite.com/.*\" -add_pause true -new_tc_pause 5000\n\u003c/pre\u003e\n\n\u003cpre\u003e\n/var/opt/apache-jmeter/bin\u003ejava -jar har-to-jmeter-convertor-7.1-jar-with-dependencies.jar -har_in \"myhar.har\" -jmx_out \"script_out.jmx\" -record_out \"record.xml\" -add_pause true -new_tc_pause 5000\n\u003c/pre\u003e\n\n## Usage Maven\nThe maven groupId, artifactId and version, this plugin is in the **Maven Central Repository** [![Maven Central har-convertor-jmeter-plugin](https://maven-badges.herokuapp.com/maven-central/io.github.vdaburon/har-to-jmeter-convertor/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.vdaburon/har-to-jmeter-convertorr)\n\n```xml\n\u003cgroupId\u003eio.github.vdaburon\u003c/groupId\u003e\n\u003cartifactId\u003ehar-to-jmeter-convertor\u003c/artifactId\u003e\n\u003cversion\u003e7.1\u003c/version\u003e\n```\n\n## License\nLicensed under the Apache License, Version 2.0\n\n## Versions\nVersion 7.1 date 2025-03-27, Remove request headers from HTTP/2, these headers start with ':' likes \":authority\", \":method\", \":path\" or \":scheme\". Don't create httpSampler for url \"data:\".\n\nVersion 7.0 date 2025-02-27, Manage the websocket messages with 'WebSocket Samplers by Peter Doornbosch', add new boolean parameter 'ws_with_pdoornbosch' (default false).\n\nVersion 6.1 date 2025-01-28, correct a NullPointerException when creating the Recording XML file\n\nVersion 6.0 date 2024-09-19, add 'HTTP(S) Test Script Recorder' and 'View Results Tree' to view the Record.xml file created. Correct save file no url encoded name.\n\nVersion 5.3 date 2024-09-13, correct PUT with no parameter, no content and mime-type ==  null\n\nVersion 5.2 date 2024-06-20, correct extract parameters for mime type \"form-urlencoded\" ended with charset likes \"application/x-www-form-urlencoded; charset=xxx\"\n\nVersion 5.1 date 2024-05-15, compatible with har generated by browsermob-proxy tool (https://github.com/lightbody/browsermob-proxy) and csv external_file_infos contains transaction infos.\n\nVersion 5.0 date 2024-05-10, add an external csv file with transaction information for JMeter Transaction Controller Name. New parameter : \u003ccode\u003e-external_file_infos transaction_infos.csv\u003c/code\u003e. Correct Filter Include first filter and Filter Exclude second filter.\n\nVersion 4.0 date 2024-05-06, could read har file generated with the LoadRunner Web Recorder Chrome Extension that contains transaction name for JMeter Transaction Controller Name. New parameter \u003ccode\u003e-use_lrwr_infos transaction_name\u003c/code\u003e\n\nVersion 2.3 date 2024-03-30, encode value for x-www-form-urlencoded when value contains space ' ' or equal '=' or slash '/' or plus '+' characters. Correct add the content for body data for POST, PUT or PATCH if not x-www-form-urlencoded in the Record.xml file.\n\nVersion 2.2 date 2024-03-29, remove the header 'Content-length' because the length is computed by JMeter when the request is created. POST or PUT could have query string and body with content so add query string to the path. Set Content Encoding to UFT-8 for POST or PUT method and request Content-Type : application/json. Add body data content in Record.xml for PUT and PATCH methods.\n\nVersion 2.1 date 2024-03-13, change the version in the code and the comment for the test plan. Use the extension to find is response is text or bin.\n\nVersion 2.0 date 2024-03-12, for POST multipart/form-data don't put the content of the file in the Record.xml file because binary content could be large and not XML compatible, add parameters : page_start_number and sampler_start_number to facilitate partial recording of website navigation.\n\nVersion 1.0 date 2024-03-11, First Release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdaburon%2Fhar-to-jmeter-convertor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvdaburon%2Fhar-to-jmeter-convertor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdaburon%2Fhar-to-jmeter-convertor/lists"}