Skip to content

settings.json

A settings.json in the project root keeps your settings between runs.

Create the file

The easiest route is to let the tool write out the setup currently in force:

python default.py --save-setting settings.json

Then edit the file and delete everything you don't want to control yourself. Alternatively, start from defaults/settings.json and do the same.

A short file is a good file

Every line you keep is a line that no longer follows along when the project updates its defaults. Keep only what you deliberately want to differ.

Examples

English reports with the review shown

{
  "general": {
    "language": "en",
    "review": {
      "show": true,
      "details": true
    }
  }
}

Firefox instead of Chrome, with caching

{
  "general": {
    "cache": {
      "use": true,
      "max-age": 120
    }
  },
  "tests": {
    "sitespeed": {
      "browser": "firefox",
      "iterations": 3
    }
  }
}

Your own Webbkoll backend and a local vulnerability database

{
  "tests": {
    "webbkoll": {
      "api-url": "http://localhost:8100"
    },
    "software": {
      "advisory.path": "/path/to/advisory-database"
    }
  }
}

Baking it into a Docker image

If you have your own settings.json you can put it in your own image so it travels with it:

FROM webperfse/webperf-core:latest
COPY settings.json /usr/src/runner/settings.json

More about custom Docker images

See also