Understanding circular causality and its affects on testing

Circular causality is where A causes B, and B causes more A, which causes more B, etc... It's a classic example of a positive feedback loop. Once put in motion, it continues where A and B grow over time. A testing example of this might be load testing a news website with a widget for "most popular stories." If you look at a news story X number of times, it becomes popular. If a story is in the "most popular stories" widget, people are more likely to look at it. This makes it more popular. Etc...

If I suspect A and B have a circular relationship, than I'll come up with test cases for:

  • where A is some known input, and B is at some known starting state, verify B is some expected result and verify A is affected according to some expected result

  • where A is close to some possible limit, and B is at some known starting state, verify B is some expected result and verify A is affected according to some expected result

  • where A is some known input, and B is at some known starting state close to some possible limit, verify B is some expected result and verify A is affected according to some expected result

  • where A might be a stressful input, and B is at some known starting state, verify B is some expected result and verify A is affected according to some expected result

  • where A is some known input, and B is at some known stressful starting state, verify B is some expected result and verify A is affected according to some expected result

  • where A is ... etc...


If you contrast this with linear causality, you can see that we now have to control for both inputs A and B, as well as look at the affects on A and B. There's also a potential measurement problem with circular causality. If the feedback loop is fast, you might get multiple interactions before you have time to measure the effects. So test setup and observation has to take this into account.

For more on this topic, see the section on scientific thinking and precision in the Miniature Guide on Scientific Thinking.