Converting a HAR file to a Gatling Simulation provides an accurate representation of user behavior than record & playback. We import HAR files in Gatling Recorder to understand user behaviors to create simulations. Our suggestion to a newbie is “Use record and playback option to learn a tool, however, do not record your scripts.”
From our experience in performance testing, we have rarely seen an accurate representation of user behavior through record and playback, in spite of that we have one more option for recording that is saving & importing web browser’s interactions in Gatling recorder. Let’s see how to do it.
Menu -> More Tools -> Developer Tools, Go to Network Tab and Make sure Preserve log is checked
After you finish navigating the website, right click on the requests you want to export
Launch Gatling recorder
Select HAR Converter in Recorder Mode
Import the saved HAR file in the recorder and click Start button
After the successful import, you can view the recorded file in the below path.