Automated CI/CD testing with YAML test definitions
This feature is actively being developed and may change before release.
For automated testing in CI/CD pipelines, Kanal supports declarative test definitions using YAML. Define test scenarios with input messages and expected outputs to validate your pipeline logic automatically.
Tests are automatically executed when Kanal starts if the tests.run configuration is enabled. Configure the test file location and execution options in application.yml or via environment variables.
Use Interactive Testing to build and debug your transformations interactively. Once you’re confident in the logic, codify the scenarios as CI/CD tests in your tests.yaml file.
Test edge cases
Include tests for:
Empty arrays and null values
Missing optional fields
Boundary conditions (e.g., exactly at threshold values)
Invalid data that should be rejected
Keep tests focused
Each test should verify one specific behavior. This makes failures easier to diagnose and tests more maintainable.
Use meaningful test names
Name tests to describe the scenario being tested: “High-value orders route to priority queue” is better than “Test 1”.