I'm sorry if the title is confusing, I don't know if what I am describing has a proper name so let me describe...
I have an algorithm which contains quite a bit of nested if/else if/else logic for detailed analysis of input data from the database. This is business logic that's inherently quite convoluted so there are odd special cases along the lines of "if the user has a cat then X=X+1" or even (because this is a 30-year-old application) "if the user has a cat then X=X+1, unless the cat has 3 legs".
Building mock data for unit tests is quite difficult, but more so ensuring we have a test case for each permutation - even a seemingly simple operation might have dozens of cases with various special business rules added over the years. My understanding is that an ideal approach is to decompose a large procedure into smaller ones for each permutation, because then we can determine if each procedure is called during the unit testing. However I can't realistically have every logic test if/else going into separate procedures.
Because this is tied into our specific data I was wondering about the analysis actually detailing what logic clauses/permutations were triggered, which code-path was followed. So you pass in an input, you get the analysis result but also a kind of metadata object describing the algorithm decisions made. I wondered if this might be referred to as "algorithm artifacts". It would mean I can then inspect the metadata from all unit tests and see which permutations might be missed, in order to create targeted test cases.
Does this idea have a name in the world of software engineering, that I might do further research?