Run Template Tests

Run template tests in the repository directory. See Test Structure for more details.

kbc template test run [template] [version] [flags]

The command will run tests for a specified template or all templates in the repository (if you do not provide the template parameter).

If you provide template but not the version parameter, the default version will be used.

The command must be run in the repository directory.

It requires at least one existing project in a public Keboola stack defined in the environment variable TEST_KBC_PROJECTS, accepting projects in the format storage_api_host|project_id|project_token and divided by ;.

For example:

TEST_KBC_PROJECTS="connection.keboola.com|1234|project-1234-token;host2|id2|token2;...."

Options

--local-only <bool>
Run only local tests (default false)
--remote-only <bool>
Run only remote tests (default false)
--test-name <string>
Run only a test with a specified name
--verbose <bool>
Show details about running tests (default false)

Global Options

Examples

➜ kbc template test run --local-only
PASS keboola/my-template/0.0.1 one local
PASS keboola/template-2/2.0.0 one local

Next Steps