Chapter 21 Layered Architecture Software Testing

Table of contents

1. Main content

Second, the concept of layered architecture

Three, the level of layered architecture

1. Presentation layer

(1) Concept

(2) The method adopted

2. Service layer

3. Business logic layer

4. Data layer

Fourth, the advantages and disadvantages of layered architecture

1. Advantages

2. Disadvantages

Five, presentation layer quality characteristics

1. Routine test items

(1) Content display and check of required items

(2) Button/link correctness check

(3) General inspection

2. Web-based presentation layer test

(1) Browser portability test (important test points)

(2) Page performance test

(3) Quality characteristics involved in the Web side

3. PC-based presentation layer test

(1) Installation/uninstallation test

(2) Online upgrade test

(3) Network switching test

(4) Portability test

(5) Quality characteristics involved in the PC side

4. Mobile-based presentation layer testing

(1) Installation/uninstallation test

(2) Switching test (network switching, front-background switching)

(3) Online upgrade test

(4) Security testing (software permissions, application security)

(5) Performance test (startup time, CPU, memory, power consumption, traffic, power consumption, fluency)

(6) Portability test

(7) Quality characteristics involved in the mobile terminal

5. Presentation layer testing strategy

1. Pay special attention to software usability

2. Principles of presentation layer test design and implementation

Six, service layer quality characteristics

1. Functional test

2. Information Security

3. Performance test

Seven, service layer testing strategy

1. Service interface layer test design and implementation principles

2. Principles of interface test quality assessment

Eight, business logic layer quality characteristics

1. Functionality

(1) For function points

(2) For business flow

2. Information Security

(1) Detect through the test method of source code audit

(2) Common code problems

Nine, business logic layer testing strategy

1. Business function testing strategy

(1) Analysis of test requirements

(2) Test case design

(3) Use case review

(4) Test Implementation Execution

2. Code audit test strategy

10. Data layer quality characteristics

11. Data layer testing strategy

1. Database security policy

(1) Generally, testing techniques based on specifications are used, with manual functional inspection as the main form

(2) Check content

2. Performance efficiency strategy

(1) Using TCP performance testing standards and specifications

(2) Currently commonly used performance test specifications

3. Database reliability strategy

(1) Online backup

(2) Fault recovery

4. Data correctness and integrity policy

(1) Adopt the test method based on specifications, mainly manual testing

(2) Test content

5. Data functional strategy

(1) Test point

6. Data Migration Strategy

(1) Principles of data migration testing

(2) Use cases involved in data migration

(3) Test method for data migration


1. Main content

Important test points for afternoon questions
1. Introduction to layered architecture
2. Quality characteristics
3. Testing strategy

Second, the concept of layered architecture

  • Layered architecture is a paradigm of software architecture and one of the standard architectures;
  • It divides the architecture into several layers, each layer has its own responsibilities, and the layers interact and transfer information through interfaces;
  • This layer does not need to understand the implementation details of other layers, but only needs to consider the interface and calls between the two layers related to this layer.

Three, the level of layered architecture

1. Presentation layer

(1) Concept

  • Also known as the user interface layer, it is responsible for the deployment of business and views.

(2) The method adopted

  • Web-based presentation layer
  • PC-based presentation layer
  • Mobile-based presentation layer

2. Service layer

  • Also known as the application layer, it provides support for various services for the presentation layer, such as user login and so on.

3. Business logic layer

  • Also known as the domain layer, it is responsible for the implementation of business rules and business process logic.

4. Data layer

  • Responsible for data access and data management services, such as databases, storage files, etc.

Fourth, the advantages and disadvantages of layered architecture

1. Advantages

  • Strong reusability
  • Conducive to cooperative development
  • Hierarchical independence
  • easy maintenance
    • The layered architecture is conducive to layered deployment, expansion and maintenance.

2. Disadvantages

  • Performance drop
    • Data is transferred layer by layer between layers, and more transfers will lead to performance degradation.
  • Increased costs
    • The software needs to be abstracted first, then layered, and then developed, so the development cost may increase.

Five, presentation layer quality characteristics

1. Routine test items

The general test items include the common test items of the web, PC, and mobile presentation layers.

(1) Content display and check of required items

  • Is the name displayed correctly
  • Is it mandatory
  • Initial value and status check
  • Element Dependency Check
  • Information content correctness check
  • Whether the control type is displayed correctly
    • input, output, visual

(2) Button/link correctness check

  • After the button/link is clicked, the button should not be available until it returns
  • After clicking the button/link, it can normally jump to the corresponding interface or window for execution

(3) General inspection

  • Consistent style (consistent with similar interface visual style, fonts, and icons)
  • Title display (the interface title and the title displayed on the taskbar are correct)
  • Element position (element horizontal, vertical alignment)
  • Element size (reasonable element size, consistent row and column spacing)
  • Window characteristics (the interface is normal when switching, moving, resizing, and refreshing)

