Software Testing_Basic knowledge of software testing

Hello, I am Ken. I
added a new course of software testing, so I specially organized a new column.
Refer to the relevant school textbooks and organize and delete them. They are related to the curriculum. The focus is on the test sites. For a simple understanding of software testing.

Insert picture description here

People are always too hypocritical
to live. Hope you can encourage yourself to persevere when you are in a mess. It is
difficult for others to understand.

1.1_Software testing background

Software defects have caused a lot of losses in our production and life. These painful lessons always remind the world to pay more attention to software testing and continuously improve the quality of software.

1.1.1_ Software failure case

1.1.2 _Software defect definition

Software defect refers to a problem, error, or hidden functional defect in computer software or program that damages normal operation.
The existence of defects will cause the software product to fail to meet the needs of users to some extent. IEEE729-1983 has a standard definition of defects: From the inside of the product, defects are errors and defects in the development or maintenance of software products; from the outside of the product, defects are a certain function that the system needs to achieve. The invalidation or violation.

For the definition of software defects, there are usually the following 5 rules. If any one of them is met, it is called "software defect".

(1) The software does not reach the functions already marked in the product manual.

(2) The software has an error that will not appear in the product manual.

(3) The software does not reach the goal that should be reached although not indicated in the product manual.

(4) The software function is beyond the scope specified in the product manual.

(5) Software testers believe that the software is difficult to understand, difficult to use, slow to run, or end users believe that the software is not effective.

1.2_ Software development process

1.2.1_ Composition of software products

  1. Software products require various development inputs
  2. customer demand
  3. Product Manual
  4. Schedule
  5. Software Design Document
  6. Test document

1.2.2_ Software project team members

The development of software projects requires the unity and cooperation of a large number of personnel. The following list lists the main personnel and their responsibilities.

①Project manager, program manager or supervisor: always drive the entire project, be responsible for writing product specifications, managing progress, making major decisions and making choices.

②Designer or system engineer: is the technical expert of the software team, designing the entire system architecture or software concept. ③ programmer, developer or creator codes: design, write and fix software defects.

④Tester or quality assessor: Responsible for finding and reporting software product problems.

⑤Technical authors, user manuals, user training specialists, manual numbering personnel or copywriters: compile files and online documents attached to software products.

⑥ Software administrator or production staff: responsible for synthesizing all the documentation written by the programmer into a software package.

1.2.3_ Software development mode

The process from the initial idea to the public release of software products is called the software development model.

  1. Rapid prototyping model The
    rapid prototyping model allows preliminary incomplete analysis and definition of software requirements in the requirements analysis stage.

  2. The incremental model
    uses linear sequences that are interleaved with the progress of the schedule. Each linear sequence produces a distributable "increment" of the software.

  3. Prototype model The
    prototype model is also called the sample model, which uses a gradual refinement method to perfect the model.

  4. Fountain model The
    fountain model is a model driven by user needs and object-driven. It should not be used in object-oriented software development projects.

  5. Spiral model The
    spiral model is suitable for projects with frequently changing requirements and for large and complex systems.

  6. Waterfall model
    from the essence, the waterfall model is a model of software development framework duplicate applications, the core idea is based on cross-question process simplification, will be implemented separately from design features, ease of division of labor, that is, the use of structured analysis and design Method, separate the logical implementation from the physical implementation.

1.3_Basic theory of software testing

1.3.1_ Basic concepts of software testing

  1. The definition of software testing
    Software testing is the use of manual or automated tools in accordance with the test program and flow process of product testing.
    Sometimes it is necessary to write different test tools, design and maintain the test system, and analyze and evaluate the possible problems of the test plan. After executing the test cases, it is necessary to track the failures to ensure that the developed products meet the needs of users.
    _Software
    testing is a software process that helps to identify the correctness, completeness and quality of the completed (intermediate or final version) computer software (whole or part), and is an important sub-domain of SQA (Sofware Quality Assurance).

  2. Testing principles
    (1) Software developers and programmers should avoid testing their own programs. It is more effective to test your own software by others.
    (2) Software testing should be carried out as soon as possible and continuously.
    (3) Have a correct attitude towards test cases. When designing test cases, not only reasonable input conditions must be considered, but also unreasonable test conditions must be considered.
    (4) People are divided into groups and things are gathered together. Pay full attention to the 20-80 principle. Don't think that after you find a few errors and solve these problems, you don't need to test.
    (5) Strictly implement the test plan and eliminate the randomness of the test.
    (6) A comprehensive inspection should be carried out on each test result.
    (7) Properly save test plans, test cases, test reports, and final analysis reports for regression testing and maintenance.

  3. Test
    goal_The
    purpose of software testing determines how to organize the test. If the purpose of the test is to find as many errors as possible, then the test should be performed directly on the more complicated parts of the software or the locations where there were more errors in the past. If the purpose of the test is to provide end users with a certain degree of credibility, the test should directly target commercial assumptions that are often used in practical applications.
    _Different
    organizations have different test purposes; the same organization may also have different test purposes, which may be testing different districts or different levels of testing in the same area.

