Performance Test Automation and CI/CD

Loading...

By now, you should know how to write performance tests, and automate them by defining scenarios to secure your critical user journeys.

In today's video, we explore automating even further by automating the Builds themselves.

You can see it's a big "Start Build" button in the Builds section of your Blakfire dashboard.

This is the most straightforward way to trigger a Build, when needed.

Below this button, you'll find a section called Periodic Builds.

Here, you can schedule automated Builds to run regularly, like every hour, every six hours, 12 hours or daily.

This periodic testing is a safety net for your application. It regularly checks your application's performance, making sure it meets your expectations. This helps you discover any performance issues early before your users notice them.

But we can do even better by preventing performance issues from ever reaching production. That's what you can achieve by integrating Blackfire Builds or synthetic monitoring into your CI/CD pipelines.

The first option is to trigger Blackfire Builds programmatically using Blackfire CLI or a cURL request.

In any case, the requirement is to generate a specific Build token from the UI.

Then a new Build can be triggered using the blackfire build-trigger command or via cURL (reference)

In both cases, we have the possibility to override the default endpoint. And we need to provide the UUID of the BLACKFIRE environment in which the Build report has to be sent to, and the token allowing the operation.

A specific title can also be provided to explain the context in which that Build was triggered.

The documentation provides more information for all different options.

There is notably the possibility to define a parent's Build id, which allows for using comparison functions when writing assertions.

Yes, you got that right.

You can even write assertion, evaluating the evolution of measurements between two builds. Therefore controlling the change performance in time.

How powerful is that?

Surely you already know your way to integrate a blackfire build-trigger command, or a cURL request as an extra step in your already configure deployment pipeline.

You could then block the deployment or prevent a pull request from being merged. We also have integrations with GitHub actions, Jenkins, TravisCI, or Platform-as-a-Service (PaaS) such as Platform.sh, Upsun, or Adobe Commerce Cloud.

Automation saves you time and helps prevent performance problems before the reach production.

It keeps your application consistently fast and reliable.

Now you have everything you need to become a Blackfire test suite expert.

Keep testing your application regularly. Improve incrementally your scenarios and automate your performance testing to ensure your users always have the best experience possible.