Daily integration tests

Integration tests

Integration tests, E2E tests, browser testing: these types of tests examine the final form of the application before it can be shipped to the client. For example, Selenium tests "click" through every component on the website, checking if everything works according to the expectations (backend, frontend, databases, etc.).

Integration tests usually take more time than unit tests, often lasting even a few hours. In such case, it's a good practice to configure the testing pipeline at a specific time. In this article, we'll show you how to configure a pipeline that will run your tests once a day.

Daily integration tests

The first thing is selecting the Git provider and the project that you want to test: Creating a new project

Now you can configure the pipeline details. Select the branch and switch the trigger mode to 'Recurrently' and set the hour and time interval at which you want the tests to run. In this example, we set it to run at 17:00 (5 PM): Adding a new pipeline

Cron configuration

If you need more advanced timing, you can define the recurrence with a CRON string. For example, setting the string to 0 0 17 ? \* MON,TUE,WED,THU,FRI \* will force Buddy to run the pipeline at 17:00 from Monday to Friday only. To set up cron, switch the config mode to 'Advanced': Pipeline configuration

Tests configuration

The last step is setting up the tests. Buddy uses isolated containers with preconfigured testing environment. All you need to do is select the build action from the action roster and enter the commands that will run your tests: Test configuration

To learn more about how the builds work and how to customize your build environment, click here.

Integration tests can be split and run in parallel to drastically shorten the execution time. You can also add a notification action at the end of the pipeline that will notify your team in case the tests detect any errors: Split tests pipeline example

See also