1.3.2_Basic technology of software testing

  1. The basic methods of software
    testing_For
    software testing technology, it can be classified from different perspectives:
    _From the
    perspective of whether the software under test needs to be executed, it can be divided into static testing and dynamic testing:
    _From
    whether the test is aimed at the internal structure and specific of the system operator implementation point of view, can be divided into black box testing and white box
    _
    (1) black box testing
    _
    black box testing, also known as functional testing or data driven test , which is known in the premise of the product should have the function Next , test whether each function can be used normally .
    When testing, the program is regarded as a black box that cannot be opened. Without considering the internal structure and internal characteristics of the program, the tester performs the test on the program interface. It only checks whether the program function is normal according to the requirements specification. Use, whether the program can properly receive input data to generate correct output information, and maintain the integrity of external information (such as databases or files). Black box testing methods mainly include equivalence class division method, boundary value analysis method, causality diagram method, error guessing method, etc., which are mainly used for software verification testing.
    _ The
    "black box" method focuses on the external structure of the program, does not consider the internal logical structure, and tests the software interface and software functions. The "black box" method is an exhaustive input test. Only when all possible inputs are used as test conditions can all errors in the program be detected by this method. In fact, there are multiple testing situations. People not only have to test all legal inputs, but also those illegal but possible inputs.
    _
    (2) white box
    _
    white-box testing, also known asStructure test or logic-driven test , which is based on the premise of the internal working process of the product , which can be used to test whether the internal actions of the product are carried out normally according to the specifications . According to the internal structure test procedure of the program, every item in the program is inspected . Whether each channel can work correctly as scheduled, regardless of its function. The main methods of white box testing include logical coverage method and basic path method , which are mainly used for software verification .
    The "white box" method has a comprehensive understanding of the internal logical structure of the program and tests all logical paths. The "white box" method is an exhaustive path test. When using this scheme, the tester must check the internal structure of the program, and get the test data from the logic of the check program. The number of independent paths throughout the program is astronomical. But even if each path is tested, there may still be errors. First, the exhaustive path test must not detect that the program violates the design specification, that is, the program itself is a wrong program; second, the exhaustive path test cannot detect errors in the program due to missing paths; third, Exhaustive path testing may not find some data-related errors.

  2. The complexity and economy of software testing
    People often think that developing a program is difficult, but testing a program is easier. This is actually a misunderstanding.

  3. Test process and organization
    First of all, testers should carefully read the relevant information and make preparations before the test.
    The testing process is divided into several stages:
    1 code review
    2 unit testing (focus on checking the smallest unit of software design-on the module)
    3 integration testing (assembling the modules according to the design requirements and testing at the same time)
    4 confirmation testing (the purpose is to provide future users Show that the system can work as scheduled)
    5 System test (after the software development is completed, it will eventually run with other parts of the system)

1.4_Software quality and quality model

1.4.1_ Definition of software quality

Software quality: the international standard organization ISO ISOIEO9126 defines software quality as the sum of the characteristics and characteristics that reflect the ability of software products to meet specified and potential needs .

MJ. Fisher defines software quality as the combination of all the characteristics that describe the excellence of computer software. In other words, in order to meet the precisely defined function and performance requirements of the software and meet the documented development standards, some quality characteristics and their combinations need to be given or designed accordingly. To obtain high-quality software products, they must meet These quality characteristics.

According to the standard in ANSI/IEEE Std 1061. 1992, software quality is defined as: the totality of features or characteristics related to the specified and implicit capabilities of software products to meet requirements. Specifically:

