Date: Thu, 30 Nov 2000 10:02:54 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: anthony cc: djgpp AT delorie DOT com Subject: Re: white box testing in c In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 29 Nov 2000, anthony wrote: > does anyone know how to white box test? AFAIK, that's when you study the sources of a program, and then design a test case for each of the possible instance of control flow that it could take. For example, for each if-then-else clause, you need a test case that satisfies the condition and exercises the `then' block, and another test case which exercises the `else' block. There are tools which report source coverage when you run a test case: they tell you which source lines were executed during the run and which weren't. After running tests, you are supposed to demonstrate that you've covered a certain percentage of the source lines, as close to 100% as possible.