Software testing - classification of testing (focus: black box testing, white box testing, unit testing, integration testing, system testing)

1. Divide according to test objects

1) Interface testing

The interface interacts directly with the user, and the quality of the interface design determines the user's intuitive experience when using the software.

Interface testing (UI testing) generally includes the following:

  1. Compare the UI design draft to verify the consistency and correctness of the system display interface
  2. Verify the correctness of every feature on the interface
  3. Verify whether the interface layout is reasonable. Font size, image layout, clarity, etc.
  4. Verify that interface controls are functioning properly. Scroll bars, buttons, text boxes, etc.
  5. Test the interface at different resolutions
    • Ensure that the page changes from large to small (or from small to large) smoothly and without any lag.
    • Ensure that the fonts on the page are not blurred, ghosted or disappeared
    • Ensure that the pictures on the page do not disappear and the layout is reasonable
    • Ensure that the functions of the page are used normally

2) Reliability test

Reliability refers to the ability or degree of normal operation of the system, generally expressed as a percentage.

Reliability = uptime / (uptime + abnormal uptime)

Factors affecting software reliability:

  • software itself
  • External factors, including electricity, network, hardware equipment, etc.

3) Fault tolerance test

Fault tolerance refers to the ability of the system to handle exceptions or errors by itself due to abnormal operations by itself or external parties.

Fault tolerance testing includes the following aspects:

  • When the user inputs abnormal data, will the system give a prompt, or will the system do some internal processing?

  • Will prompts be given when users perform complex operations or operations that may endanger data security?

  • If there is a power outage or network outage or there is a problem with the hardware device, can it be seamlessly switched to the backup server?

  • Disaster recovery testing
    artificially causes server failure to test the software system's environmental recovery capabilities, system data recovery capabilities, and recovery time

4) Document testing

Test various documents generated during the entire development process, including requirements documents, design documents, functional documents, and user manuals, to verify the correctness, consistency, and completeness of the documents.

5) Compatibility testing

  • Platform compatibility: Verify the compatibility of the system with different browsers, operating systems, different brands of mobile phones or computers
  • Compatibility of the software itself: Verify the compatibility of new software functions with old functions. Newly developed functions cannot affect the use of old functions.
  • Software compatibility with user data: For example, adding a new field to a table in the database cannot affect the storage of the user’s previous data.
  • Software compatibility with third-party software: When interacting with third-party software in functions or data, it cannot affect the use of third-party software.

6) Usability test

Usability testing refers to verifying whether the user is flexible, comfortable, and easy to use when using the software.

Usability testing generally includes the following points:

  • Comply with standards and specifications

    For today's software, its UI design standards have slowly been established, and most users have become accustomed to such standards and specifications. For example, the color of the picture or font when a serious error occurs in the software

  • intuitiveness

    The interface layout is required to be reasonable and the software functions are simple to operate, clear and easy to understand.

  • flexibility

    Users can choose the operation method that suits them according to their own habits

    For example, the keyboard on the mobile phone can switch between nine-square grid, full keyboard, handwriting and five-stroke input.

  • comfort

    Let users have a sense of their own operations without causing anxiety

    When installing or downloading software, add a progress bar

7) Testing of software installation and uninstallation

The main test points are as follows:

  • Is it possible to install and uninstall software normally using different methods?
  • Is it possible to manually pause or cancel when installing or uninstalling?
  • Whether to give a prompt when the installation space is insufficient?
  • If you cancel the uninstallation during the uninstallation, will the software be able to be used normally?
  • Abnormal testing during uninstallation or installation (such as network disconnection, power outage, crash, etc.)
  • After the uninstallation is completed, is the data file information of the software cleared?

8) Security testing

Security refers to information security, which means that networks and systems protect users’ data and privacy from infringement and leakage.

Anti-virus, anti-hacker, anti-XSS injection, anti-SQL injection, anti-crawler

9) Performance testing

When using the software, sometimes the web page opens slower and slower, and it takes a long time to display the list when querying data. These are all caused by system performance problems.

Common performance issues include the following:

  • Resource leakage
  • Resource bottleneck
  • Thread deadlock, thread blocking
  • Query speed is slow or inefficient

The key indicators to measure the performance of a system include response time of user operations, throughput, memory and CPU usage.

10) Memory leak testing

Memory leaks can cause software to run slower and slower and eventually stop responding.

Common causes of memory leaks:

  • After memory is allocated, it is not recycled
  • There is a problem with the way the program is written and it cannot be recycled (for example, an infinite loop prevents the recycling step from being executed)
  • The API function is used incorrectly and cannot be recycled

2. Divide according to whether to view the code

1) Black box testing

Black box testing does not care at all about the implementation and logical structure of the internal code of the software. It only cares about whether the input and output of the system meet expectations and whether the functions comply with the requirements specification.

Advantages of black box testing:

  • There is no need to understand the internal structure of the code, and people with poor coding skills can also test it.
  • Testing system functions from the user's perspective is conducive to cultivating testers' user thinking
  • The test cases are designed according to the requirements specification, so it is not easy to miss the requirements.

Disadvantages of black box testing : Since black box testing does not care about the implementation of the internal code of the system, the code cannot be tested.

Black box testing method:

Equivalence class method, boundary value method, error guessing, cause and effect diagram method, scenario method, orthogonal method

2) White box testing

White box testing is to test the code, design test cases according to the logical structure of the code, and verify whether the actual running status of the code meets the expected status.

Test methods for white box testing:

  1. Statement coverage:

