Black box, white box in the end what is the difference?

 

There is a saying that goes: no matter white cat, black cat, catches mice is a good cat.
 

       If used in the field of software testing, this sentence is also not at all true. Regardless of the black box, white box, to find Bug, find defects, ensure software quality is king.
 

       For just set foot in software testing novice white, the black box, white box is definitely one entry will learn vocabulary. However, what they say black is black? What is white and white? Difference between the two Where is it? Listen to me 11 years.
 

       The biggest difference: the object of interest is not the same
 

       Black box and white-box testing, when the object of interest is the biggest difference between the two tests should not be the same.

       Black box testing is mainly targeted programs presented to the user function, mainly for white-box testing program code logic is, simply put, is that the former test the final display function, the latter test daemon.
 

       Black box testing
 

       Black Box, by definition is: the test object as a black box can not be opened. When testing, testers no need to consider the specific logical structure and functioning inside the box, only manual procedures in accordance with the requirements specification, functional inspection program meets its functional description, right output test results.

       White-box testing
 

       The black box on the contrary, such a method is to open the test object as a transparent box. When tested, the tester will use internal logical structure of programs and information are required for proper operation of a predetermined program by checking the status at various points, the testing procedures can if each path.

       For chestnuts, deepen understanding
 

       Here, we have to give a little life chestnuts, which will hopefully help you better understand these two test methods.

       Assume, small A and B are a couple of small, I decide to cook at home. A small small B let go grocery shopping, preferably within one hour can go home under one roof.

       If in the black box mode, small A (testers) will set out a shopping list is a small B (the so-called: requirements specification), and then told a small B, is now 9:45, just before 10:45 under one roof all things, with a home on it.

       If the white-box mode, it may be the case below.

       After a small B to reach the designated farms, small A telephone remote start command:

       First of all meat, meat stalls, you're going to specify that one.

       You now enter the south gate is it? South Gate, then go, go, go right, until you come to the innermost ......

       什么?你走的北门?如果是走北门的话,一进去,先左拐,走到头,到卖酸奶那里,往右拐,一直往前走……

       跟老板说要买黑猪肉,要前腿,不要后腿,6两就够了。

       好了,现在去买豆芽。

       豆芽一定要看好日期,看看是不是今天的。如果不是今天的,就买昨天的。如果昨天的也没有,就不新鲜了。

       哦,对了,有三种牌子的豆芽,一种散称的,两种袋装的。要是袋装的没有,就买散称的。如果你买散称的,你要看看根儿黑了没,别挑杆太肥的……

       接下来……

 

       总有人喜欢比较:黑盒测试和白盒测试到底哪个更好呢?其实,从上面的例子也不难看出,两者的优势各不相同。但无论采用哪种测试方法,毫无疑问都是为了找出缺陷,发现风险,从而确保软件的缺陷更少,质量更好。黑盒和白盒,始终交织出现在我们的测试工作中。

Guess you like

Origin www.cnblogs.com/liangmingshen/p/12011602.html