Blach-Box and White-Box Testing(黑盒测试和白盒测试)
Two terms that software testers use to describe how they approach their testing are black-box testing and white-box testing. The below Figure shows the difference between the two approaches. In black-box testing, the tester only knows what the software is supposed to do, he can't look in the box to see how it operates. If the types in a certain input, he gets a certain output. He doesn't know how or why it happens, just that it does.
Tip
Black-box testing is sometimes referred to as functional testing or behavioral testing. Don't get caught up in what the actual terms are, as your team may use something different. It's your job to understand their meaning and how they're used by your team.
In white-box testing (sometimes called clear-box testing), the software tester has access to the program's code and can examine it for clues to help him with his testing. he can see inside the box. Based on what he sees, the tester may determine that certain numbers are more or less likely to fail and can tailor his testing based on that information.
Tip
There is a risk to white-box testing. It's very easy to become biased and fail to objectively test the software because you might tailor the tests to match the code's operation.