Chapter 1 Overview of Software Testing

Series Article Directory

Chapter 1 Overview of Software Testing

介绍软件测试的基本概念,包括软件测试的原则、分类和工作流程等基本知识。

Chapter 2 Software Test Planning

对制订测试计划的原则和方法进行较详细的介绍。

Chapter 3 Basic Techniques of Software Testing

对软件测试基本技术分别进行较详细的介绍。

Chapter 4 Software Testing Process

对软件测试的不同测试阶段的测试主要任务、采用的主要测试技术和方法、测试管理和组织等方面做较详细的介绍和说明。

Chapter 5 Test Case Design

介绍测试用例的基本概念、测试用例的设计方法、测试用例的分类和测试用例的有效管理,并给出较详细的测试用例设计实例。

Chapter 6 Test Report and Test Evaluation

介绍如何报告发现的软件缺陷,以及有关测试评测的相关知识。

Chapter 7 Software Testing Project Management

分别介绍和讨论软件测试项目管理的基本概念、项目管理的思想、特点、方法和技巧。

Chapter 8 Object-Oriented Software Testing

对面向对象软件测试的特点、测试模型和基本技术分别进行详细的介绍。

Chapter 9 Web Application Testing

介绍了有关Web应用测试方面的内容和技术。

Chapter 10 Software Test Automation

介绍自动化测试的定义、自动化测试的作用、自动化测试工具的分类和自动化测试工具的应用等内容。


foreword

Software testing is an important part of software engineering and an important means to ensure software quality. With the increasing complexity of software and the continuous development of the software industry, software testing has received more and more attention. This series of articles will introduce the basic content of software testing.


1. Software, software crisis and software engineering

1. Basic concepts of software, software crisis and software engineering

Computer software is another part of the computer system that is interdependent with hardware. It is a complete collection including programs , data and related documents .

Program refers to the executable instruction sequence designed according to specific function and performance requirements; data refers to the information and its data structure that the program can normally manipulate and process; document refers to the graphics and text related to program design, development, maintenance and use Material.

2. The goal of software engineering and its general development process

In a narrow sense, the goal of software engineering is to produce defect-free software that meets budget, delivers on schedule, and satisfies users , and then the produced software must be easy to modify when user needs change. In a broad sense, the goal of software engineering is to improve the quality and productivity of software, and finally realize the industrialized production of software.

The whole process of a software product starting from conception, development, testing, use and maintenance, until finally withdrawn from use is called the software life cycle.

3. Software Process Model

The software process model is the guiding ideology and overall framework of software development. The software process followed by software development is a crucial factor to ensure high-quality software development.

  1. waterfall process model

    It emphasizes the division of stages and their sequence, the work of each stage and the completeness of its documents. It is a strictly linear, stage-by-stage sequence, and gradually refined development model.

    waterfall development process

  2. spiral process model

    The spiral process model needs to go through multiple sequential activities of requirements analysis, design, implementation, and testing.

    spiral development process

  3. incremental process model

    When the iteration speed is accelerated and each iteration only adds a small amount of functionality to the previous one, this iterative process is an incremental development process.

    incremental development process

  4. Rapid Prototyping Process Model

    In the rapid prototyping process model, the system analysis is carried out quickly first, and the basic requirements of the software system are quickly determined under the close cooperation of the designer and the user, and a prototype system with simple functions is realized as soon as possible, and then the prototype system is gradually implemented. Refinement, continuous expansion and improvement to obtain the final software system.

  5. agile process model

    In agile development, the construction of a software project is divided into multiple sub-projects, and the results of each sub-project have been tested to have the characteristics of integration and operation.

The above five models are only typical among many software process models, in addition to fountain model , unified software development process model and so on.

2. Software defects and software failures

A software defect is an unwanted or unacceptable deviation in software (documents, data, programs) that causes a software failure when the software operates under certain conditions, at which point the software defect is activated.

