• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

white box testing (what is it?)

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so, im trying to figure out what white box testing means, and all i can figure out is that you know how the system works, and your testing paths (i have no idea what this means) from everything to everything (like maybe how all the components interact?).

any better explanations or examples of what white box testing is?

i was under the impressenation that black box testing is something like testing the functionality of a program without knowing the verbose details on how things work (like testing all the buttons on a car without knowing the science of how they work, like gps, lights, windshield wipers... and noting if they perform the task on the button). so based on this white box testing must be checking every little detail of something?
 
Marshal
Posts: 80869
505
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are more-or-less right; you want to put inputs into every method and see what results you obtain, with "normal" input, 0, input below and above requisite range, etc.
Some abnormal inputs ought to produce exceptions in a well-written program.
Lots of "println" statements showing intermediate values and method names allow you to follow the path of execution.
You can write a main(String[] args) method in each class and put the testing code in that.

"Black-box" testing does not adequately investigate the workings of the application.
 
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
surely you read
http://en.wikipedia.org/wiki/White_box_testing

and googled the subject,

on sentence: use knowledge of how it's implemented to aid you in building your test cases,
 
Amaru Shakur
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you campbell!

Originally posted by Bill Shirley:
surely you read
http://en.wikipedia.org/wiki/White_box_testing

and googled the subject,

on sentence: use knowledge of how it's implemented to aid you in building your test cases,



ah yes i did but they should have said path of execution instead of just paths. i was thinking like file paths when they said that (/root/home/java/...) not as in the way campbell described
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Amaru,

The idea of black-box testing is that you don't have visibility of what is inside the application. Your test coverage (the percentage of your code really tested) is planned based on the functionality available to the user. That's the way a regular user would test it - so, for instance, a tester would navigate through all the menus available, or try to use all the buttons available, or try to do something important from the "business" point of view.

For white-box testing, you have visibility of the internal design of the application. So the test is planned based on exercising portions of your application. For instance, you can plan tests that call all your methods at least once, or that executes a especially important and complex function in different ways, or that exercises all your if / else conditions.
 
author & internet detective
Posts: 42160
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you know we have a forum specifically for discussing testing? I'll move this thread there for you.
 
reply
    Bookmark Topic Watch Topic
  • New Topic