成绩构成

image-20230512141308113

课程大纲

image-20230512141310304

第4-5周,6-7,重要,8非常重要

参考文献

image-20230512141312241

软件测试Ron Patton, Software Testing(2th Edition)

image-20230512141314251

1. The basic concepts and theories of testing

Software testing

image-20230512141316357

Test Cycle

image-20230512141318038

测试用例不断更新

测试分三个维度

image-20230512141319787

grey box between black and white box

unit - white box system - black box

Fault, Error & Failure

image-20230512141322743

image-20230512141324565

image-20230512141326280

image-20230512141328044

2. Principle of Testing

Source of Problems:

测试流程

image-20230512141330414

image-20230512141332158

Goal of a software tester:

BRD - Business requirement document MRD - Market requirement document PRD - Program requirement document

Testing - 找 Debugging - 修 Verification - 文档 Validation - 是不是用户想要的

axiom公理

image-20230512141334454

3. White Box

Examine the Design Document & Code static

Control Flow

控制流:

数据流:

控制流

Exampleimage-20230512141336846

Basic Path Testing

cyclomatic complexity 圈复杂度->图越复杂->程序越复杂

image-20230512141339133

image-20230512141342683

圈复杂度计算

image-20230512141345327

image-20230512141348378

V(G)= the number of Independent path

Not complete Testing:

Condition testing

Logical conditions

Branch testing

for a compound condition C, test true and false branches of C and every simple condition of C

e.g., for C = (a>b) AND (c<d) test:

image-20230512141352042

Domain testing

for an expression E1 rel-op E2, test for E1 ≧ ≦ = < > ≠ E2

 

Coverage

path coverage 最大

P1 ≤ P2 ≤ Pu

数据流(考试无关)

Definition

A location where a value for a variable is stored into memory

def and use

image-20230512141356107

image-20230512141358275

image-20230512141400415

image-20230512141402751

image-20230512141404860

 

image-20220926144846685

image-20230512141416820

数据流必须全拆,控制流有些可不拆(并行判断要拆)

4. Black Box

Test case:

  1. Reduce Testcase
  2. Maintain Test Performance
  3. Test Coverage

4.1 Random Testing

Adaptive Random Testing 选点有规则且与前几个用例越来越远

4.2 Equivalence Partitioning

Identify input equivalence classes注意边界值:

4.3 Boundary Value Analysis

Example strategy as extension of equivalence partitioning:

4.4 Cause Effect Analysis

因果分析

image-20230512141431907

RT ART - Reduce test case EP - Reduce test case & maintain test performance BVA - Maintain test performance & Coverage Cause Effect - Reduce Test case

5. Integration Test

driver - 用于集成测试

Important traits of a good UI

Accessibility Testing for disabled

6. Mutation Testing

变异测试

How good are my tests

Coverage = 有多少代码能够测到的 Key idea = 从早期和常见的错误中学习,防止它们再次发生,(如拼写错误)

Mutation testing

Mutation testing terms

Finite automata

image-20230512141434798

7. Mid-Review

Bug

Requirement——black box Design Code——white box

7.1 测的部分分类

7.1.1 Input Domain Testing Techniques

7.1.2 Code-Base Testing Techniques

7.1.3 Fault-Based Testing Techniques

7.1.4 Model-Based Testing Techniques

7.2 测的区域分类

7.2.1 Unit Testing

White&Black box

Unit

7.2.2 Integration Testing

测interface

Approaches

Test Function

7.2.3 System Testing

Functional

Non-Functional

8. Maintain

image-20230512141438400

考试相关