Subnavigation
Test Data Generation
Introducing Coco Test Engine
Coco’s test data generation feature, called Coco Test Engine, is designed to:
- Help you reach the highest feasible coverage level faster
- Sort out redundancies in code coverage analysis
- Provide automatic collections of test data that includes edge cases
Coco Test Engine automatically generates test data to improve the quality of your testing and helps cover various edge or error cases that human testers could have easily missed. All you need to do is put the algorithm to work and let it find cases that you don’t normally cover, or complete the existing test suite.
Less complexity, more control
Coco’s test data generation reduces the complexity of writing data-driven tests in three ways:
- It separates test code and test data. For many test frameworks, the concept of data-driven testing is not provided, meaning the developer needs to write a separate function per test data. If supported, test data generation and the unit test code are put on the same file, which imposes that the data conforms to the C++ syntax and increases the size of the unit test code.
- The data editor makes it easy to review and edit tests in spreadsheet form.
- The set of tools helps discover new test cases but also streamlines the processes of updating test data with code changes, and data validation by the tester.
Simplified outline of the process
- Write a small unit test code using 2 macros:
- FETCH to get new input data
- CHECK to compare the output to the expected result
- Compile the unit test
- Use the data editor to create some test cases and debug it like a normal application
- Execute test discovery to find new cases and increase the coverage
- Review the generated data to see if the output corresponds to what is expected
Overview Coco Test Engine
How to set up Coco Test Engine for your projects