是否“单元测试"属于白盒测试还是黑盒测试? [英] Does "Unit Testing" falls under white box or black box testing?

查看:61
本文介绍了是否“单元测试"属于白盒测试还是黑盒测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否执行单元测试"属于白盒测试还是黑盒测试?还是与其他两种测试完全不同?

Does "Unit Testing" fall under white box or black box testing? Or is it totally a separate type of testing than the other two?

推荐答案

我认为这个 Kent Beck 的文章 提到了更多关于 TDD 和单元测试的内容,总结得相当好.基本上,这取决于您实际编写测试的方式*.这里是另一篇关于该主题的文章,可能有助于澄清事情.

I think this article by Kent Beck referring more to TDD and unit-testing sums this up fairly well. Basically, it depends on how you actually write the tests*. Here is another article on the subject that might help clarify things.

*如果您在应用程序中进行测试,则它是白盒测试.如果您正在测试它,就像局外人只会调用您面向公众的 API 一样,那么它就是黑盒.

*If you are testing from within your application, then it is whitebox. If you are testing it just like an outsider would make the calls to only your public facing API, then it is blackbox.

这篇关于是否“单元测试"属于白盒测试还是黑盒测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