I don't really know how to concisely explain my situation, so I'll have to describe the scenario.
I have a process A that takes an input X and produces an output Y. I have a separate process B that takes the input Y (from process A) and produces an output Z.
Both processes A and B are complicated and so would benefit from having unit testing. It is also likely that processes A and B will change and thus the "middle" format Y will change.
If I simply have unit tests for B that have input Y, how do I ensure that they remain relevant and correct if process A changes? For example process A turns the input "foo" into "bar". Unit Tests for B have "bar" as their input and convert it into "overflow". If process A changes and now turns "foo" into "fish", then my unit tests for B will still pass but their worth is questionable since they are no longer testing expected input.
What is best practice to resolve this situation? Does this situation have a name?
Also (to add complexity), process B is Java but process A is Visual Basic.
I know that going "beyond" Unit Testing and performing Integration Testing would be a way to ensure that input X can become output Z but since we have a great deal of tests for process B, how can we ensure that these stay relevant? (and also it's not easy when one is Visual Basic and the other is Java)
Thanks
Phil
Aucun commentaire:
Enregistrer un commentaire