2. Web-based presentation layer test

(1) Browser portability test (important test points)

Mainly based on different types of browsers, different browser versions and resolutions, build a browser compatibility matrix for testing.
  • browser matrix

(2) Page performance test

  • Acceptability of response time

(3) Quality characteristics involved in the Web side

  • portability
  • ease of use
  • performance efficiency

3. PC-based presentation layer test

The PC end refers to the port that can be connected to the host computer in the network world. It is a computer-based interface system, which is different from the mobile phone interface system on the mobile end.

(1) Installation/uninstallation test

(2) Online upgrade test

(3) Network switching test

(4) Portability test

(5) Quality characteristics involved in the PC side

  • portability
  • ease of use
  • Feature

4. Mobile-based presentation layer testing

(1) Installation/uninstallation test

(2) Switching test (network switching, front-background switching)

(3) Online upgrade test

(4) Security testing (software permissions, application security)

(5) Performance test (startup time, CPU, memory, power consumption, traffic, power consumption, fluency)

(6) Portability test

  • Applicability of APP to different models

(7) Quality characteristics involved in the mobile terminal

  • portability
  • ease of use
  • performance efficiency
  • Feature
  • safety

5. Presentation layer testing strategy

1. Pay special attention to software usability

2. Principles of presentation layer test design and implementation

  • In the stage of software requirements analysis and user interface design, the responsibility of testers is to participate in peer reviews, understand software requirements and user interface requirements, as well as usage scenarios and user characteristics, and make suggestions from a testing perspective based on experience
  • After the user interface design phase, testers can provide subjective views on usability issues
  • In the test design phase, the responsibility of the tester is to design test cases according to the software requirements specification, user interface design, and software human-computer interaction friendliness and usability test criteria
  • In the test implementation phase, the responsibility of the tester is to execute the test cases
  • Due to version updates and changes in requirements, regression testing of the user interface may be involved
  • Before going online, user interface testing and functional testing are confirmed simultaneously to ensure consistency with the final version
  • In general, the presentation layer test is not a special test content, and can be mixed with other quality characteristic tests

Six, service layer quality characteristics

1. Functional test

  • Business functional testing (scenarios, abnormal scenarios)
  • Boundary testing (boundary testing based on input and output)
  • Different parameter combination tests for a single interface
  • Different service combination (service flow) test of multiple interfaces

2. Information Security

  • Whether sensitive information is encrypted
  • Authentication
  • injection
  • Information leakage, etc.

3. Performance test

  • Response time
  • throughput
  • concurrent number
  • Server resources (CPU, IO, memory, network)

Seven, service layer testing strategy

1. Service interface layer test design and implementation principles

  • The sooner the better, the sooner the bug is found, the lower the repair cost
  • Check the function and performance of the interface
  • For a system with separated front-end and back-end architectures, from a security perspective, only relying on the front-end for restrictions can no longer meet the security requirements of the system, and the back-end needs to verify from the interface layer; whether the front-end and back-end transmission data and other information is encrypted transmission needs to be verified
  • Interface testing is easier to automate testing

2. Principles of interface test quality assessment

  • Whether the business function coverage is complete
  • Whether business rule coverage is complete
  • Whether the parameter validation meets the requirements (boundary, business rules)
  • Whether the coverage of interface exception scenarios is complete
  • Whether the performance indicators meet the requirements
  • Whether the safety indicators meet the requirements

Eight, business logic layer quality characteristics

1. Functionality

(1) For function points

  • Test all functions with input conditions in the function module
  • Perform verification tests on all functions with output results in the function module
  • Test all functions with business rules in the function module
  • Test functions that have abnormal conditions or incorrect data processing in function modules
  • Verify whether all functions required by the requirements are met, emphasizing the integrity of business functions
  • Verify whether the function implementation meets the hidden requirements of user needs and system design, emphasizing the suitability of business functions

(2) For business flow

  • Test the external interface called in the process
  • Test the entry conditions in the process to verify its processing logic, error control, etc.
  • Verify the logical correctness of the main process, and then cover the whole process test of multiple process branches

2. Information Security

(1) Detect through the test method of source code audit

(2) Common code problems

  • encoding error
  • Coding Standards
  • repeat
  • the complexity
  • Explanation

Nine, business logic layer testing strategy

1. Business function testing strategy

(1) Analysis of test requirements

Three Techniques of Test Requirements Analysis
  • Requirements-Based Test Analysis
    • Set clear test objectives, test conditions and function points according to business requirements and system tests
  • Process-Based Test Analysis
    • Based on the user's continuous operation behavior (what to do in the first step and what to do in the second step) to realize the test related to the business process and system processing process
  • Experience Based Test Analysis
    • Analyze where the system may go wrong based on the tester's technology and experience, and find out the most error-prone function points or scenarios of the system for testing

