Skip to content

mieclance.club

Menu
  • 关于站主
    • 我的知乎
    • 我的B站
    • 我的Github
    • 我的学术主页
    • Meet With Lance
  • 回到首页
  • CLUB用户中心
    • 本站用户注册
    • 本站论坛
    • 本站留言板
    • CLUB的知识星球
  • Lance写字的地方
    • Lance的学习笔记
    • Lance的文字天地
    • Lance的回忆录
Menu

EE308FZ — Slides Overview (ch17-19) Note 4

Posted on 2023年1月3日 by Lance Cai
  • ch17 Software testing strategies
  • ch18 Testing conventional application
  • ch19 Testing obiect-oriented application
  • Note4 本章对应例题


ch17 Software testing strategies

17-1 software error types

  • Algorithm error
  • Precision error 精度错误
  • Documentation error
  • Pressure error 压力错误
  • Throughput error 吞吐量错误
  • Recovery error 恢复错误
  • Timing error (coordination error) 计时错误
  • Hardware and system software errors

Verification: A series of activities to ensure that software correctly implements specified functions

验证 (verification) :确保软件正确实现特定功能的一系列活动

Validation: A series of activities that ensure that developed software is traceable to user requirements, in part to evaluate the usefulness or effectiveness of a software product

确认 (validation) :确保开发的软件可追溯到用户需求的一系 列活动,某种程度上是评价软件产品的有用或有效性

Testing is an important part of verification and validation activities.

螺旋模型:

17-3 Test Strategies for Conventional Software

17-3-1 Unit testing 单元测试

  • 接口
  • 局部数据结构
  • 独立路径
  • 错误处理路径
  • 边界条件

单元测试:指对软件中的最小可测试单元进行检查和验证。

Refers to the inspection and verification of the smallest testable unit in the software.

什么是测试用例?是为某个特殊目标而编制的一组测试输入 、执行条件以及预期结果,以便测试某个程序路径是否满足某个特定需求。

  1. Compile and run the program
  2. Static test
  3. Dynamic testing

17-3-2 Integration Testing 集成测试

  • 功能正确性 Functional correctness
  • 接口正确 Interface
  • 系统性能 System performance

先单元测试,后集成测试

  1. One-Step testing 一步到位
  2. Top-down testing 自顶向下
  3. Bottom-up testing 自底向上
  4. Combination approach (sanwich) 组合方法-三明治法

自顶向下测试

  1. 可能要编写很多桩程序 stub programs
  2. 主控模块错误可能发现得比较早

自底向上测试

  1. 要写驱动程序 driver module
  2. The main control module error is found relatively late

Top-down vs. bottom-up


17-3-3 Regression Testing 回归测试

A test strategy to ensure that the original function is normal when the program is modified.

  1. This approach takes a top-down approach to testing the modified module and its submodules;
  2. Then treat this part as a subsystem and test it bottom-up.


17-3-4 Smoke Testing 烟幕测试

Smoke testing is a commonly used integration testing method, designed as a time-critical project stepping mechanism, allowing software teams to evaluate their software projects frequently.

  1. Improve the quality of the final product
  2. Simplify error diagnosis and correction
  3. Easy to assess progress.

17-4 Integration Testing in an Object-Oriented Environment

  • Thread-based testing 基于线程的测试
    • 对响应系统的一个输入或事件所需的一组类进行集成
    • 每个线程单独地集成和测试
    • 应用回归测试以确保没有产生副作用
  • Use-based testing 基于使用的测试
    • 通过测试很少使用服务类的那些类(称为独立类)开始构造系统
    • 独立类测试完后,利用独立类测试下一层次的类 (称之为依赖类)
    • 继续依赖类的测试直到完成整个系统

17-5 Validation Testing 确认测试

确认测试开始于集成测试的结束。

Alpha Testing vs. Beta Testing

17-6 系统测试 System Testing

  • Recovery test
  • Safety test
  • Pressure test
  • Performance test
  • Deployment test 部署测试

系统测试实际上是对整个基于计算机的系统进行一系列不同考验的测试。虽然每个测试都有不同的目的,但所有测试都是为了验证系统成分已正确地集成在一起且完成了指派的功能。

17-7 The Art of Debugging (调试)


ch18 Testing conventional application

18-1 Software Testing Fundamentals (Testable software)

  • Operability 可操作性
  • Observability 可观察性
  • Controllability 可控制性
  • Decomposability 可分解性
  • Simplicity 简单性
  • Stability 稳定性
  • Understandability 易理解性

18-2 Internal and External Views of Testing


