Creates test files for The Grinder based on HTTP Archive (HAR) files generated by Chrome DevTools.
The har2grinder script creates a test file, which can be run by The Grinder load testing framework.
The test files are generated from HTTP Archive (HAR) files, which can be generated using Chrome DevTools.
-
Fire up Chrome and open the DevTools.
-
Open the Network tab of the DevTools.
-
Clear the Network history ("no entry" icon).
-
Choose the option to
Preserve log
upon navigation. -
Choose the option to
Disable cache
. -
Navigate around your site.
-
After you navigate to the pages you want to test, right-click on the network history panel and choose "Copy > Copy All as HAR". Save the clipboard to a .har file.
For more information check out my blog post.
To convert the recorded navigation to a Grinder test, run the har2grinder
script:
python har2grinder.py my_website_test.har > my_website_grinder_test.py
You can specify options by creating a file named settings.py
in the directory which holds the har2grinder
script.
Currently supported options:
SLEEP_BETWEEN_PAGES
- the time which Grinder will wait after loading the first page before proceeding to the next [milliseconds].EXCLUDED_DOMAINS
- a tuple, which list domains for files hosted by external CDNs, which are not part of your test.
- no support for websockets