Testing a contract
Testing a contract against sample files is the fastest way to confirm that your rules catch the errors you care about without blocking valid data.
When to test
- After creating a new contract.
- After adding or changing rules.
- Before linking a contract to a production pipeline.
- When a vendor changes their file format.
How to test
- Open the contract you want to test.
- Click Test Contract.
- Upload a representative sample file.
- Review the validation report.
The report shows each rule that passed or failed, the rows that violated the rules, and the overall pass or fail result.
Choosing good sample files
Use samples that cover both the expected and edge cases:
- A file with all valid rows.
- A file with known bad rows, such as missing values, wrong types, or duplicate keys.
- An empty or unusually large file if you have row-count rules.
Interpreting results
- Passed: the file meets every rule in the contract.
- Failed: at least one rule with fail severity was violated.
- Warning: a rule with warn severity was violated, but the file would still pass.
Use the detailed row-level errors to adjust your rules. If a rule is too strict, widen it. If it is too lenient, tighten it.
Next steps
Once the contract passes your sample set, publish it and attach it to a pipeline.