Software faults refer to unwanted or unacceptable internal states generated during software operation . If software faults are not dealt with in a timely manner with appropriate measures (fault tolerance), the software will fail.

3. Software quality and quality model

Software quality is the sum of characteristics and characteristics related to the ability of a software product to satisfy stated or implied requirements . Its meaning has the following four aspects.

  • A feature that satisfies a given need. Software requirements are the basis for measuring software quality, and software that does not meet the requirements does not have good quality. The designed software should meet the requirements in terms of function and performance, and run reliably.
  • The degree to which the combination of various attributes is expected, that is, the software structure is good, the system resources are used reasonably, it is easy to read, understand, and modify, and it is convenient for software maintenance.
  • The degree to which the comprehensive expectations of users can be met, and the software system has a friendly user interface, which is convenient for users to use.
  • Compositional properties of software. The documentation of each stage in the software life cycle is complete and standardized, which is convenient for configuration management.

At present, there are many quality models, which respectively define different software quality attributes. The three common quality models are McCall model , Boehm model and ISO 9126. Their common feature is to define software quality attributes into layered models . The more common quality characteristic model is a two-layer structure . The first layer is to divide the quality characteristics by categories, called basic quality characteristics; the second layer is the quality characteristics of subcategories contained in each category; finally, the quality characteristics of each category List the corresponding or related standards one by one.

4. Software testing

1. The concept of software testing

  • Definition of Software Testing

    Software testing is the process of executing a program in order to find bugs.

  • purpose of software testing

    The purpose of software testing is to ensure the final quality of software products, and to control the quality of software products during the software development process.

2. Principles of software testing

(1) Early testing
(2) Comprehensive testing
(3) Whole process testing
(4) Independent and iterative testing
(5) Pareto principle
(6) There must be a confirmation process for wrong results of testing
(7) Formulate Strict test plan
(8) Complete testing is impossible, and the test needs to be terminated
(9) Pay attention to the relevance of regression testing
(10) Properly keep all test process documents

3. Software testing process model

The software testing process model is an abstraction of the testing process, which is used to define the process and method of software testing.

  1. V model

    The V model is the most representative test model. The V model reflects the relationship between testing activities and analysis and design activities.

    Software Testing V Model

  2. W model

    The W model is composed of two V-shaped models, which respectively represent the testing process and the development process, clearly expressing the parallel relationship between testing and development.

    Software Testing W Model

  3. X model
    Software Testing X Model

  4. H model
    Software Testing H Model

