Unit Tests are small, localized tests aimed at testing one specific part of your integration. The CIC Integration Engine gives you the ability to test Rulesets (in a complete or partial state) without having to deploy first using the Run Transformation feature. In fact, you can test a Ruleset before creating other objects like Business Processes or Adapters. This allows for regular testing, debugging, and observing specific results or behavior of the rules from directly within your transformation Ruleset.
However, before using this feature to test Rulesets, some setup is required.
Best Practices and Recommendations
Cleo recommends the following best practices when unit testing Rulesets in your Integration Projects.
Create an extra project to house the data needed for testing.
- Use naming conventions to indicate that the Project and its resources are used for testing purposes.
- Create folders for your test data. For example, create folders for each Ruleset or different transactions, etc. Then, add the specific files which represent the test input data and expected output for each transaction.
- Add your own documentation; explain what is needed to run the test data and include the acceptance criteria.
Place Schemas and other supporting resources in your Partner or Core Projects
Setup Requirements
For this test, you need to have the following resources created:
- Integration Project (Cleo recommends having Projects and resources dedicated to testing only)
- Test data
- Schema(s) and other supporting resources required to build a Ruleset
- Transformation Settings: Set how the test data will be read/written as defined in the selected Transformation Settings object.
- Ruleset: Any changes that you are testing must be saved first.
Tip: Use the LogInfo Ruleset action to display certain data in the Details section. Add this to your Ruleset as you test to have desired values displayed (string-only).
For more information see the article on how to Run the Transformation directly from the Ruleset.
Comments
0 comments
Please sign in to leave a comment.