测试功能够吗? [英] Is testing features enough?

查看:65
本文介绍了测试功能够吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标题说明了一切,如果我使用水豚进行测试:

The title says it all, if I test using capybara :

visit this page
expect this content 

并针对每个功能(例如登录,注册,搜索,单击所有链接和按钮,等),就足够了吗?为什么需要测试控制器和模型?如果功能能够按预期运行,这是否意味着一切都在和谐地进行?

and do this for every single feature(e.g signin, signup, search, clicking all the links and buttons, etc), would that be enough? Why would I need to test controllers and models? If features are working as expected, doesn't that mean everything is working in harmony?

推荐答案

该技术称为黑 box测试,也称为功能测试。如果您要测试自己是否是该应用程序的用户,则将其视为黑匣子。如果从内部对其进行测试,则认为是玻璃箱测试

That technique is called black box testing also know as functional testing. If you are testing as if you are a user of the application it is considered black box. If you are testing it from within it is considered glass box testing.

是否足够的问题由个人决定。我的意见是,如果足够彻底,那么可能就足够了。

The question of whether or not is it enough is a matter of personal opinion. My opinion is if it is thorough enough then yes it could be enough.


黑盒测试的一些优势包括:

Some of the advantages of black-box testing include:




  • 您有很大的机会编写程序员没有想到的测试。

    • You have a good chance of writing tests that weren’t imagined by the programmer.

      程序运行的环境也经过了测试

      The environment the program is running is also tested

      投入的精力可以多次使用

      The invested effort can be used multiple times


      玻璃箱测试的一些优势包括:

      Some advantages of glass-box testing include:




      • 它迫使您仔细考虑实施。

        • It forces you to reason carefully about implementation.

          发现死代码或其他与最佳情况有关的问题

          Spots the Dead Code or other issues with respect to best programming practices.

          显示隐藏代码中的错误。

          Reveals errors in hidden code.

          这篇关于测试功能够吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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