Daily 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.
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, switch the trigger mode to On schedule 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
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 the cron, switch the config mode to Cron:
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:
Integration tests can be split and run in parallel to drastically shorten the execution time:
Split tests pipeline example
You can also add a notification action in the On failure section in the pipeline that will notify your team in case the tests detect any errors.
Last modified on July 25, 2023