Documentation / Introduction

Introduction

Browsertime lets you automate running JavaScript in your browser primary used to collect performance metrics. What exactly does that mean?

We think of a Browsertime as having four key capabilities:

  • It handles everything with the browser (Firefox/Chrome).
  • It executes a batch of default and configurable JavaScript when the URL has finished loading in the browser.
  • It records a video of the Browser screen used to calculate Visual Metrics.
  • It lets you run Selenium scripts before and after the browser access the URL (to login a user etc).

What is Browsertime good for?

It is usually used for two different things:

  • You run it as a standalone tool to collect performance timing metrics of your web site.
  • You integrate it in your tool as a JavaScript runner that collects whatever JavaScript metrics/information you want.

To understand how Browsertime does these things, let’s talk about how it works. Here’s an example of what happens when you give Browsertime a URL to test:

  1. You give your configuration to Browsertime.
  2. Browsertime uses the WebDriver (through Selenium) to start Firefox and Chrome (the implementations for the Webdriver is Chromedriver/Geckodriver).
  3. Browsertime starts FFMPEG to record a video of the browser screen
  4. The browser access the URL.
  5. When the page is finished loading (you can define yourself when that happens), Browsertime executes the default JavaScript timing metrics and collects:
  6. It also collects a HAR file that shows all requests/responses on the page.
  7. FFMpeg is stopped and the video is analysed. Browsertime collect Visual Metrics like Speed Index.

The result of the run is a JSON file with all the JavaScript metrics collected, a HAR file, a video recording of the screen and a screenshot.

Now it’s time for you to install and run Browsertime.