Web Page testing
PHP JavaScript CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
css
img
netsniff
.gitignore
README.md
banner.conf.sample
conf_default.php
get_dns.php
get_har.php
get_mtr.php
get_ssl_cert.php
get_ssl_ciphers.php
get_url.php
index.php
override_functions.php.sample
screenshot1.png
screenshot2.png
tools.php
tools_ssl.php
waterfall.php

README.md

fantomTest

FantomTest started as a simple webapp that allows you to obtain HTTP performance of a web page by getting the timings for all web page resources and plotting them in a waterfall chart. This has been expanded to also include

  • individual URL test using CURL
  • DNS resolution
  • Ping/MTR results
  • TLS certificates
  • TLS Ciphers supported by the remote server

To get timings we are utilizing the excellent PhantomJS semi-headless webKit browser. PhantomJS will render a URL with all it's resources and produce HAR (HTTP Archive) which is parsed to plot the waterfall chart.

Installation

  • Download and install PhantomJS from http://www.phantomjs.org/. Install it in e.g. /opt/phantomjs.

  • Install PHP scripts somewhere in the Web Server HTDOCS area e.g. /var/www/fantomtest

  • Configure conf.php. In most cases you will only need to configure the location of phantomjs binary e.g.

    $conf['phantomjs_bin'] = "/opt/phantomjs/phantomjs";

  • You can override any value in conf_default.php with the value in conf.php

  • Now open up fantomTest in your browser.

Configuration

If you install fantomtest on multiple nodes ie. say you have servers in Europe, USA you can access stats from a single interface by configuring URLs in conf.php. Simply add following to your conf file.

$conf['remotes'][] = array("name" => "US", "provider" => "http_get", "base_url" => "http://myurl.usa/fantomtest/");

to add additional ones simply repeat the line with the new name and URL.

SlimerJS

There is also gecko (firefox) based scriptable browser similar to PhantomJS called SlimjerJS. It can be downloaded from

http://slimerjs.org/

To use it you need to install XVFB and use this in your conf.php

$conf['phantomjs_exec'] = "SLIMERJSLAUNCHER=/usr/bin/firefox DISPLAY=:1 xvfb-run /opt/slimerjs/slimerjs /var/www/fantomtest/phantomjs/netsniff-slimer.js ";

License

Apache