Design enough test cases so that every statement in the program is executed at least once

  1. Judgment coverage:

    Design enough test cases so that each branch of each decision statement in the program is executed at least once.

    For example: the if condition in the if else statement must be tested whether it is true or false; each case in the switch case statement must be tested

  2. Condition coverage:

    Design enough test cases so that each logical condition in the decision statement is true or false at least once.

    For example: in if (a > 0 && b < 0), make sure that the two logical conditions a > 0 and b < 0 are true and false respectively and appear at least once.

  3. Decision – condition coverage:

    Design enough test cases so that each logical condition in the decision statement, whether true or false, occurs at least once, and all possible results of the decision statement also occur at least once.

    For example: in if (a > 0 && b < 0), make sure that the two logical conditions a > 0 and b < 0 are true and false respectively occur at least once, and at the same time if (a > 0 && b < 0 ) Determine whether the statement is true or false also occurs at least once

  4. Condition combination coverage:

    Design enough test cases so that all possible combinations of logical condition results in the decision statement occur at least once

    For example: in if (A && B), there are two conditions A and B, then the condition combination coverage requires the test case to include the following situations:

    A is true, B is true
    A is true, B is false
    A is false, B is true
    A is false, B is false

  5. Path coverage:

    Design enough test cases so that every possible path in the program is executed at least once

3) Gray box testing

A test between black box testing and white box testing. It is mostly used in the integration testing phase. It not only focuses on the input and output of the program, but also pays attention to the internal conditions of the program.

3. Divide according to development stages

Testing pyramid: The further down you go, the higher the testing efficiency and the easier it is to locate problems.

1) Unit testing (combined with V model)

Unit testing is to test the module, the smallest unit of software, to verify the correctness of the basic modules of the software.

Testing phase : After coding or before coding (TDD)

TDD : Test-driven development. Before developers write functional code, they first design the test case code, and then write functional code based on the test case code. The ultimate goal is to ensure that all test cases designed before development can be executed and passed.

Test objects : Each module of the software

Testing method : White box testing

Tester : White box testing engineer or developer

Test basis : Detailed design documents

Test content : module interface, boundary testing, exception testing, path testing, local data structure testing

Using the Junit framework for unit testing in Java

2) Integration testing

Combine unit modules according to a certain strategy to form a large functional module, and test this large functional module

Testing phase : After unit testing

Test object : Integrated large module

Testing method : Gray box testing

Test basis : Summary design document

Tester : White box tester or developer

Test content : Correctness of the entire module function, correctness of the interface between unit modules, impact of defects in a single module on the function of the entire module, functional conflicts between modules, testing of global data structures

3) System testing

Comprehensive testing of the functions and performance of the entire software system as well as the software and hardware environment in which the software runs

Testing phase: After the integration test passes

Test object: The entire software system

Testing method: black box testing

Tester: Black box tester

Test basis: requirements specification document

Test content: Function, interface, compatibility, security, performance, reliability, ease of use, fault tolerance

System testing also includes regression testing and smoke testing:

Regression testing: When new code is introduced into the system or old code is modified, retest to ensure that all functions of the system are functioning properly.

  • Regression testing generally uses automated testing

  • Smoke test: Before the formal test, the basic process and core functions of the system will be tested. After the test passes, the formal test will begin.

4) Acceptance testing

The last test before the software goes online is conducted by users or product deliverers based on user needs.

Testing phase: After system testing

Test object: The entire system

Tester: User or product deliverer

Test basis: User needs

Testing method: black box testing

Test content: Same system test

5) Correspond the above four test methods with the stages of the V model

4. Divide according to test implementation organization

1) α test

α Testing refers to allowing users or internal company personnel other than developers and testers to go to the development site for testing

2) Beta test

Beta testing refers to testing by actual users in actual usage environments, regardless of time or location.

For example: some games will open test servers before they are officially launched and invite some players to test them.

The difference between alpha test and beta test:

  • Alpha testing precedes beta testing
  • The testing environments of the two are different. Alpha testing is in the development environment, and beta testing is in the actual user environment.
  • Compared with alpha testing, beta testing is larger in scale and has a longer testing cycle.

3) Third-party testing

The software is tested by third-party software testing
agencies in accordance with industry standards and specifications.

5. Divide according to whether it is running or not

1) Static testing

Without running the code, statically check where errors may occur in the code, and analyze whether the logical structure of the code and the specific method implementation meet the requirements.

2) Dynamic testing

Run the code and execute the test cases for testing

6. Divide according to whether it is manual or not

1) Manual testing

Manually execute the test cases one by one and view the test results

Advantages: Conducive to exploratory testing and cannot be replaced by automated testing

Disadvantages: Error-prone when there are many use cases, and efficiency is relatively low

2) Automated testing

The machine performs tests according to pre-set conditions, including normal and abnormal conditions.

Automated testing can also be divided into: UI automation, interface automation, and performance automation according to test objects.

The value and significance of automation: Save manpower. The higher the utilization rate of automated scripts, the more valuable it is.

Not all projects are suitable for automated testing

Automated testing is not suitable for projects with unstable projects and frequently changing functions. It is generally used for regression testing and smoke testing.

7. Divide by region

According to geographical division, it can be divided into: localization testing and international testing

Internationalization of software: An engineering technology used when developing software that allows the software to adapt to the languages, customs, and usage habits of different countries without changing the source code of the software.

Software internationalization and localization are two processes for software systems used by users in different regions around the world, while localization testing and internationalization testing are tests for such software products.


Finally, I would like to share with you some of my learning materials:

The above content should be the most comprehensive and complete preparation warehouse for software testing friends. In order to better organize each module, I also referred to many high-quality blog posts on the Internet. and projects, trying not to miss every knowledge point. Many friends relied on these contents to review and got offers from major manufacturers such as BATJ. This warehouse has also helped many software testing learners. I hope it can also help you. .

Follow my WeChat official account below to get it for free! ↓ ↓ ↓ ↓ ↓

Guess you like

Origin blog.csdn.net/weixin_56331124/article/details/132740470