Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Software Test Notes (1) Theory

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

There is a saying like this: if you can do it, don't beep, especially in today's day when the pace of work is comparable to that of × ×, everyone advocates the spirit of hard work, as long as you can solve the problem, screw the theory. But it is undeniable that good theoretical literacy, whether to solve the problems encountered in the work, or the future career development, are of great help. This paper collates and summarizes some common testing theories in the software testing industry for your reference.

1. Software testing is classified according to testing: black-box testing and white-box testing.

Black box test

Black box testing, also known as functional testing, is used to test whether each function can be used properly. In the test, the program is regarded as a black box that can not be opened, and the program interface is tested without considering the internal structure and internal characteristics of the program. It only checks whether the program function is used normally in accordance with the requirements specification, and whether the program can properly receive input data and produce correct output information. Black box testing focuses on the external structure of the program, does not consider the internal logical structure, and mainly tests the software interface and software functions.

From the point of view of the user, the black box test is carried out from the corresponding relationship between the input data and the output data. Obviously, if there is a problem with the design of the external feature itself or if the specification is incorrect, it cannot be found by using the black box test method.

Newcomers basically use the method of black box testing to get started.

White-box testing

White-box testing is also known as structural testing, transparent box testing, logic-driven testing, or code-based testing. White box testing is a method of test case design. The box refers to the software being tested. The white box means that the box is visible. You know what is inside the box and how it works. The "white box" method fully understands the internal logical structure of the program and tests all logical paths. The "white box" method is exhaustive path testing. When using this scheme, the tester must check the internal structure of the program and get the test data from the logic of the program. The number of independent paths through the program is astronomical.

Let's take air conditioning as an example to see what is a black box test and what is a white box test:

When a new air conditioner is assembled, the quality supervision department needs to test the various functions of the air conditioner, such as whether the switch is normal, whether the cooling and heating function is normal, whether the timing function is normal, and so on, and record the test results one by one, if there are any problems, timely feedback to the design department to solve, this is the scope of black box testing.

For air conditioner designers, their tests may be more complicated. In addition to testing the functions of air conditioners, they should also analyze the inherent principles of air conditioners. They will even track the internal implementation code of air conditioners and analyze the data status of air conditioners to see whether they are working properly, not just from the surface function. This is the scope of white box testing.

2. According to the testing stage, it can be divided into unit test, integration test, confirmation test, system test and acceptance test.

Unit testing

Unit testing (unit testing) refers to the inspection and verification of the smallest testable unit in the software. Generally speaking, the meaning of unit in unit testing should be determined according to the actual situation, such as unit refers to a function in C language, unit refers to a class in Java, and graphical software can refer to a window or a menu. Generally speaking, the unit is the smallest function module to be tested. Unit testing is the lowest level of testing activity to be carried out in the process of software development, and independent units of the software will be tested in isolation from other parts of the program.

In a traditional structured programming language, such as C #, the unit to be tested is usually a function or subprocess. In an object-oriented language like C++, the basic unit of testing is the class. For the Ada language, developers can choose whether to do unit testing at the level of independent procedures and functions or at the level of the Ada package. The principles of unit testing are also extended to the development of the fourth generation language (4GL), where the basic unit is typically divided into a menu or display interface.

Other development activities that are often associated with unit testing include code runaway (Code review), static analysis (Static analysis), and dynamic analysis (Dynamic analysis). Static analysis is to study the source code of the software, find errors or collect some metric data, and do not need to compile and execute the code. Dynamic analysis is to provide information about execution tracking, time analysis, and test coverage by observing the actions of the software at run time.

Integration testing

Integration testing, also known as assembly testing or joint testing. On the basis of unit testing, all modules are assembled into subsystems or systems according to the design requirements (such as according to the structure diagram) for integration testing.

Practice shows that although some modules can work alone, they can not guarantee that the connection can also work normally. Some problems that cannot be reflected locally are likely to be exposed in the overall situation.

Confirmation test

The purpose of the confirmation test is to show future users that the system can work as scheduled. After integration testing, all modules have been assembled into a complete software system according to the design, and interface errors have been basically eliminated, and then the effectiveness of the software should be further verified, which is the task of confirming the testing. that is, the function and performance of the software are as reasonably expected by users.

