什么是功能测试?

发布于 2024-07-18 00:57:01 字数 33 浏览 6 评论 0原文

什么是功能测试? 这与单元测试和集成测试有何不同?

What is functional testing? How is this different from unit testing and integration testing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

天涯离梦残月幽梦 2024-07-25 00:57:03

术语“功能测试”通常应用于测试整个系统,例如从浏览器端到数据库层的Web 应用程序。 虽然我自己滥用了这个术语,但我相信术语“系统测试”或“端到端测试”可以更好地描述它。

“功能测试”的另一个含义可以只是“测试功能”,这通常也适用于单元或集成测试。 但有些测试不是功能测试。 几乎所有与非功能性需求相关的内容都属于该类别,例如负载测试或分析。

我认为最初的区别可能是“功能系统测试”和“非功能系统测试”之间的区别,现在“功能测试”通常用于区分端到端测试和测试子系统/单元。

The term "functional testing" is commonly applied to testing a system as a whole, e.g. a web application from the browser end through to the database layer. While I am guilty of abusing this term myself, I believe the terms "system testing" or "end-to-end testing" describe it much better.

The other meaning of "functional testing" can be just "testing functionality", which is usually true for unit or integration testing, too. But there are tests which are not functional tests. Pretty much anything that is regarding non-functional requirements falls into that category, such as load testing or profiling.

I think originally the distinction might have been between "functional system testing" and "non-functional system testing", nowadays "functional testing" is often used to distinguish end-to-end testing from testing subsystems/units.

傲世九天 2024-07-25 00:57:03

首先我们应该明白什么是软件的“功能”?

功能可以被视为软件打算执行的任务/活动。

因此,测试软件的每个功能称为功能测试。

在单元测试中,您将隔离代码并测试它的每个单元。

将程序中的方法/函数视为一个单元,您将在其中传递一些参数并期望代码提供所需的输出,并且测试此类代码单元称为单元测试单元的

集合充当软件的函数并测试此类功能可以称为功能测试,

请通过链接更好地理解它

http:// www.guru99.com/unit-testing-guide.html

http://www.guru99.com/unit-testing-guide.html guru99.com/function-testing.html

First we should understand what is a 'function' with respect to software?

Function can be considered as a task/activity which is intended to do by the software.

So, testing each and every function of the software is called functional testing

Coming to the unit testing you will isolate the code and test each unit of it.

Consider a method/function in a program as an unit where you will pass some parameters and expect the code to give required output and testing such units of code is called a unit testing

A collection of units acts as a function of a software and testing of such functions can be called as functional testing

Please go through the links to understand it better

http://www.guru99.com/unit-testing-guide.html

http://www.guru99.com/functional-testing.html

与酒说心事 2024-07-25 00:57:02

另一种思考方式是这样的:

单元测试:
作为单元测试您的代码,调用方法并验证返回值和对象属性状态/值

功能测试:
在执行任务时测试您的代码路径。 这可以确保您的应用程序执行代码所说的操作。

整体测试? 您的意思是集成测试吗?

集成测试:
通过将代码插入更大的代码块来测试您的代码,以确保您没有破坏现有逻辑并且能够重新集成到主分支中。

Another way of thinking is this:

Unit Test:
Test your code as units, calling methods and verifying return values and object property states/values

Functional Testing:
Testing your code paths while preforming a task. This ensures your application does what your code says it does.

Integral Testing? Do you mean Integration Testing?

Integration Testing:
Testing your code by plugging it into a larger mass to ensure you haven't broken existing logic and you are able to integrate back into the main branch.

黎歌 2024-07-25 00:57:02

功能测试确保最终产品按照规范中的规定实现客户要求。
单元测试是为了检查一小部分代码的行为是否符合预期。
集成测试确保当您将所有不同的部件/模块组合在一起时系统稳定。

例如,BigBank Corporation 想要一款能够生成客户银行对账单并每月为每个客户插入 3 项随机费用的软件。

项目经理在与 BigBank 代表多次讨论后编写软件功能规范。

开发人员编写一个模块来填充数据库中的模板语句。 他执行单元测试以检查是否涵盖了大多数情况(典型客户、当月没有数据等)。

另一位开发人员创建了一个随机数生成器模块。 他对此进行了单元测试。

集成商获取这两个模块,对其进行编译并执行集成测试,以确保它们能够很好地协同工作。

最后,为了提供 Beta 版本供 BigBank 试用,测试团队进行功能测试以验证软件是否符合功能规范。

Functional testing is making sure that customer requirements are implemented in the final product as specified in the spec.
Unit testing is to check that small portions of code behave as intended.
Integration testing is making sure that the system is stable when you combine all the different parts/modules together.

