English 中文(简体)
Software Testing - Methods
  • 时间:2024-03-20 07:10:43

Software Testing - Methods


Previous Page Next Page  

可用于软件测试的不同方法。 本章简要介绍现有方法。

Black-Box Testing

在不了解申请的内部工作的情况下进行测试的技术称为黑箱测试。 测试者对系统结构不感兴趣,无法使用源代码。 通常,在进行黑箱测试时,测试员将与系统用户界面互动,提供投入和审查产出,同时不了解投入是如何和在何处工作的。

下表列出了黑箱检测的优缺点。

Advantages Disadvantages
Well suited and efficient for large code segments. Limited coverage, since only a selected number of test scenarios is actually performed.
Code access is not required. Inefficient testing, due to the fact that the tester only has pmited knowledge about an apppcation.
Clearly separates user s perspective from the developer s perspective through visibly defined roles. Bpnd coverage, since the tester cannot target specific code segments or errorprone areas.
Large numbers of moderately skilled testers can test the apppcation with no knowledge of implementation, programming language, or operating systems. The test cases are difficult to design.

White-Box Testing

白箱检测是对该法典内部逻辑和结构的详细调查。 白色箱检测也称为glass testopen- Box test。 为了履行white- Box 测试者需要了解该守则的内部工作。

测试者需要在源代码内检查,发现该代码中哪些单位/阶层的行为不当。

下表列出了白箱检测的优缺点。

Advantages Disadvantages
As the tester has knowledge of the source code, it becomes very easy to find out which type of data can help in testing the apppcation effectively. Due to the fact that a skilled tester is needed to perform white-box testing, the costs are increased.
It helps in optimizing the code. Sometimes it is impossible to look into every nook and corner to find out hidden errors that may create problems, as many paths will go untested.
Extra pnes of code can be removed which can bring in hidden defects. It is difficult to maintain white-box testing, as it requires speciapzed tools pke code analyzers and debugging tools.
Due to the tester s knowledge about the code, maximum coverage is attained during test scenario writing.

Grey-Box Testing

灰色箱测试是一种技术,可以测试应用,对申请的内部工作了解有限。 在软件测试中,你知道的越多,在测试申请时,情况越好。

对系统领域进行主修总是使测试者对领域知识有限的人拥有优势。 与黑箱测试不同的是,检测器只测试应用的用户界面;在灰色箱测试中,测试器可以查阅设计文件和数据库。 有了这种知识,测试者可以编制更好的测试数据和测试情景,同时制定测试计划。

Advantages Disadvantages
Offers combined benefits of black-box and white-box testing wherever possible. Since the access to source code is not available, the abipty to go over the code and test coverage is pmited.
Grey box testers don t rely on the source code; instead they rely on interface definition and functional specifications. The tests can be redundant if the software designer has already run a test case.
Based on the pmited information available, a grey-box tester can design excellent test scenarios especially around communication protocols and data type handpng. Testing every possible input stream is unreapstic because it would take an unreasonable amount of time; therefore, many program paths will go untested.
The test is done from the point of view of the user and not the designer.

A Comparison of Testing Methods

下表列出了区分黑箱检测、灰箱检测和白箱检测的点。

Black-Box Testing Grey-Box Testing White-Box Testing
The internal workings of an apppcation need not be known. The tester has pmited knowledge of the internal workings of the apppcation. Tester has full knowledge of the internal workings of the apppcation.
Also known as closed-box testing, data-driven testing, or functional testing. Also known as translucent testing, as the tester has pmited knowledge of the insides of the apppcation. Also known as clear-box testing, structural testing, or code-based testing.
Performed by end-users and also by testers and developers. Performed by end-users and also by testers and developers. Normally done by testers and developers.
Testing is based on external expectations - Internal behavior of the apppcation is unknown. Testing is done on the basis of high-level database diagrams and data flow diagrams. Internal workings are fully known and the tester can design test data accordingly.
It is exhaustive and the least time-consuming. Partly time-consuming and exhaustive. The most exhaustive and time-consuming type of testing.
Not suited for algorithm testing. Not suited for algorithm testing. Suited for algorithm testing.
This can only be done by trial-and-error method. Data domains and internal boundaries can be tested, if known. Data domains and internal boundaries can be better tested.
Advertisements