4. Classification of software testing

  1. Classification by test method
    (1) Static test . It is not necessary to execute the tested program, check whether the code conforms to the specification, and analyze the data flow and control flow of the program.
    (2) Dynamic testing . Select the actual test case to run the tested program, simulating user input.

  2. Classification by test method
    (1) White box test . Known software implementation process, according to the process of testing, white box testing is also called structural testing, white box testing, glass box testing, code-based testing or design-based testing. It consumes a lot of financial and material resources, and the possibility of white-box testing for all codes is relatively small, and the requirements for testers are relatively high, so generally only white-box testing of key parts is carried out.
    (2) Black box testing . By comparing the specifications of the software and testing based on the functions that the system should complete, testers must understand the design ideas of the product. Black-box testing is also called behavior testing, functional testing, or requirements-based testing.
    (3) Gray box testing . Gray Box is a device in which the working process on a program or system is partially recognized. Gray box testing, also known as gray box analysis, gray box testing is a testing method between white box testing and black box testing, or a combination of the two, based on limited knowledge of the internal details of the program software debugging method. Testers may know how system components interact with each other, but lack detailed knowledge of internal program functions and operations. It pays attention to the correctness of the output to the input, and also pays attention to the internal performance, but this kind of attention is not as detailed and complete as the white box test. It only judges the internal operating status through some representative phenomena, events, and signs. Gray box testing can avoid over-testing and streamline redundant use cases.

  3. According to the test process classification
    (1) unit test . Unit testing is implemented in the early stage, focusing on verifying the minimum testable elements of the software, testing a single function or a subroutine, including basic testing of each line of code. Unit testing is usually applied to the components in the implementation model to verify whether the control flow and data flow have been covered, and whether the component can work as expected. The content of the test includes interface testing, local data structure testing, boundary condition testing, coverage condition testing, error processing etc.
    (2) Integration testing . Integration testing is to assemble the modules according to the design requirements for testing. The main goal is to find problems related to the interface. It mainly tests whether the data transmission between the modules is correct, whether the functions of the integrated modules are realized, and whether the interface functions of the modules are consistent with the design requirements. . The integration test follows the unit test. When the unit test passes, the integration test environment can be configured.
    (3) System testing . System testing is to combine the tested software, as an element of the entire computer-based system, with other system elements such as computer hardware, peripheral equipment, support software, data, and personnel, and to test the computer system in an actual operating environment. A series of tests to comprehensively find the errors of the system under test, and test the integrity, reliability, security, etc. of the system. This type of test looks at the system from the perspective of customers or end users.
    (4) Acceptance test. The acceptance test is to check whether the system under test meets the requirements. The focus of the test is to test the use of the product under normal conditions. The effectiveness is carried out item by item by the marketing, sales, technical support personnel and end users together according to the specified requirements. Test, to check whether the function, performance and other characteristics of the software are consistent with the user's requirements, and the acceptance test generally adopts the black box test method. The basic items of the acceptance test include function confirmation (based on user requirements specifications, to detect the realization of the system’s functions specified in the requirements) and configuration confirmation (to check the coordination of system resources and equipment, to ensure that all documents and materials for the developed software are fully prepared, Able to support the maintenance work after the software is running). Documents for configuration confirmation include design documents, source programs, test documents and user documents, etc.

    The above four processes are independent of each other and connected in sequence, and are carried out sequentially.
    Testers initially need to complete the testing tasks of each unit separately to ensure that each module can work normally. Unit testing uses a large number of white-box testing methods to find program errors inside the module as much as possible .
    After the unit test is over, the tester assembles the tested modules and conducts an integration test . The purpose is to check the program structure problems related to the software design . At this time, the black box test method is often used to design test cases . After integration testing is completed, system testing
    is required to verify whether the tested software can work in harmony with other parts of the system (such as hardware, databases, and operators) . The final acceptance test is to test the confirmation criteria established in the early stage of the development work according to the specified requirements. Acceptance testing is the last resort to verify whether the developed software can meet all functional and performance requirements, and usually adopts a black box testing method .

  4. Classification by test purpose
    (1) Functional test . Functional testing mainly tests the software against the product requirements specification to verify whether the software functions meet the requirements, including checking the original functions and testing whether the software has redundant functions or missing functions.
    (2) Robustness test . Robustness testing focuses on testing the program's fault tolerance, mainly to verify whether the program can run correctly under various abnormal conditions, including data boundary testing, illegal data testing, abnormal interruption testing, etc.
    (3) Interface testing . The interface test is a test for system joint debugging of each module, including the interface test in the program and the interface test outside the program. In interface testing, testers do part of the work in the unit testing phase, and most of the work is done in the integration testing phase.
    (4) Performance testing . Performance testing mainly tests whether the performance of the system meets user requirements, that is, verifies the capability of the system under specific operating conditions. Performance testing is mainly to simulate normal, peak and abnormal load conditions through automated testing tools, and test various performance indicators of the system. The load and response time data obtained in the test can be used to verify whether the software system can meet the user's requirements. performance indicators.
    (5) Strength test . Stress testing is a kind of performance testing. Stress testing always forces the system to run under abnormal resource configuration. The purpose of stress testing is to find errors caused by insufficient resources or resource contention, for example, if memory or disk space is insufficient, the test subject may exhibit some defects that are not obvious under normal conditions, which may be due to Manifested by contention for shared resources such as database locks or network bandwidth. A system can run normally with 366MB of memory, but it cannot run after reducing the memory capacity, and the system prompts that the memory is insufficient. The memory requirement of this system is 366MB.
    (6) Stress test. Stress test is a kind of performance test, mainly in an overload environment, to verify whether the program can run normally. The purpose of the stress test is to detect the performance of the system in the case of resource overload, and to discover the self-protection ability of the system in extreme or harsh environments through the limit test method. The goal of stress testing is to determine and ensure that the system will function properly beyond the maximum expected workload. In addition, stress testing evaluates software performance characteristics such as response time, transaction processing rate, and other time-related performance characteristics. For example, in the B/S structure, the user concurrency test is a stress test. Testers can use the Webload tool to simulate hundreds of customers visiting the website at the same time to see the system response time and processing speed?
    (7) User interface testing . User interface testing mainly tests the interface of the system, whether the user interface is friendly, whether the software is convenient and easy to use, whether the system design is reasonable, whether the interface location is correct, etc.
    (8) Security testing . Security testing mainly tests the ability of the system to prevent illegal intrusion, such as testing how the system operates when unauthorized internal or external users attack or maliciously damage the system, and whether data security can be guaranteed.
    (9) Reliability testing . Reliability testing refers to testing to ensure and verify whether the reliability level of software meets the requirements of users, that is, to determine whether the software meets the reliability indicators specified in the software specification. The purpose of software reliability testing is to give a quantitative estimate of reliability. By analyzing the failure data observed in software reliability testing, we can evaluate the current level of software reliability and verify whether the software reliability meets the requirements. Software reliability testing is a high-input testing work that usually requires a large number of tests.
    (10) Installation/anti-installation test . The installation test mainly checks whether the software can be installed correctly, whether the settings of the installation file are valid, and whether the entire computer system is affected after installation; the anti-installation test is the reverse process, testing whether the software is completely deleted, whether the software affects the entire computer system after deletion, etc. .
    (11) DOCUMENT TESTING . Documentation testing mainly checks the clarity and accuracy of internal/external documents. For external documents, the testing work is mainly aimed at user documents, mainly requirements descriptions, user manuals, installation manuals, etc., to verify whether there are differences between documents and actual applications , and must also consider whether the documentation is simple and clear, and whether the relevant technical terms are clearly explained.
    (12) RESUME TEST . Recovery testing mainly tests the performance of the system when there is a system crash, hardware error or other catastrophic problems, and the ability of the system to recover from the failure.
    (13) Compatibility testing . Compatibility testing mainly tests the compatibility of software products on different platforms, different tool software or different versions of the same tool software, and its purpose is to test the ability of the system to be compatible with other software and hardware.
    (14) LOAD TEST . Load testing is to find design errors or verify the load capacity of the system by testing the performance of the system under resource overload conditions. In this test, the test object will be subjected to different workloads to evaluate and evaluate the performance behavior of the test object under different workload conditions, as well as the ability to continue normal operation. The goal of load testing is to determine and ensure that the system will function properly beyond the maximum expected workload. In addition, load testing evaluates performance characteristics. For example, response time, transaction rate, and other time-related aspects.

