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:
Image loading...
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):
Image loading...
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 the cron, switch the config mode to Cron:
Image loading...
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:
Image loading...
Integration tests can be split and run in parallel to drastically shorten the execution time:
Image loading...
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.
Image loading...
Last modified on Sep 23, 2024