jmeter icon indicating copy to clipboard operation
jmeter copied to clipboard

Add ability to import a HAR

Open asfimport opened this issue 7 years ago • 5 comments

@pmouawad (Bug 62460): This can be an interesting way to easily create a Test Plan.

OS: All

asfimport avatar Jun 15 '18 13:06 asfimport

@pmouawad (migrated from Bugzilla): Candidate Librariy:

  • https://github.com/sdstoehr/har-reader

asfimport avatar May 10 '19 01:05 asfimport

I think this would be a really useful feature, and see as the original ticket didn't go into a lot of detail I'll provide my use case. When I need to run a load test on a website I want to capture all of the requests that happen during a page load and replay them through JMeter. The current way of doing this is:

  • Create an HTTP(S) Test Script Recorder
  • Create a Recording Controller
  • Click start on the Test Script Recorder
  • Configure your browser to use JMeter as a proxy
  • Load the page, ignoring the TLS warning
  • Stop the recording
  • Remove the proxy configuration from your browser
  • Go through the recorded requests to remove requests from other browser tabs and the browser itself.

This can be a very time consuming process if you need to add many pages to your test plan. Compare this to a potential workflow that uses HAR files.

  • Open the developer tools in your browser
  • Load the page
  • In the Network tab of the dev tools, right click and export as a HAR file.
  • In JMeter right click on the Thread Group and click "Add HTTP requests from HAR file"

AaronAsAChimp avatar Feb 03 '23 19:02 AaronAsAChimp

This would indeed be a very useful feature that is highly desirable to add to the application.

On Fri, Feb 3, 2023 at 9:11 PM Aaron Spaulding @.***> wrote:

I think this would be a really useful feature, and see as the original ticket didn't go into a lot of detail I'll provide my use case. When I need to run a load test on a website I want to capture all of the requests that happen during a page load and replay them through JMeter. The current way of doing this is:

  • Create an HTTP(S) Test Script Recorder
  • Create a Recording Controller
  • Click start on the Test Script Recorder
  • Configure your browser to use JMeter as a proxy
  • Load the page, ignoring the TLS warning
  • Stop the recording
  • Remove the proxy configuration from your browser
  • Go through the recorded requests to remove requests from other browser tabs and the browser itself.

This can be a very time consuming process if you need to add many pages to your test plan. Compare this to a potential workflow that uses HAR files.

  • Open the developer tools in your browser
  • Load the page
  • In the Network tab of the dev tools, right click and export as a HAR file.
  • In JMeter right click on the Thread Group and click "Add HTTP requests from HAR file"

— Reply to this email directly, view it on GitHub https://github.com/apache/jmeter/issues/4797#issuecomment-1416286992, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXQDSTICBEUGEKJNEV5WQTWVVJ4PANCNFSM6AAAAAAUQTFGEU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Sincerely,

Shay Ginsbourg, M.Sc.

Mobile: 972 54 66 909 15 eMail: @.*** Website: Ginsbourg.co.il http://ginsbourg.co.il/ LinkedIn: linkedin.com/in/shayginsbourg Office: 57 Kedem St. Jaffa Israel 6817677

Software, Medical, and Mechanical Engineer. Performance, Automation, and Load Testing Expert. Regulatory Affairs Consultant. Freelancer since 2008.

sginsbourg avatar Feb 03 '23 21:02 sginsbourg

This will be very helpful to accelerate the creation of tests sessions while ensuring it's accurate with real usage of web app made from a real browser session. Do you have any update to share on this ?

YohanSciubukgian avatar Feb 18 '25 11:02 YohanSciubukgian

You could find 2 JMeter plugin tools to read a HAR file and create a JMeter script.

  • https://github.com/vdaburon/har-convertor-jmeter-plugin
  • https://github.com/Qytera-Gmbh/JMeterHARImporterPlugin

I don't think JMeter "standard" need this feature because you can use one of these plugins.

Regards. Vincent DAB.

vdaburon avatar Feb 19 '25 12:02 vdaburon