White-Box/ Black-Box Testing: static or dynamic?

KB7 picture KB7 · Apr 28, 2011 · Viewed 16.4k times · Source

Here is what I understand:

Dynamic testing is testing that is performed when the system is running. Static testing is performed when the system is not running.

Black-Box testing focuses on functionality and is performed without knowing the internal workings of the program. White-Box testing looks for problems within the code itself.

What I am wondering is, Is it fair to say that all Black-Box testing is static? Is it also fair to say that some White-Box testing is static (for example, inspection of source code) and some is dynamic (branch/path testing)?

Answer

Rap picture Rap · Jun 15, 2012

Is it fair to say that all Black-Box testing is static?

No. Black-box testing is usually dynamic. In fact, when we think of software testing we usually think of people running the code and recording problems they find. This is classic dynamic black-box testing.

However, there is black-box static testing. When you examine the spec or requirements looking for errors, this is static, black-box testing. Here are some techniques

  • Read the spec as if you're the customer - anything not make sense?

  • Compare the spec to industry or company guidelines - any violations?

Read the requirements to make sure each one is:

  • Correct

  • Feasible

  • Necessary

  • Prioritized

  • Unambiguous

  • Modifiable

  • Complete

  • Verifiable

If any of those are violated, you've found a requirements error and saved loads of time and money.