Configuring Periodic Builds Premium/Enterprise

Periodic builds allow you to run your scenarios on a regular basis, which is a must on production servers.

Only publicly accessible websites can be targeted by Blackfire to run scheduled scenarios. As such you need to properly configure your environment by setting an accessible endpoint.

This can be done in the Settings tab of your environment.

/docs/environment-endpoint.png

Note

If your environment is configured as a development environment, you may need to use our SDK.

Please note that, for now, only the PHP SDK enables you to trigger builds.

There are 2 ways to configure periodic builds:

You then need to enable the periodic builds:

/docs/environment-enable-periodic-builds.png

Builds can be run in the following intervals (only one can be chosen):

  • Every 24 hours;
  • Every 12 hours;
  • Every 6 hours;
  • Every hour.

You may specify advanced settings such as:

  • Disable SSL certificates verification;
  • Forcing the IP address, in case the name is not declared in public DNS;
  • HTTP Username and Password.

Configuring URLs to be Tested

This is the simplest way to define periodic builds.

In your Environment Dashboard, scroll down until you see the Configuration panel, and click on the edit icon to add URLs to test:

/docs/environment-configuration.png /docs/environment-tested-urls.png

The tests defined in your .blackfire.yaml file will be run for each configured URL.

If no tests are defined, Blackfire will only evaluate recommendations. However, these recommendations will not make your build fail.

Note

In this mode, you are only able to test URLs using HTTP GET method.

Defining Scenarios

The most comprehensive way to run builds is to define your own scenarios in your .blackfire.yaml file.

Writing scenarios gives you total control on the test browser behavior, to use other HTTP methods than GET, to click on buttons, and to check elements in resulted pages (JSON and HTML are supported).

Builds Comparison

When using builds, it is possible to compare one build to another, with the help of percent() and diff() functions in your assertions.

The comparison is always made between the current build and a reference build. As for periodic builds, the reference build is the last successful build in the same environment.