(2) Test case design

  • Principles of business logic test case design
    • Principle of positive and negative ratio
      • Proportion of normal and abnormal test cases
    • Check whether the transaction can be processed correctly when the input or output is the maximum, minimum, and critical value
    • Use Case Quality Requirements
    • Use Case Granularity Requirements
      • Mainly based on unused test items, the test leader will formulate corresponding test granularity requirements
    • Classification of test cases
      • Classify test case levels based on the importance of business logic
  • Principles of Business Process Test Case Design Test Execution
    • Detect whether the normal business processing and process of the system can be executed correctly
    • Detect the coordinated operation of related systems under normal conditions
    • Detect whether the abnormal business processing and fault-tolerant processing of the system can be executed normally
    • When there is an abnormality in the detection related system, whether the system can correctly judge

(3) Use case review

  • detailed
  • comprehensive
  • unanimous

(4) Test Implementation Execution

  • Principles of Test Execution
    • Test the function before testing the process
    • First test the main process and then the side branch process
    • First test the process within the system, and then test the process between systems
    • Execute tests by priority and save execution records

2. Code audit test strategy

  • Four stages of source code audit service
    • Preparatory stage for code audit
      • Technicians and customer representatives conduct detailed exchanges on code service-related technologies, thereby determining the code audit plan (which codes to audit, how to audit, audit time, audit requirements, etc.)
    • Code Audit Implementation Phase
      • Generally, special code audit tools are used to scan to obtain preliminary information;
      • Then perform manual code review on the function points required by the customer, and manually analyze and confirm the scanning results of the source code;
      • Combine the results of automated scanning and manual review to generate a code review report for the test object, and finally submit it to the customer;
    • Retest implementation stage
      • After the code audit report is submitted and communicated, the developers will modify the problems found in the code review, and then the code review personnel will perform a regression check, and then submit a review report;
    • Results reporting stage
      • According to the results of the review and re-examination, sort out the results of the review output, and finally generate a code review report.

10. Data layer quality characteristics

  • database reliability
  • Database Performance Efficiency
  • database security
  • Data correctness and completeness
  • Database functionality
  • data portability

11. Data layer testing strategy

1. Database security policy

(1) Generally, testing techniques based on specifications are used, with manual functional inspection as the main form

(2) Check content

  • User and Password Management
  • Authorization and Audit Management
  • data encryption

2. Performance efficiency strategy

(1) Using TCP performance testing standards and specifications

(2) Currently commonly used performance test specifications

  • Performance test specification TCP-C for OLTP system
  • Performance Test Specification TCP-W for E-Commerce Applications
  • Performance Test Specification TCP-DS for Big Data Benchmarking (OLAP)

3. Database reliability strategy

(1) Online backup

(2) Fault recovery

4. Data correctness and integrity policy

(1) Adopt the test method based on specifications, mainly manual testing

(2) Test content

  • How the database stores data
  • data type and length
  • Data date and time fields
  • globalization
  • character set encoding

5. Data functional strategy

(1) Test point

  • installation and configuration
  • Database storage management
  • Schema Object Management
  • non-schema object management
  • interactive query tool
  • Performance testing and tuning
  • data migration tool
  • job management

6. Data Migration Strategy

(1) Principles of data migration testing

  • integrity principle
    • There is no missing piece of verification data
  • principle of correctness
    • Verification data is absolutely correct
  • Applicability principle
    • Migrating the old system of the data layer to the new system meets the specifications and requirements of the new system
  • Principle of effectiveness
    • It is necessary to clean the data that does not meet the specifications in the old system, and supplement the data content that meets the specifications if necessary
  • security principle
    • Security and confidentiality of sensitive data

(2) Use cases involved in data migration

  • Comparison of the number of records from old to new
  • Confirmation of the mapping relationship from old to new fields
  • Comparison of old to new field calculation methods
  • Whether the field length and precision from old to new are consistent
  • Old to new string transfer is prone to dirty data
  • Old to new null value and NULL handling
  • old to new date format change
  • Old to new new field default value problem
  • Old to new cleaning with normalization, where condition
  • From the old to the new system, the difference of the same field
  • Data comparison
  • Judging from the business point of view, make a process in the application program to verify whether the data is normal

(3) Test method for data migration

  • Technical verification
    • Data before and after migration is verified by the Migration Validator
  • static comparison
    • Perform direct comparisons of key business data between sources and destinations based on business needs
  • dynamic comparison
    • Select key business functions, operate simultaneously between the old and new systems, and verify whether the calculation results between the old and new systems are the same
  • Business Continuity Verification Test
    • Test the business using existing data

Guess you like

Origin blog.csdn.net/qq_46071165/article/details/127307390