For example, BigBank Corporation wants a software that generates customer bank statements and inserts 3 random fees each month for each customer.

The Program Manager writes the software functional specification after several discussions with BigBank's representatives.

A developer writes a module that fills up a template statement from a database. He performs unit testing to check that most cases are covered (typical customer, no data for the month, etc.)

Another developer creates a random number generator module. He performs unit testing on that.

The integrator takes the two modules, compiles them and performs integration testing to ensure that they work well together.

Finally, in order to deliver a beta version for BigBank to try, the Test team performs functional testing to validate that the software complies with the functional specs.

£噩梦荏苒 2024-07-25 00:57:02

测试目标的功能测试应该关注任何可以直接追溯到功能规范或业务规则的测试需求。 这些测试的目标是验证正确的数据接受、处理和检索。 它测试产品的功能和操作行为,以确保它们符合其规格,并包含忽略系统或组件的内部机制并仅关注响应所选输入和执行条件而生成的输出的测试。 此类测试通常基于黑盒技术,即通过 UI(用户界面)与应用程序交互并分析输出(结果)来验证应用程序(及其内部流程)。

来源:http://softwareqatestings。 com/introduction-to-software-testing/basic-steps-of-function-testing.html

Functional testing of the target-of-test should focus on any requirements for test that can be traced directly to functional specifications or business rules. The goals of these tests are to verify proper data acceptance, processing, and retrieval. It tests the features and operational behavior of a product to ensure they correspond to its specifications, and incorporates tests that ignore the internal mechanism of a system or component and focus solely on the outputs generated in response to selected inputs and execution conditions. This type of testing is based upon typically black-box techniques, that is, verifying the application (and its internal processes) by interacting with the application via the UI (User Interface) and analyzing the output (results).

Source:http://softwareqatestings.com/introduction-to-software-testing/basic-steps-of-functional-testing.html

猫瑾少女 2024-07-25 00:57:02

单元测试:
测试尽可能小的代码单元,通常是一个函数或方法。 通过使用模拟等,理想情况下,这应该非常快,并且不会以任何方式影响硬盘或网络。

功能测试:
测试一组协同工作的函数/方法。 理想情况下,这也不应该进入磁盘或网络,但通常会。

集成测试:
测试在现实世界中运行,进入真实的(尽管是测试的)数据库,写入磁盘等。您正在测试您的程序是否可以与其他服务正常工作,以及是否与它们正确“集成”。 您通常会有一个单独的程序(例如 Selenium)来执行测试,就像真正的用户一样。

还:
白盒测试:
了解程序内部工作原理的测试。 单元测试和功能测试通常是白盒测试。 一个示例是调用函数来保存值,然后检查数据库中的值的正确性。

黑盒测试:
不了解内部结构并将程序/函数/方法视为“黑匣子”的测试。 一个示例是调用一个函数来保存值并调用另一个(公共)函数来获取该值。

Unit Test:
Test the smallest units of code possible, usually one function or method. By using mocks etc. this ideally should be very fast and not hit the hard disk or network in any way.

Functional Testing:
Test a set of functions/methods working together. Ideally, this should also not go to disk or network as well, but often will.

Integration Testing:
Test that run in the real world, going to real (although test) databases, writes to disk, etc. You are testing that your program works correctly with other services, that it 'integrates' with them correctly. You often will have a separate program (ex. Selenium) that exercises the tests, just like a real user would.

Also:
White Box Testing:
Tests that know the internals of how the program works. Unit tests and Functional tests are often white box. An example would be calling a function to save a value and then checking the value in the database for correctness.

Black Box Testing:
Tests that are ignorant of the internals and treat the program/function/method as a "black box". An example would be calling a function to save a value and calling another (public) function to get that value.

累赘 2024-07-25 00:57:02
  • 单元测试位于单个应用程序层(演示、
    业务逻辑、数据访问等)。

  • 功能测试跨多个应用程序层,以便
    测试跨越完整的部分
    应用程序功能。

  • 集成测试将是跨多个应用程序的测试
    组件甚至应用程序。

  • Unit testing is within single application tier (presentation,
    business logic, data access, etc.).

  • Functional testing is across multiple application tiers so that
    tests span pieces of complete
    application functionality.

  • Integration testing would be tests across multiple application
    components or even applications.

苦妄 2024-07-25 00:57:02

如果您查看 V 模型,功能测试现在通常被称为端到端测试或系统测试。

单元测试显然是测试可能的最小代码单元,而集成测试则检查您的单元是否与系统的其他部分集成良好。

Functional Testing is these days is commonly known as the End-to-End testing or System testing if you look at the V-Model.

Unit testing obviously testing the smallest unit of code that is possible and integration testing is checking that your units integrate well with other parts of the system.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文