18-3 Black-Box & White-Box Testing

  • Black box testing
    • Tests are performed at the software interface to check the functional aspects of the system without knowing the internal structure of the software.
    • 不需要了解软件的内部结构
  • White-Box Testing
    • Examine the process details of the software, test the logical paths through the software and the collaboration between components.
    • 检查软件的过程细节

18-3-1 While-Box

  • 对模块的所有独立的执行路径至少测试一次;
  • 对所有的逻辑判定,取“真”与取“假”的两种情况都至少测试一次;
  • 在上下边界和可操作的范围内执行所有的循环;
  • 测试内部数据结构的有效性。

18-3-2 Basis Path Testing 基本路径测试

2022年考点

Based on control flow graph

流图 Flow graph (重点)

注意区分Flow Graph(流图) 和 Flowchart(流程图)

域:由边和结点限定的区间,没有包围的就统一算成1个

简单题:

  1. 计算独立路径(重点):
  2. 计算环路复杂度(重点):
复合题
  • 根据代码/设计框图,画出流图
  • 计算环路复杂度
  • 确定独立路径
  • 根据独立路径,写出测试用例集

重要例题:


18-4 Control Structure Testing 控制结构测试

  • Conditional test
    • 语句测试
    • 分支测试
  • Data flow test
  • Loop test

保证每条语句至少执行一次:

18-4-1 Conditional test

18-4-2 Data flow test

  • 1 数据定义点
  • 2 数据使用点
    • 2-1 计算性使用 C-USE
    • 2-2 判定性使用 P-USE

例子:变量i的定义与使用:

1-15这组不能用,因为a不能同时大于30,又小于b(因为b小于30)

18-4-3 Loop test 循环测试


18-5 Black-box test 黑盒测试

  • 等价划分 Equivalent division
    • 等价类是指某个输入域的子集合
    • 有效等价类 equivalence class
    • 无效等价类
  • 边界值分析 Boundary value analysis
    • 应当选取正好等于,刚刚大于,或刚刚小于边界的值做为测试数据

18-5-1 等价类划分

18-5-2 边界值分析

黑盒测试中:预估错误的数量


ch19 Testing obiect-oriented application

19.3 Object-Oriented Testing Strategies

经典软件测试策略从“小范围”开始,并逐步过渡到“软件整体”。

用软件测试的行话来说,就是先从单元测试开始, 然后过渡到集成测试,并以确认测试和系统测试结束。

最小的可测试单元不再是单独的模块,二是封装了的类 an encapsulated class

19.4 Object-Oriented Testing Methods


Note4 本章对应例题

1、语句测试:

2、分支测试:

3、条件测试:

最后的最后,祝你好运!——Lance于2023/01/03

发表回复 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

HANLIN.CAI.2021@MUMAIL.IE

注册
  • InessaSnki 在 CS240FZ Note 4 | Operating Systems & Communications & Concurrency 4coursework writing uk co......
  • Lance Cai 在 EE304FZ Statistics and Probability|Note 1祝大家考试顺利! Everything will......
  • Lance Cai 在 EE308FZ — Slides Overview (l1-l6) Note 1更新于2023年01月02号,大三上学期的各科历......
  • Lance Cai 在 Cambridge暑研回忆录(2022.06—2022.10)以上为2022年暑研总结,「大二回忆录」,在写了......
  • 613-3 在 Lance的留言板打卡打卡
  • Laurent 在 Lance的留言板日常催更催更
  • Lance Cai 在 Lance的留言板已添加
  • Claire 在 Lance的留言板请求一个友链~

最新 | 活动 | 热门
  • Lance Cai的头像
    Lance Cai
    活跃于 11小时, 42分钟前
  • Laurent的头像
    Laurent
    活跃于 2个月前
  • Lance的头像
    Lance
    活跃于 2个月前
  • Dupree的头像
    Dupree
    活跃于 2个月前
  • Knight的头像
    Knight
    活跃于 4个月, 3周前

近期文章

  • EE302 Note (2.20) ADC and Comparator (重点3)
  • EE302 Note (3.10-3.30) Asynchronous and Synchronous(重点2)
  • EE302 Note (5.10) Memory and IO interfacing(重点1)
  • EE304FZ Statistics and Probability|Note 2
  • EE304FZ Statistics and Probability|Note 1
  • EE308FZ — Slides Overview (ch22) Note 5
2023年 3月
日 一 二 三 四 五 六
 1234
567891011
12131415161718
19202122232425
262728293031  
« 1月    

输入课程代码,获取Lance的笔记

© 2023 mieclance.club | Powered by Superbs Personal Blog theme