Summary of Software Testing Technology Course (2) Basic Knowledge of Software Testing

Software Testing Classification

insert image description here

By test stage

  • Unit testing: Unit testing is the testing work for the smallest unit of software design—program module or even code segment to check the correctness, usually performed by developers.
  • Integration test: Integration test is to assemble the modules according to the design requirements for testing, the main purpose is to find problems related to the interface.
  • System test: System test is carried out after the integration test is passed, the purpose is to fully run the system, verify whether each subsystem can work normally and meet the design requirements.
  • Acceptance test: The acceptance test takes the "Requirement Specification" in the requirements phase as the acceptance standard, and the test requires simulating the actual user's operating environment. For actual projects, it can be carried out together with customers, and for products, it is the last system test. The test content is a comprehensive test of the functional modules, especially the document test.

insert image description here

According to the executive body

  • Alpha testing refers to the internal personnel of the software development company simulating various users to test the upcoming software products (called alpha version) in an attempt to find errors and correct them. The key to α testing is to simulate the actual operating environment and the user's operation of the software product as realistically as possible, and try to cover all possible user operation modes as much as possible. A software product adjusted through alpha testing is called a beta version.
  • Beta testing is a test conducted by multiple users of the software in the actual use environment, and these users return relevant error information to the developer. In beta testing, the user records all the problems encountered, including real and subjective ones, and reports to the developer regularly. Only when the alpha test reaches a certain degree of reliability, the beta test can be started. It's in the final stages of testing. At the same time, all manual texts for the product should also be fully finalized at this stage.
  • Third-party testing is different from testing by developers or users, and its purpose is to ensure the objectivity of the testing work.

According to the execution status

  • The static method refers to not running the program under test itself, but only checking the correctness of the program by analyzing or checking the syntax, structure, process, interface, etc. of the source program. Perform structural analysis, flowchart analysis, and symbolic execution on requirements specifications, software design specifications, and source programs to find errors.
  • The dynamic testing method refers to checking the difference between the running results and the expected results by running the program under test, and analyzing performances such as running efficiency, correctness and robustness.

The difference between static testing and dynamic testing:

insert image description here

According to the test technology

Test Methods introduce
white box testing White-box testing, also known as structural testing, is mainly used to detect errors in the software coding process. Programmers' programming experience, mastery of programming software, working status and other factors will affect the quality of programming and lead to code errors.
black box testing Black box testing, also known as functional testing, mainly detects whether each function of the software can be used normally. During the testing process, the program is regarded as a black box that cannot be opened, and the program interface is tested without considering the internal structure and characteristics of the program to check whether the program function can be opened and used normally according to the design requirements and the specifications of the manual.
gray box testing Gray box testing is a test between white box testing and black box testing. Gray box testing is mostly used in the integration testing phase, not only focusing on the correctness of output and input, but also paying attention to the internal situation of the program. Gray box testing is not as detailed and complete as white box testing, but it pays more attention to the internal logic of the program than black box testing, and often judges the internal operating status through some representative phenomena, events, and signs.

software testing model

The software testing model is the framework of the software testing work, which describes the main activities included in the software testing process and the interrelationships between the activities. Software testing models include: V model, W model, H model, X model, pre-model, etc.

V model

insert image description here

There are certain limitations in the V model, which only regards the testing process as a stage after requirement analysis, general design, detailed design and coding. It is easy to make people understand that testing is the last stage of software development, mainly for testing programs to find errors, and hidden problems in the requirements analysis stage are not discovered until the later acceptance testing.

W model

insert image description here

Compared with the V model, the W model increases the verification and validation (V&V) activities that should be carried out simultaneously in each software development stage.
The W model is composed of two V-shaped models, representing the testing and development process respectively. Testing is accompanied by the entire software development cycle. The object of testing is not only the program, but also the requirements and design. That is to say, testing and development are synchronized. conduct.

The W model embodies the principle of "software testing as early as possible and continuously". The W model also has limitations. In the W model, activities such as requirements, design, and coding are regarded as serial, and testing and development activities maintain a linear front-to-back relationship. The work of the next stage begins after the end of the previous stage. Therefore, the W model cannot support iteration. development model

H model

insert image description here

Both the V model and the W model believe that software development is a series of serial activities such as requirements, design, and coding. In fact, these activities can overlap most of the time, so there is no strict sequence relationship between the corresponding tests. There are repeated iterations between unit testing, integration testing, and system testing. Because of the problems of V-model and W-model, H-model completely separates test activities, so that test preparation activities and test execution activities are clearly reflected.

The H model reveals that software testing runs through the entire software life cycle as an independent process, and is performed concurrently with other processes, and points out that software testing should be prepared and executed as early as possible. Different test activities can be carried out in a certain order, or it may be repeated. As long as a certain test reaches the readiness point, the test execution activities can be carried out.

Features of the H model:

  1. The separation of test preparation and test execution is beneficial for resource allocation, cost reduction and efficiency improvement.
  2. Fully reflect the complexity of the testing process (not technology).

X model

insert image description here

The left side of the X model describes coding and testing for individual program fragments

At the upper right of the X model, the finished product that has passed the integration test is sealed and submitted to the user, and it can also be used as part of a larger scale and scope of integration.

The exploratory tests are located at the bottom right of the X model. This is a special type of testing that is not planned in advance and often finds software bugs outside of the test plan.

front model

insert image description here

Features of the front model:

  1. Combining development and testing
  2. Test each deliverable
  3. Plan and test designs during the design phase
  4. Keep acceptance tests and technical tests separate from each other
  5. Alternate development and testing

Advantages and disadvantages of the front model:

advantage:

  1. Strict QA and QC to enhance testing quality
  2. The test runs through the development all the time, which effectively improves the test
  3. Emphasis is placed on acceptance testing, and dual-mode testing is used to ensure that the system can be successfully accepted

shortcoming:

  1. Complex process management
  2. Difficult to cope when requirements change
  3. High requirements for documentation, quality management, configuration management, and project management

test case

Test Case (Test Case) is a scientific organization and induction of the behavior of software testing, with the purpose of transforming the behavior of software testing into a manageable model; at the same time, Test Case is also one of the methods to quantify the test, different Class of software, test cases are different. The design methods of test cases mainly include black box testing method and white box testing method

The role of test cases

  • Guided Test Implementation
  • Planning test data preparation
  • Metrics for evaluating test results
  • Ensure software maintainability and reusability
  • Criteria for Analyzing Defects

Test case design requirements

  • effectiveness
  • economy
  • multiplicity
  • Completeness
  • Decidability
  • reproducibility

Guess you like

Origin blog.csdn.net/lichukuan/article/details/126690853