Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jimmy-ly00/pageload-har-export
Automate network Page Load testing with Firefox + Selenium IDE + har-export-trigger
https://github.com/jimmy-ly00/pageload-har-export
firefox har linux performance-testing python selenium-ide testing-tools
Last synced: 11 days ago
JSON representation
Automate network Page Load testing with Firefox + Selenium IDE + har-export-trigger
- Host: GitHub
- URL: https://github.com/jimmy-ly00/pageload-har-export
- Owner: jimmy-ly00
- License: mit
- Created: 2017-07-22T22:45:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-02T22:21:40.000Z (over 7 years ago)
- Last Synced: 2024-11-07T21:08:25.472Z (2 months ago)
- Topics: firefox, har, linux, performance-testing, python, selenium-ide, testing-tools
- Language: JavaScript
- Size: 236 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Page Load Testing
Automates page load testing with Firefox + Selenium IDE + har-export-trigger. Exports to HAR to view page timings and resource loading times.
Originally used to test websites against a mid-latency network.Raw sampled HAR data also provided.
Note: It does not use page ready method as it is unreliable (especially for JavaScript rendered websites) because it sometimes does not wait for DOM completion
## Prerequisite
```
pip install haralyzer
```
**Optional** (for graph.py script, can be omitted):
```
pip install matplotlib (may require sudo apt-get install python-tk)
pip install numpy
```
## Environment
Linux and Firefox 54 (should work with 42+)## Installation - Firefox and Selenium IDE setup
### Firefox
#### 1. about:debugging
Load temporary add-on: **harexporttrigger-0.5.0-beta.10.xpi** (currently no signed version by developer)
#### 2. about:config
use these settings:
````
extensions.netmonitor.har.contentAPIToken = "test"
extensions.netmonitor.har.enableAutomation = "true"
````
#### 3. (Optional) In Firefox Developer Tools (F12):
```settings > tick "disable HTTP Cache"```### Selenium IDE
Download and install https://addons.mozilla.org/en-GB/firefox/addon/selenium-ide/## How to use
1. Open Firefox with the above settings
2. Open Firefox Developer Tools and then visit a website for testing. Genereated HAR files are located at (usually) ```~/.mozilla/firefox/[user]/har/logs```
4. To automate using Selenium script:
1. Go to about:addons and Selenium IDE "Preferences"
2. Under "Selenium Core Extensions", select **user-extension.js** as provided (make sure while.js is in the same directory)
3. Go to ```Firefox > Tools > Selenium IDE ```
4. Right click "Add Test Case" and select the **selenium** file as provided
5. Run test case
5. Put **graph.py** script inside ~/.mozilla/firefox/[user]/har/logs folder and run ``` ./graph.py ```## Resources
https://github.com/firebug/har-export-triggerhttps://addons.mozilla.org/en-GB/firefox/addon/selenium-ide/
http://www.software-testing-tutorials-automation.com/2013/07/example-of-while-and-endwhile-loop.html