diff --git a/docs/docs/articles/scheduling-tests.md b/docs/docs/articles/scheduling-tests.mdx similarity index 80% rename from docs/docs/articles/scheduling-tests.md rename to docs/docs/articles/scheduling-tests.mdx index 5004b414847..5d1c6fabc46 100644 --- a/docs/docs/articles/scheduling-tests.md +++ b/docs/docs/articles/scheduling-tests.mdx @@ -1,14 +1,45 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Scheduling Tests + + + +## Create a Scheduled Test or Test Suite from the Testkube Dashboard + +In order to run Tests and Test Suites on a regular basis, we support a scheduling mechanism for these objects. +CRDs both for Tests and Test Suites contain a **schedule** field used to define rules for launching them in time. +Testkube's schedule data format is the same that is used to define Kubernetes Cron jobs (check Wikipedia Cron format for details ). + +## Scheduling Architecture + +Testkube uses the scheduling engine from Kubernetes Cron jobs. +In fact, for each scheduled Test or Test Suite, a special cron job is created from this [template](ttps://github.com/kubeshop/helm-charts/tree/main/charts/testkube-operator/cronjob-template.yml). + +Technically, it is a callback to the Testkube API server method, launching either Test or Test Suite execution. + +This works similarly to scheduled Test and Test Suite executions done by external scheduling platforms. + +In the Testkube Dashboard, when you have selected a Test or Test Suite, in the **Settings** tab, click on **Scheduling** to create a schedule for the Test or Test Suite. + +![Schedule Tests](../img/schedule-tests.png) + +![Schedule Tests Test Suites](../img/schedule-test-suites.png) + + + + + In order to run Tests and Test Suites on a regular basis, we support a scheduling mechanism for these objects. CRDs both for Tests and Test Suites contain a **schedule** field used to define rules for launching them in time. -Testkube's schedule data format is the same that is used to define Kubernetes Cron jobs (check Wikipedia Cron format for details . +Testkube's schedule data format is the same that is used to define Kubernetes Cron jobs (check [Wikipedia Cron format](https://en.wikipedia.org/wiki/Cron) for details. ## Scheduling Architecture Testkube uses the scheduling engine from Kubernetes Cron jobs. -In fact, for each scheduled Test or Test Suite, a special cron job is created from this template: -. +In fact, for each scheduled Test or Test Suite, a special cron job is created from this [template](https://github.com/kubeshop/helm-charts/tree/main/charts/testkube-operator/cronjob-template.yml). + Technically, it is a callback to the Testkube API server method, launching either Test or Test Suite execution. This works similarly to scheduled Test and Test Suite executions done by external scheduling platforms. @@ -164,12 +195,5 @@ kubectl testkube get tse The Test Suite is successfully executed on the stated schedule. -## Create a Scheduled Test or Test Suite from the UI - -In the Testkube UI, when you have selected a Test or Test Suite, in the **Settings** tab, click on **Scheduling** to create a schdule for the Test or Test Suite. - -![Schedule Tests](../img/schedule-tests.png) - - - - + + diff --git a/docs/docs/articles/test-triggers.md b/docs/docs/articles/test-triggers.mdx similarity index 84% rename from docs/docs/articles/test-triggers.md rename to docs/docs/articles/test-triggers.mdx index 539f697b8ee..8c63c247541 100644 --- a/docs/docs/articles/test-triggers.md +++ b/docs/docs/articles/test-triggers.mdx @@ -1,5 +1,47 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Triggers + + + +Testkube allows you to automate running tests and test suites by defining triggers on certain events for various Kubernetes resources. + +## What is a Testkube Test Trigger? + +In generic terms, a _Trigger_ defines an _action_ which will be executed for a given _execution_ when a certain _event_ on a specific _resource_ occurs. For example, we could define a _TestTrigger_ which _runs_ a _Test_ when a _ConfigMap_ gets _modified_. + +Watch our [video guide](#video-tutorial) on using Testkube Test Triggers to perform **Asynchronous Testing in Kubernetes**. + +## Creating Test Triggers in the Testkube Dashboard + +Click on the lightening bolt icon on the left of the Testkube IDE to open the dialog to create test triggers. Any current test triggers will be listed and the `Create a new trigger` button is at the top right of the screen. + +![Trigger Screen](../img/trigger-screen.png) + +The `Create new trigger` dialog opens: + +![Create Trigger](../img/create-trigger.png) + +Input the condition that will cause the trigger and click `Next`. + +Input the action that will be the result of the trigger condition happening and click `Create`. + +![Create Trigger Action](../img/create-trigger-action.png) + +Get all the details in the video below! + +## Video Tutorial + + + + + + + + + Testkube allows you to automate running tests and test suites by defining triggers on certain events for various Kubernetes resources. ## What is a Testkube Test Trigger? @@ -143,25 +185,9 @@ Kubernetes API and gets notified by Kubernetes on each event on the watched reso Testkube exposes CRUD operations on test triggers in the REST API. Check out the [Open API](../openapi.md) docs for more info. -## Creating Test Triggers in the Testkube Dashboard - -Click on the lightening bolt icon on the left of the Testkube IDE to open the dialog to create test triggers. Any current test triggers will be listed and the `Create a new trigger` button is at the top right of the screen. - -![Trigger Screen](../img/trigger-screen.png) - -The `Create new trigger` dialog opens: - -![Create Trigger](../img/create-trigger.png) - -Input the condition that will cause the trigger and click `Next`. - -Input the action that will be the result of the trigger condition happening and click `Create`. - -![Create Trigger Action](../img/create-trigger-action.png) - -Get all the details in the video below! - ## Video Tutorial + + diff --git a/docs/docs/img/schedule-test-suites.png b/docs/docs/img/schedule-test-suites.png new file mode 100644 index 00000000000..2d23dadf309 Binary files /dev/null and b/docs/docs/img/schedule-test-suites.png differ