I go with what Gennadiy said... I create "stub" scripts that run my code with different sets of parameters and make sure that I cover all potential code paths. For the most part, I don't have to do a lot of this as I have my automation code limited in scope in what it does and does not do. This does not mean that the code is not complex, just that I have limited code paths. For that matter, making my functions more granular where, instead of trying to perform multiple tasks within a function I only do one task, it reduces the amount of code testing I need to do. If my functions are all working as expected, then a combination of several of those functions together should be more simple to test than if all the code were in one function.