https://github.com/technopagan/simple-website-speed-test
https://github.com/technopagan/simple-website-speed-test
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/technopagan/simple-website-speed-test
- Owner: technopagan
- Created: 2013-11-12T10:38:31.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-11-21T17:31:17.000Z (over 12 years ago)
- Last Synced: 2025-03-27T23:51:11.583Z (over 1 year ago)
- Language: Shell
- Size: 121 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
simple-website-speed-test
=========================
## Quick Start
* Usage: ./webspeedtest microsite.bats http://your-url.tld/somepage
## Introduction
Bash script to initiate [TAP compliant](http://www.testanything.org/) web performance metrics testing to be easily integrated with Jenkins or Travis CI
## Required Tools
* [Node.js](http://github.com/joyent/node)
* [PhantomJS](http://github.com/ariya/phantomjs/)
* [Phantomas](http://github.com/macbre/phantomas)
* [jq](http://stedolan.github.io/jq/)
* [BATS](http://github.com/sstephenson/bats)
For potential integration with Jenkins, check out this [plugin](https://wiki.jenkins-ci.org/display/JENKINS/TAP+Plugin).
## How to maintain the test suite:
All names for tests & their variables are derived from JSON object names
used by [Phantomas](https://github.com/macbre/phantomas) for consistency.
To create a new testable metric, find its respective JSON object name in
[the Phantomas documentation](https://github.com/macbre/phantomas#metrics).
Then add it to the array of test metric names within "Metrics_to_analyze"
in this script and create a test, using its name as the variable containing
the testable value, for it in "performance-tests.bats".
Example - testing that the time to first byte is less than 200ms:
* performance-tests.sh:
```bash
Metrics_to_analyze=('timeToFirstByte' '...' '...' '...')
```
* performance-tests.sh:
```bash
@test "Time to first byte" {
[ "$timeToFirstByte" -lt 200 ]
}
```