(1) The collection of all the characteristics of the software product that can meet the user's given needs;

(2) The degree to which the software has all the various attribute combinations;

(3) Whether the software obtained subjectively by users meets their comprehensive expectations;

(4) Determine the synthesis characteristics of the software that will meet its comprehensive expectations in use.

At present, there are many references to software quality characteristics, but they are actually similar. The software quality characteristics defined in the ISOIEC 9126 international standard are the following 6 items: functionality, reliability, ease of use, efficiency, maintainability and portability.

1.4.2_ Factors affecting software quality

The characteristics of the software itself and some shortcomings of the current software development model make it impossible to completely avoid the internal quality problems of the software.

(1) The characteristics of the software itself. Software has only complexity, consistency, variability and invisibility.

(2) The development process is mostly based on the traditional waterfall model, which increases the cost.

(3) Choose support tools. In the entire software development process, the available development tools or management tools are very limited.

(4) Limitations of the test. Testing can only minimize errors to a certain extent.

1.4.3_ Software quality control

  1. Software Quality Control definition
    _
    is defined in the IEEE software quality control are: to evaluate the development or production of software product quality and range of activities. Quality control is a part of quality management . It is a series of reviews and tests applied throughout the development cycle to ensure that each product meets its needs . _Software quality control refers to monitoring the specific results of a project to determine whether it meets the relevant quality standards, and to determine how to eliminate the root causes of unqualified results. That is to say, software quality control aims at software quality, takes software quality evaluation as measurement, and takes software quality control as the core means to efficiently operate the software development process. _ High-quality software cannot do without effective management and control. JMJuran believes that quality control is a routine process through which the actual quality performance is measured and compared with the standard, and actions are taken when there is a difference. As a result, Donald Refer gives the definition of software quality control: software quality control is a series of verification activities, at any point in the software development process, to evaluate whether the developed software product technically meets the specifications specified at this stage. _Therefore , we give the definition of software quality management as: software quality management is a series of verification activities. Through these activities, we can judge whether each stage of software development meets the established requirements, and whether software defects and software errors occur Provide timely corrections and corrections.





  2. Software quality management
    method_Software
    development still cannot be carried out automatically, and manual development is the main method. In view of the characteristics of the software, the quality control of the software should pay more attention to the control of the software process and improve the quality management system to meet the requirements of software quality management.

1.4.4_ Standards and metrics for software quality evaluation

Software quality p has an evaluation method different from that of hardware. According to the characteristics of software products, evaluating the quality of a software requires an evaluation standard, an evaluation criterion and a measurement.

  1. Standard
    _
    6 software quality is standard quality characteristics of the software, as described below.
    _
    (1) Functionality:
    refers to the degree to which the functions realized by the software meet the needs of users.
    _
    (2) Reliability:
    refers to the degree to which the software can maintain its expected performance level under the specified time and conditions. It not only reflects the degree to which the software meets the user's requirements for normal operation, but also reflects the degree to which it can continue to operate when a failure occurs.
    _
    (3) Ease of use:
    refers to the degree of effort made by users when learning and operating a software. Ease of use reflects the friendliness of the software and users.
    _
    (4) Efficiency:
    refers to the degree of effectiveness of the computer resources (CPU, memory, interfaces, peripherals, etc.) required by the software to achieve a certain function under specified conditions. Efficiency reflects whether resources are wasted when fulfilling functional requirements.
    _
    (5) Maintainability:
    refers to the degree of effort made to make corresponding modifications in a running software in order to meet user needs, environment changes or software errors. Maintainability reflects the ease with which the software can be modified when user needs, environment changes or software errors occur.
    _
    (6) Portability:
    refers to the ease of porting from one computer system or environment to another computer system or environment. Portability reflects the adaptability of the software in different environments and evaluates the quality of the software.

  2. Guidelines
    _
    for different types of software, all phases of development software, evaluation criteria for different combinations of organic, only reflects the quality elements of the software.

  3. Measure
    _
    the development of different life cycle in the software, to develop appropriate evaluation of the content at each stage of the different types of software, in order to achieve quality control of the software development process.

