Testing
Debugging is one thing, but how do you ensure that your configuration is working as expected? Wombat provides offers the ability to write unit tests for your configuration files. It makes it easy to protect your pipeline configurations from regressions over time. And honestly, who doesn’t like green ticks?
So how hard can it be to write a test? Not hard at all! A test is defined as a YAML object with a few key fields. Just follow this 5 step plan to internal peace and equilibrium:
- Decide where to store your tests
- Create a test definition with a unique
name
field:tests:- name: test name - Define some input data:
tests:- name: test nameinput_batch:- content: 'example content'
- Add output conditions to test:
tests:- name: test nameinput_batch:- content: 'example content'output_batches:- - content_equals: 'example content'
- Run the test with
wombat test your_test_file.yaml