5. Software testing process

The process of software testing

  1. Develop a test plan
    A test plan generally includes the following aspects.
    (1) Software testing background . The software testing background mainly includes the introduction of the software project, the introduction of the personnel involved in the project (such as the project leader, etc.), and the corresponding contact information.
    (2) Software testing basis . Software testing basis mainly includes software requirements documents, software specifications, software design documents, etc.
    (3) Definition of test scope . The definition of test scope is to determine the scope that the test work needs to cover.
    (4) Determination of risks .
    (5) Test resources . Determine the human resources and material resources that need to be consumed to complete the task, mainly including the requirements for testing equipment, testing personnel, testing environment and other resource requirements.
    (6) Test strategy . The test strategy mainly includes the method of testing, which test environment to build, which test tools and test management tools to use, and training for testers.
    (7) Formulation of timetable . After identifying subtasks and estimating test resources, tasks, resources, and time can be associated to form a test time schedule.
    (8) Others . The test plan should also include the date when the test plan was written, author information, etc.

  2. design test plan

  3. Test preparation and test environment setup

  4. Executing Tests
    Executing tests is to execute all or some selected test cases and observe their test results. The process of performing a test can be divided into the following stages.

    Unit testing→integration testing→system testing→acceptance testing, where each stage includes regression testing, etc.

    The steps to perform the test consist of the following 4 parts.
    Enter , the entry criteria necessary to complete the job.
    Execute a process , a process or job task from input to output.
    Check the process to determine if the output meets the standard processing procedures.
    Output , the resulting deliverables.

  5. Test Evaluation
    (1) Defect Evaluation . Defect assessment can be built on various methods, which are of great variety and cover a wide range (from simple defect counting to rigorous statistical modeling, etc.). Rigorous evaluation is expressed in terms of the rate at which defects are reached or found during testing. Commonly used models assume that this rate follows a Poisson distribution. Actual data on defect rates can be fitted to this model. Defect assessment assesses the reliability of the current software and predicts how reliability will change as testing continues or defects are eliminated. Defect assessment has been described as software reliability growth modeling, which is an active research area.
    (2) Coverage evaluation . Coverage evaluation is the evaluation of the completeness of the test, which is represented by the coverage of test requirements and test cases and the coverage of executed code. In short, test coverage is an arbitrary measure of completeness with respect to requirements (requirements-based) or design/implementation criteria for code (code-based).
    (3) Quality evaluation . Quality evaluation is the evaluation of the reliability, stability and performance of the test software, which is based on the evaluation of the test results and the analysis of the defects identified during the test process. When evaluating the performance behavior of a test object, a variety of metrics are available that focus on obtaining behavior-related data such as response times, timing profiles, execution flow, operational reliability, and limits. These measures are primarily evaluated in the "Assess Test" activity, but performance measures can also be used in the "Execute Test" activity to assess test progress and status. Key performance metrics include Dynamic Monitoring, Response Time/Throughput, Percentile Reports, Comparison Reports, and Trace and Profile Reports.

  6. test summary