1.4.5_ Methodology system of software measurement

  1. Project metrics
    _
    project metrics is a specific measure for software development projects.

  2. Size measurement
    _
    size measurement is to estimate the software cost, preparation of cost estimates, based on sound planning project schedule.

  3. Cost measurement
    _
    mainly refers to the estimation of the financial cost required by the software development project.

  4. Customer satisfaction measurement

  5. Software quality life cycle and its measurement

  6. Process measurement
    _
    process metrics is to measure all aspects of the software development process

The above content should be understood:
the definition of software defects,
the advantages and disadvantages of the development model, the
major principles of
software testing, the six characteristics of software quality,
the process and organization of testing

  • Briefly describe the advantages and disadvantages of the
    prototype development model. The advantages of the prototype model are as follows:

    _
    (1) Developers and users reach an agreement on the "prototype". In this way, errors in design and risks in development can be reduced, as well as the time for user training, and the practicability, correctness and user satisfaction of the system are improved.
    _
    (2) Shorten the development cycle and speed up the project progress.
    _
    (3) Reduce costs.
    _The
    disadvantages of the prototype model are as follows:
    _
    (1) When the product is reproduced, it is difficult for users to accept it, which brings disadvantages to the continued development of the project.
    _
    (2) It is not appropriate to use the prototype system as the final product. To develop a system using a prototype model, users and developers must reach an agreement.

  • Briefly describe the test process and organization.
    After the design work is completed, the preparation for the test should be started. Generally speaking, a designer familiar with the entire system design writes the test outline to clarify the test content and the criteria for passing the test , Design complete and reasonable test cases so that the system can be fully tested after the system is implemented.

    _After
    the implementation team has verified the developed program, it is submitted to the test team, and the test leader organizes the test. The test can generally be organized as follows:
    _
    (1) First, the tester should carefully read the relevant information, including specifications, Design documents, instruction manuals, test outlines, test content and test passing criteria formed during the design process, fully familiar with the system, write test plans, design test cases, and make preparations before testing.
    _
    (2) In order to ensure the quality of testing, the testing process is divided into several stages, namely: code review, unit testing, integration testing, confirmation testing and system testing.
    _
    (3) Code review.
    Code review is the process of static analysis of the program through reading, discussion and disputes. The review team held a code review meeting on the basis of fully reading the document to be reviewed, the control flow chart and relevant requirements, specifications and other documents. The programmer explained the logic of the program sentence by sentence, and launched lively discussions and even disputes to reveal the wrong The point is. Practice shows that in the process of explaining the procedure, you can find many mistakes that you didn't find before, and the progress of discussion and dispute has prompted the exposure of the problem.

    _
    (4) Unit testing.
    Unit testing focuses on checking the smallest unit module of the software design. Through testing, it is found that the actual function of the module does not conform to the functional description that defines the module, as well as coding errors.

    _
    (5) Integration test.
    Integration testing is to assemble the modules according to the design requirements and test them at the same time. The main goal is to find problems related to the interface. For example, data may be lost when passing through the interface; one module and another module may have harmful effects due to negligence; combining sub-functions may not produce the expected main function; individual errors that seem acceptable may accumulate Unacceptable degree; the whole data structure may have errors, etc.

    _
    (6) Confirmation test.
    The purpose of validation testing is to show future users that the system can work as intended. After the integration test, all the modules have been assembled into a complete software system according to the design, and the interface errors have been basically eliminated. Then, the validity of the software should be further verified. This is the task of confirming the test, that is, the function and function of the software. The performance is as expected by users.

    _
    (7) System testing.
    After the software development is completed, it will eventually run with other parts of the system for system testing. Including recovery testing, safety testing, strength testing and performance testing.

    _After
    testing the software through the above-mentioned testing process, the software basically meets the development requirements, the test is announced, and after the experience is accepted, the software is submitted to the user.

Insert picture description here

I remember a few years ago in high school when a classmate said a word on the podium,
"You do not lose, you just have not won it,"
he seems to have had the first three grades five firmly,
and even then most When it is bad, there are more than a dozen people,
but he finally went to a school in Beijing with a double first-class university admission notice...
Ordinary is very annoying,
but you can’t bother to
find your own rhythm, know how to overcome difficulties, and
have your own The rhythm is always right

I’m Ken,
welcome to visit next time

Guess you like

Origin blog.csdn.net/kenken_/article/details/108437237