I am writing tests for an algorithm that is built up of several consecutive stages. Each such stage has its own set of unit tests.
I want to check that the whole algorithm performs as expected, but am not sure how to approach end to end testing correctly.
Say we have stages a, b, c. Lets say for simplicity's sake each such stage has 5 flows, and a unit test for each of them. Each such flow is a branch in the algorithm, so theoretically to achieve total coverage in my E2E tests, I have to write 5^3 tests. In my real algorithm I have a lot more stages. This exponential growth approach seems unreasonable to me. What is the correct way to on the one hand achieve good coverage of the whole algorithm, but on the other hand not spend an unreasonable amount of time writing a huge amount of complex tests?