6. Development history and development trend of software testing

Five, the basic quality of software testers

  1. Skill requirements
    (1) Business knowledge: Refers to the industry domain knowledge involved in the software tested by the testers.
    (2) Computer professional knowledge
    Computer professional skills mainly include:
    ● Software programming knowledge
    ● Network, operating system, database, middleware and other knowledge
    (3) Testing professional knowledge
    There is a lot of testing professional knowledge, which covers a wide range: both Basic testing techniques such as black box testing, white box testing, and test case design, as well as testing methods such as unit testing, functional testing, integration testing, system testing, and performance testing, as well as basic testing process management, defect management, and automated testing techniques and other knowledge.
    (4) User knowledge
    Testing should always consider issues from the perspective of users and users, not from the perspective of developers and implementers.

  2. Quality Requirements
    (1) Have a strong sense of responsibility, self-confidence and work with concentration, care and patience.
    (2) Strong communication and exchange skills.
    (3) Team spirit.


Summarize

The above is what I will talk about today. This article only briefly introduces the basic concepts of software testing. I hope it can be helpful to you who are reading. If you are also interested in software testing, just follow me to learn.

If you think my writing is not bad, please give me more likes and encouragement. Your support is also the biggest motivation for me to keep moving forward. At the same time, you are welcome to share this article with your friends and learn together. Finally, everyone is welcome to discuss with me the problems encountered in the learning process in private messages and comments, so that everyone can make progress together.

Guess you like

Origin blog.csdn.net/qq_50564231/article/details/130800929