Understanding chain reaction causality and its affects on testing

Chain reaction causality is where A causes B, C, and D, which then cause E, F, G, H, I, J, and K. It's a case where you have an event that has one or more effects, which in turn could have zero, one, or more effects, which (again) in turn could have zero, one, or more effects. That can go on indefinitely. If you've ever tested a rules engine, than you're familiar with testing systems like this. One simple event can trigger a cascade of triggering events.

When testing chain reaction relationships, you often need to use various tools such as decision trees or decision tables, state diagrams or sequence diagrams, or spreadsheets (or other tools) that layout various rules and what triggers them. When testing systems like this, often you start with simple scenarios (like our linear tests, if A then B) and build those out over time - making them more and more complex. You'll see this lead to test beds of XML or big spreadsheets of pre and post conditions for testing.

Recognizing when you have a chain reaction is a critical first step. It allows you to first try to decompose the problem into smaller parts. It's also often the case when testing this type of causality that you need to think about testability features. So much is happening that you feel like you need more visibility (logging, visualization, etc...) to help you understand what's happening while you're testing.

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