Black and White Box Testing

steviejay

Now in Black and White!!
Joined
Jun 9, 2002
Messages
3,343
Location
Glasgow, Scotland
ok, I know what they are, I know their advantages and disadvantages but can anyone of you please tell me how White box testing is implemented.

This is what I've written for Black Box testing-

Implement Black Box testing is to test each procedure in isolation. The tester begins by setting out a Test Plan. A test plan is where you talk about all the procedures that you will be testing, what inputs you will be using, what the planned result will be and the actual result. When choosing values to input its best to have three types of values. Normal values that the system should accept as normal, Boundary values, values that are wrong but are the same type of value as what the system is requested for example, inputting 12345 into the system where only a four digit value is requested and extreme values, values that should never be accept by the system, for example entering a character where only a integer is needed.

By following a Test Plan, the tester will be able to fully test all of the procedures and highlight any possible problems the system may have with outputting data which can then be confronted by the coders in an attempt to fix the data.


Can anyone help me out with that???

cheers, Steviejay
 
Help you out in what way? I'll give you an example of what I did when I was creating my test data for a program I wrote :)

Normal --- just normal data which should be accepted.

1

What you enter ........... Outcome

2

What you enter ........... Outcome

3

What you enter ........... Outcome

Boundary -- I have a different understanding of this, but i'm probably wrong ;) I was told that it was the limits of your prgram. Ie if you were to enter an Integer between 1 and 6, then 6 and 1 would be your boundaries. Sounds a bit stupid now that I think about it though...

1

What you enter ........... Outcome

2

What you enter ........... Outcome

3

What you enter ........... Outcome

Extreme -- if you were asked to enter a number between 1 and 6, then extreme would be something like "Gainy is cool!" -- this obviuosly isn't a number between 1 and 6, nevertheless is true :mischief:

1

What you enter ........... Outcome

2

What you enter ........... Outcome

3

What you enter ........... Outcome

Hope that helps, if not, please clarify what the question is :)

EDIT: :blush: I must have skipped the first 2 lines of the post, n' thanks Bobgote - that makes the most sense :)
 
Here's how I view, and implement both black and white box testing.

Black-box testing assumes that I know nothing about what goes on - it's based purely on requirements. If input X goes in, output Y is expected. The key part is that it's based purely on requirements.

White-box testing on the other hand, assumes knowledge of the code to be testing. The person creating the test script looks through the code, identifying conditional logic, common errors (did you check if object X is null before accessing it?), etc. The script then specifies the inputs to satisfy those tests, and the expected results. See Gainy's post above!

Both are equally valid, and equally important. Using Junit really, really helps in automating the process. My side projects are set to run a build nightly, followed by the Junit's - a report is then created and sent to me.

-- Ravensfire
 
Gainy - boundary testing means you also test the other side of the boundaries, to check that you get the expected results too. ie 0 and 7 as well as extreme values.
 
thanks to all,

can anynow help me out with Integration testing now :lol: I hate college, you get something done then something else appears.

INTEGRATION TESTING - End to end testing performed to expose faults in the interfaces and in the interaction between integrated components.

thats about as much as I know. and I need to explain why Integration testing would be used in addition to White Box and Black Box
 
That's easy!

Actually, my project at work is in the middle of integration testing right now ...

Black/White box testing usually looks at small chunks of code - a class or a group of classes. The objective is to verify that this specific task (Validate Customer Phone Number) is done correctly. It's testing on a micro scale.

Integration testing is testing on a macro scale. You've got the entire application up and running, with all external parts available for testing, or at least faked. It is possible for a user to run through large-scale tests that simulate the real jobs a user will perform in production.

Integration is about seeing if all the pieces work together correctly. Maybe you fixed a problem in one class, but that's going to cause a problem later on in a completely different class. For example, you change how a class stores some information. A completely unrelated class was also working with that information, and was not updated. Problem! Integration testing will find things like that.

-- Ravensfire
 
Back
Top Bottom