System testing

System testing, English is System Testing. It combines the confirmed software, computer hardware, peripherals, network and other elements to carry out various assembly tests and confirmation tests of the information system. The system test is a test for the whole product system. The purpose is to verify whether the system meets the definition of the requirements specifications, to find out the areas that do not conform to or contradict the requirements specifications, so as to put forward a more perfect scheme. After the system test finds the problem, it should be debugged to find out the cause and location of the error, and then correct it. It is a black box test based on the overall requirements specification of the system and should cover all joint components of the system. The object includes not only the software to be tested, but also the hardware on which the software depends, peripherals and even some data, some supporting software and its interfaces.

Acceptance test

Acceptance testing is the last test operation before deploying the software. Software testing activities conducted before the release of a software product after the completion of unit testing, integration testing, and system testing. It is the last phase of technical testing, also known as delivery testing. The purpose of acceptance testing is to ensure that the software is ready and that end users can use it to perform the established functions and tasks of the software.

Acceptance testing is to show future users that the system can work as scheduled. After integration testing, all modules have been assembled into a complete software system according to the design, and interface errors have been basically eliminated, and then the effectiveness of the software should be further verified, which is the task of acceptance testing. that is, the function and performance of the software are as reasonably expected by users.

Acceptance testing, a phase of the system development lifecycle methodology, when relevant users and independent testers test and receive the system according to the test plan and results. It allows the system user to decide whether to receive the system or not. It is a test to determine whether the product can meet the requirements specified by the contract or the user. This is administrative and defensive control.

In engineering and other related fields, acceptance testing is a test that confirms whether a system conforms to design specifications or contractual requirements, and may include chemical, physical, or performance tests. Acceptance testing in systems engineering may include black box testing prior to the delivery of a system (such as a software system, many mechanical parts, or a batch of chemicals). Software developers often separate the acceptance tests conducted by system developers from the acceptance tests conducted by customers before accepting the product. The latter is generally referred to as user acceptance test, end-customer test, real machine (acceptance) test, on-site (acceptance) test. Before the main test program, the smoke test is commonly used as an acceptance test at this stage.

3. Other testing theories include: automated testing, regression testing, smoke testing, performance testing.

Automated testing

Generally refers to the automation of software testing, software testing is to run the system or application under preset conditions, evaluate the running results, the pre-conditions should include normal conditions and abnormal conditions. Usually, after the test case is designed and reviewed, the tester executes the test step by step according to the procedures described in the test case, and the actual results are compared with the expected results. In this process, in order to save manpower, time or hardware resources and improve testing efficiency, the concept of automated testing is introduced.

Automated testing is divided into web automated testing, interface automated testing, APP automated testing.

regression testing

Regression testing refers to retesting after modifying the old code to make sure that the modification does not introduce new errors or cause errors in other code. Automatic regression testing will greatly reduce the cost of system testing, maintenance and upgrade. As a part of the software life cycle, regression testing accounts for a large proportion of the workload in the whole software testing process, and multiple regression testing will be carried out in all stages of software development. In progressive and rapid releases, successive releases of new versions make regression testing more frequent, and in extreme programming methods, regression tests are required several times a day. Therefore, it is meaningful to improve the efficiency and effectiveness of regression testing by choosing the correct regression testing strategy.

Smoke test

The term comes from the hardware industry. Power up the device directly after making changes or repairs to a hardware or hardware component. If there is no smoke, the component passes the test. In software, the term "smoke test" describes the process of validating code changes before embedding them in the product's source tree. After examining the code, smoke testing is the most cost-effective way to identify and fix software defects. The smoke test is designed to confirm that changes in the code work as expected and do not destabilize the entire version.

Performance testing

Performance testing is through automated testing tools to simulate a variety of normal, peak and abnormal load conditions to test the performance indicators of the system. Both load testing and stress testing belong to performance testing, and they can be combined. Through the load test, determine the performance of the system under various workloads, and the goal is to test the changes of the performance indicators of the system when the load increases gradually. Stress testing is to determine the bottleneck or unacceptable performance point of a system to obtain the maximum level of service that the system can provide.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report