Node Level Tests
In this, users will learn to validate the behavior and output of specific components of Workflows before progressing to more complex configurations.
Node-level testing is a critical aspect of ensuring the reliability and functionality of workflows. This approach allows for thorough testing, early issue detection, and streamlined troubleshooting, ultimately leading to robust and efficient integration workflows.
Testing Scenarios and Best Practices
1. Input Validation Testing:
Verify that each node correctly processes input data according to defined specifications. Test scenarios include:
- Providing valid input data.
- Supplying invalid input data to check error handling.
Learn more about the Nodes available in Cobalt here.
2. Data Transformation Testing:
Validate the transformation logic within Transform node to ensure accurate data processing. Test scenarios include:
- Verifying data integrity after transformation.
- Validating the response received from the Transform Node.
Learn more about the Transform Node here.
3. Integration Point Testing:
Test the connectivity and data exchange between nodes and external systems. Test scenarios include:
- Simulating the actions and their responses.
- Testing error handling during integration failures.
4. Conditional Logic Testing:
Validate the conditional statements and branching logic created using a Rule node within the Workflow. Test scenarios include:
- Testing different conditions and outcomes.
- Verifying the correct execution path based on conditions.
Learn more about the Rule Node here.
Execution and Verification Process
Follow the steps mentioned below to perform Node level testing in Cobalt:
-
Select Node for Testing: Choose a specific node within the workflow to test.
-
Define Test Scenarios: Identify various test scenarios to validate the node’s functionality.
-
Execute Tests: Run the Workflow through Try API according to the test scenario by providing appropriate inputs to observe the behavior and output of the node.
Learn more about how Try API works in Cobalt here.
- Verify Results: Compare the response obtained with the expected outcomes to ensure correctness. You can check the Node response by navigating to
Logs
in Cobalt >Executions
> Check the Workflow logs.
Learn more about Workflow logs here.
- Iterate and Expand: If the results match expectations, proceed to add more nodes to the workflow. If discrepancies occur, troubleshoot and retest until the node functions as intended.
By performing Node level testing, you get benefits such as early issue detection, improved debugging and enhanced reliability leading to an efficient Workflow development.
Checkpoint + Next step
You have now successfully created and tested all the nodes of your workflow. Next Step is to perform Orchestration Level testing to check whether workflows work correctly or not.