Kestra Plugin RunTests

Kestra Plugin RunTests

Certified

Run tests by query

Executes unit tests matching a tenant/namespace/flow query. Defaults to the current tenant, includes child namespaces, and marks failures as WARNING unless failOnTestFailure is true.

yaml
type: io.kestra.plugin.kestra.ee.tests.RunTests

Run all current tenant tests

yaml
id: run_tenant_tests
namespace: company.team

tasks:
  - id: run_tenant_all_tests
    type: io.kestra.plugin.kestra.ee.tests.RunTests
    auth:
      apiToken: "{{ secret('KESTRA_API_TOKEN') }}"
Properties

Select API authentication

Use either an API token or HTTP Basic (username/password); do not provide both.

Definitions
apiTokenstring

API token for bearer auth

autobooleanstring
Defaulttrue

Automatically retrieve credentials from Kestra's configuration if available

The default configuration can be configured globally inside the Kestra configuration file:

  • Set kestra.tasks.sdk.authentication.api-token to use an API token
  • Set kestra.tasks.sdk.authentication.username and kestra.tasks.sdk.authentication.password for HTTP basic authentication The Enterprise edition also provides setting a default configuration at the Namespace of Tenant level by an administrator.
passwordstring

Password for HTTP Basic auth

usernamestring

Username for HTTP Basic auth

Defaultfalse

Fail task on test failures

Defaults to false. When true, FAILED test suites set the task state to FAILED instead of WARNING.

Flow id filter

Optional flow identifier to scope test suites.

Defaulttrue

Include child namespaces

Defaults to true. Applies when namespace is set.

Override Kestra API endpoint

URL used for calls to the Kestra API. When null, renders {{ kestra.url }} from configuration; if still empty, defaults to http://localhost: 8080. Trailing slashes are stripped before use.

Namespace filter

If null, runs against the current tenant. Set to limit to a namespace; includeChildNamespaces controls recursion.

Reference (ref) of the pluginDefaults to apply to this task.

Override target tenant

Tenant identifier applied to API calls; defaults to the current execution tenant.

Tests by query result

Definitions
numberOfTestCasesToBeRuninteger
numberOfTestSuitesToBeRuninteger
requestMade
includeChildNamespacesboolean
resultsarray
endDatestring
Formatdate-time
flowIdstring
idstring
namespacestring
resultsarray
assertionResultsarray
errorsarray
executionIdstring
fixtures
statestring
Possible Values
ERRORSUCCESSFAILEDSKIPPEDUNKNOWN_DEFAULT_OPEN_API
testIdstring
testTypestring
urlstring
Formaturi
startDatestring
Formatdate-time
statestring
Possible Values
ERRORSUCCESSFAILEDSKIPPEDUNKNOWN_DEFAULT_OPEN_API
testSuiteIdstring
tenantIdstring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

Task state override applied based on the test result

Number of test suites failed

Number of test suites skipped

Number of test suites run in success