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.
Step-1
Menu -> More Tools -> Developer Tools, Go to Network Tab and Make sure Preserve log is checked
Step-2
After you finish navigating the website, right click on the requests you want to export
Step-3
Launch Gatling recorder
%GATLING_HOME%binrecorder.bat
Step-4
Select HAR Converter in Recorder Mode
Step-5
Import the saved HAR file in the recorder and click Start button
Step-6
After the successful import, you can view the recorded file in the below path.
%GATLING_HOME%user-filessimulationsRecordedSimulation.scala
Comments(0)