Regression Tests

Quiz about ML (NUS) In machine learning, underfitting is the situation in which the learned model is not a good approximation to the true underlying distribution in the training data. Which of the following approaches reduces the chances of underfitting? A.Using ensemble me. 阅读详情
Black Box Software Testing
Spring 2005
REGRESSION TESTING    
by
Cem Kaner, J.D., Ph.D.
Professor of Software Engineering
Florida Institute of Technology
and
James Bach
Principal, Satisfice Inc.
 
      
Why use regression tests?
• Manage risks of change:
(a) a bug fix didn’t fix the bug or
(b) the fix (or other change) had a side effect or
(c) error in the build process
(d) faulty localization
• Conform to expectations of clients or regulators
• Conform to a misguided notion of “scientific” practice
– Replicability is an important attribute of experiments because it lets us:
• cross-check each other’s work
• obtain a result as needed for application, and
• re-examine an experiment in the face of a new theory
– Replicability is important.
• Repetition may or may not have much value.
• Conform to a faulty analogy to manufacturing
– Software quality is not about making many identical instances of the same widget, within the tightest achievable tolerances
Managing risks of change
(a)   a bug fix didn’t fix the bug
– Bug regression (Show a bug was not fixed)
(b) the fix (or other change) had a side effect
– Old fix regression (Show an old bug fix was broken) Programmers refactor their code to reduce this risk.
– General functional regression (Show that a change caused a working area to break.)
– Unit-level regression (Discover changes while fixing the bugs)
(c) error in the build process
– Build verification testing (Smoke tests have little power but much breadth. The question is whether the build is fit to test). Programmers use source and version control to reduce this risk.
(d) faulty localization
– Localization testing (Determine whether a product has been properly adapted to the language and culture of a specific locale or market.)
Repeat testing after changes
       The essence of regression testing is repetition of tests after changes. But if you scratch the surface, you find several fundamentally different visions.
– Procedural: Run the same tests again in the same ways
• Delegation of labor: Welcome to the factory
• Reuse good tests: Two visions of power (of tests)
• Acts of faith: We do it because (… it’s scientific…?)
– Economical: Repeat tests because (when, if) they’re cheap
– Support refactoring: Help the programmer discover implications of her code changes.
– Risk-oriented: Expose errors caused by change
Automating GUI regression
Automated GUI regression is classic procedural regression.
      
       And the most commonly discussed approach to test automation :
 
– create a test case
– run it and inspect the output
– if the program fails, report a bug and try again later
– if the program passes the test, save the resulting outputs
– in future tests, run the program and compare the output to the saved results. Report an exception whenever the current output and the saved output don’t match.
Procedural regression:
Reusing good tests
• It makes sense to reuse old tests that were carefully crafted.
• Does that mean that regression tests are repetitions of good tests?
– Any test, designed from any other perspective, can be turned into a regression test.
       Just document and / or automate it
              And reuse it
• But what if you create good tests?
– Should they become regression tests?
Procedural regression:
Reusing good tests
• The key design issue for regression tests as regression tests is the expectation of reusability.
• Long term reusability requires maintainability
– Does that imply simplicity?
• If so, does that imply that we should prefer smoke tests to scenario tests? (Some people think so…)
• But complex tests that use a lot of features of the program and enter a lot of data are the ones that might be the most beneficial to automate because this saves so much data entry time and spares use the nuisance of data entry mistakes accidentally made by the tester who is trying to perform the test by hand.
– I think the need for maintainability implies a need for architectural support for strong tests, not a push for weak ones.
Reusing good tests
• If power refers to the ability of a test to detect a bug if it is there, then a test can be powerful even if the program has passed it so often that we are almost certain that bug will never appear.
• On the other hand,
– The probability of finding a bug with a regression test that the program has already passed is very low
– Estimates from LAWST:
       About 15% of the bugs found in a project are found by its regression tests. (Obviously, there’s a lot of variation.)
       However, companies spend as much as 80% of their testing budget on regression testing (development and, especially, maintenance of the tests) and some of these have very low bug find percentages.
• A theoretically less powerful test can be more likely to detect bugs in the same area as the theoretically more powerful test, if you’ve already run the more powerful test (but not the weaker one) and the program consistently passes it
An analogy: Clearing mines
Totally repeatable tests won’t clear the minefield
Variable Tests are Often More Effective
Automated GUI regression
• Look back at the minefield analogy
• Are you convinced that variable tests will find more bugs under all circumstances?
– If so, why would people do repeated tests?
 
 
 
Repeat testing after changes
       The essence of regression testing is repetition of tests after changes. But if you scratch the surface, you find several fundamentally different visions.
– Procedural: Run the same tests again in the same ways
• Delegation of labor: Welcome to the factory
• Reuse good tests: Two visions of power (of tests)
• Acts of faith: We do it because (… it’s scientific…?)
– Economical: Repeat tests because (when, if) they’re cheap
– Support refactoring: Help the programmer discover implications of her code changes.
– Risk-oriented: Expose errors caused by change
The economic perspective
• Cost of reuse versus cost of generation of new tests
– What is the maintenance cost compared to creation cost?
– Will we have the resources available for new tests in the event of
• Patch releases?
• Localization releases?
• Benefit of reused test versus benefit of new tests
– High power, saved data entry time, elimination of user error, performance benchmarking, etc.
• Opportunity cost of working on variants of old tests instead of new tests that
– Focus on new areas of the program or
– Focus on vital areas of the program.
• We might reuse tests not because we think they’re great
– but because it might be better to use weak tests than none, when the cost of creating better tests exceeds the benefit.
Repeat testing after changes
       The essence of regression testing is repetition of tests after changes. But if you scratch the surface, you find several fundamentally different visions.
– Procedural: Run the same tests again in the same ways
• Delegation of labor: Welcome to the factory
• Reuse good tests: Two visions of power (of tests)
• Acts of faith: We do it because (… it’s scientific…?)
– Economical: Repeat tests because (when, if) they’re cheap
– Support refactoring: Help the programmer discover implications of her code changes.
– Risk-oriented: Expose errors caused by change
Refactoring support:
Change detectors
• The programmer modifies working code in order to improve its quality (such as maintainability, performance, etc.)
• The program should pass the same behavioral tests before and after the change(s).
• Unit test libraries make refactoring much easier
– Common case: test-driven development using glass-box testing tools like JUnit, httpUnit, and FIT to create the low-level regression tests.
– The intent of the tests is to exercise every function in interesting ways, so that when the programmer refactors code, she can quickly see
• what would break if she made a change to a given variable, data item or function or
• what she did break by making the change.
Refactoring support: Change detectors
There are enormous practical differences between system-level black-box regression testing and unit-level (or integration-level) glass-box regression testing
– In the unit test situation, the programmer (not an independent tester) writes the tests, typically before she writes the code. The tests focuses the programming, yielding better code in the first place.
– In the unit test case, when the programmer’s change has a side-effect, (under XP) she immediately discovers and fixes it. There is no communication cost. You don't have (as in black box testing) a tester who discovers a bug, replicates it, reports it, and then a project manager who reads the report, maybe a triage team who study the bug and agree it should be fixed, a programmer who has to read the report, troubleshoot the problem, fix it, file the fix, a tester who has to retest the bug to determine that the fix really fixed the problem and then close the bug. All labor-hours considered, this can easily cost 4 hours of processing time, compared to a few minutes to fix a bug discovered at the unit level.
– In the black box case, test case maintenance costs are high, partially because the same broken area of code might be be involved in dozens of system level tests. And partially because it takes a while for the black box tester to understand the implications of the code changes (which he doesn't see). The programmer fixes tests that are directly tied to the changes she makes, and she sees the tests break as soon as she makes the change, which helps her reappraise whether the change she is making is reasonable.
 
– Fowler, Refactoring; Astels, Test-Driven Development; Link, Unit Testing in Java; Rainsberger JUNIT Recipes
Repeat testing after changes
       The essence of regression testing is repetition of tests after changes. But if you scratch the surface, you find several fundamentally different visions.
– Procedural: Run the same tests again in the same ways
• Delegation of labor: Welcome to the factory
• Reuse good tests: Two visions of power (of tests)
• Acts of faith: We do it because (… it’s scientific…?)
– Economical: Repeat tests because (when, if) they’re cheap
– Support refactoring: Help the programmer discover implications of her code changes.
– Risk-oriented: Expose errors caused by change
Risk-oriented regression
In this approach, we might re-use old tests or create new ones. Often, we retest an area or function with tests of increasing power (perhaps by combining them with other functions). The focus of the technique is on testing for side effects of change, not the inventory of old tests.
Here are examples of a few common ways to test a program more harshly while retesting in the same area.
– Do more iterations (one test hits the same function many times).
– Do more combinations (interactions among variables, including the function under test's variables).
– Do more things (sequences of functions that include the function under test).
– Methodically cover the code (all N-length sequences that include the function under test; all N-wide combinations that include the function under test's variables and variables that are expected to interact with or constrain or be constrained by the function under test).
– Look for specific errors (such as similar products’ problems) that involve the function under test.
– Try other types of tests, such as scenarios, that involve the function under test.
– Try to break it (take a perverse view, get creative).
» Thanks to Doug Hoffman for a draft of this list
Summing up
• Regression testing as a technique:
– It primarily specifies an activity
• Retest after changes
– It only weakly specifies a risk
• Changes break things
• Regulators might reject things that don’t look tightly controlled
– It specifies a weak oracle
• Whatever happened last time
– That won’t always be correct
– And it doesn’t help when you first design and run the test
– It doesn’t address coverage or the characteristics of the tester.
• The details of test design come from some other underlying technique.
Summing up
• Regression tests have mixed costs and benefits
– Many regulators and process inspectors like and expect this approach
– The tests exist already (no need for new design, or new implementation, but the maintenance cost can be enormous)
– Because we are investing in re-use, sometimes we can afford to craft each test carefully, making it more likely to be valuable later.
– This is the dominant paradigm for automated testing, so it’s relatively easy to justify and there are lots of commercial tools.
– These tests are often overrated. They lose their power to find bugs over time (the bug find curve for regression has been compared to an immunization curve—Boris Beizer nicknamed it the Pesticide Paradox)
– Repeating the same tests means not looking for the bugs that can be found by other tests.
• You might get the same benefits, with more creativity, in a less structured approach to regression. But that might cost more.
• Much regression testing can / should be done, more efficiently and effectively, as unit tests rather than black box system tests.
Readings
REGRESSION TESTING IN GENERAL
• Marick, How Many Bugs Do Regression Tests Find?
• Beck, Test-Driven Development By Example
GUI-LEVEL AUTOMATED REGRESSION TESTING
• Chris Agruss, Automating Software Installation Testing
• James Bach, Test Automation Snake Oil
• Hans Buwalda, Testing Using Action Words
• Hans Buwalda, Automated testing with Action Words: Abandoning Record & Playback
• Elisabeth Hendrickson, The Difference between Test Automation Failure and Success 
• Doug Hoffman, Test Automation course notes
• John Kent, Advanced Automated Testing Architectures
• Bret Pettichord, Success with Test Automation
• Bret Pettichord, Seven Steps to Test Automation Success
• Keith Zambelich, Totally Data-Driven Automated Testing
 
Zephyr BSP: 45-BSP Regression Test 本文聚焦BSP回归测试,厘清Build、Functional与Regression测试差异,强调其核心为对历史功能的持续验证。提出BSP Regression 11层测试树与“可重复”第一原则,倡导使用稳定Test Case ID追踪结果。深入探讨驱动级回归、间接破坏发现价值及全量/定向回归取舍,推荐两级流程(Fast + Full),并涵盖Regression Matrix、Git Bisect、测试目录设计等实践,助力BSP从“能用”迈向“可长期维护”。 阅读详情

相关推荐

Gaussian Processes for Regression

参考:http://www.robots.ox.ac.uk/~mebden/reports/GPtutorial.pdf

chlele0105的专栏 1万+

十分钟理解回归测试(Regression Testing)

回归测试是一个系统的质量控制过程,用于验证(比如你在家中安装了新的空调系统,发现虽然新的空调系统可以按预期工作,但是本来亮的等却不亮了)。其主要目标是确保旨在改进的修改不会破坏软件的既定性能和可靠性。回归测试是软件开发过程质量控制措施的一个重要方面。每次进行更改时,都会将其付诸实践,以确保它不会无意中导致任何功能或性能问题。

myh919的博客 613

MIMO技术入门

MIMO:多天线技术,发射端和接收端有多个天线(注意:并不是指多个天线板,而是多套振子,每一套是一个独立的天线。) 4G:2、8天线 5G:4、64天线(64T64R) 手机也是多天线 MIMO实现效果的分类: 1)空间分集 。2)空间复用。3)波束赋形。 空间分集(space diversity) 作用:提升接收质量 利用多个天线发射或者接收一个数据流,避免单个信道衰落对整个链路的影响。(比如你的耳机坏了一只并不影响另一只) 空间复用(space multiplexing) 作用:提升速率 利

About1129的博客 2876

回归测试

        回归测试: (regression   testing): 回归测试有两类:用例回归和错误回归;用例回归是过一段时间以后再回头对以前使用过的用例在重新进行测试,看看会重新发现问题。错误回归,就是在新版本中,对以前版本中出现并修复的缺陷进行再次验证,并以缺陷为核心,对相关修改的部分进行测试的方法。    ...

Hern(宋兆恒) 4425

避坑指南:汇川SV660N配合SOEM时,PDO映射与CiA402状态机那些容易出错的地方

本文深入解析汇川SV660N伺服驱动与SOEM主站在PDO动态映射和CiA402状态机切换中的常见问题,提供实战代码和调试技巧。重点解决PDO配置时序、状态机转换同步等关键难点,帮助工程师避免典型错误,实现稳定通信与控制。

weixin_30653023的博客 498

【亲测有效】OpenClaw Gateway 出现 “(no output)“ 卡死问题完整解决指南:从手动重启到 systemd Watchdog 自动恢复

最近在使用 OpenClaw(自托管 AI 助手框架,前身 Clawdbot/Moltbot)时,遇到了一个非常常见的顽疾:TUI(终端界面)或 Telegram 等通道经常显示 "(no output)",消息发出去后机器人完全没反应,看起来像是卡死了。

hampeter的博客 8609

树莓派(Debian/Ubuntu)编译安装gromacs2016.5

1.前言时常看到大家在追求更高的计算能力,计划着去买新的计算机,这里算是娱乐吧,尝试一下在树莓派上安装gromacs2016.5。同时本文也适用与64位的Debian/Ubuntu系统下gromacs的编译安装在树莓派这样的四核arm A53 的硬件上安装显然不会有什么性能,但是可以测试一下集群的配置,不过目前为止我只有一部树莓派,终极目标是搭建一个三个节点的集群,目前还不确定是买三个树莓派还是三...

weixin_38412284的博客 1396

GD32单片机引脚复用指南:如何让JTAG接口的PA15/PB3发挥第二功能?

本文详细介绍了GD32F103Cx系列单片机如何通过AFIO模块进行引脚复用,特别是将默认用于JTAG调试接口的PA15、PB3等引脚释放为普通IO或复用功能引脚。文章从原理出发,结合代码实践,讲解了如何配置调试端口重映射,将JTAG引脚安全地转换为GPIO或定时器通道,并提供了常见问题排查与最佳实践,帮助开发者高效利用有限的引脚资源。

nept的博客 810

回归测试(Regression Test)

解压 语法:tar [主选项+辅选项] 文件或者目录使用该命令时,主选项是必须要有的,它告诉tar要做什么事情,辅选项是辅助使用的,可以选用。主选项:c 创建新的档案文件。如果用户想备份一个目录或是一些文件,就要选择这个选项。相当于打包。x 从档案文件中释放文件。相当于拆包。t 列出档案文件的内容,查看已经备份了哪些文件。特别注意,在参数的下达中, c/x/t 仅能存在一个!不可同时存在!因为不可

limanjihe的专栏 1万+

保姆级教程:用YOLOv5s训练PCB缺陷检测模型(附北大公开数据集)

本文提供了一份基于YOLOv5s的PCB缺陷检测模型从零开始的完整实战教程。详细解析了如何使用北大公开数据集,涵盖环境搭建、数据处理、模型训练、性能评估及优化部署全流程,并针对工业场景中常见的类别不均衡问题给出了具体解决方案,旨在帮助开发者快速构建高精度的自动化质检系统。

weixin_28285943的博客 308

YOLO格式数据集划分

YOLO格式的数据集划分 标题标签格式txt import os import cv2 import random from PIL import Image # os.makedirs('labels_train') # os.makedirs('labels_val') img_train_path ='./img_train/' #图片训练集保存路径 img_val_path = './img_val/' #图片验证集保存路径 labels_train_path = './labels_t

weixin_51154380的博客 3308

Statsmodels 回归诊断与设定检验(Regression Diagnostics and Specification Tests)实战指南

Statsmodels 在统计学与计量经济学建模中扮演核心角色,而 `statsmodels.stats.diagnostic` 及其姊妹模块(`stattools`、`outliers_influence`、`_adnorm`、`_lilliefors`)为回归模型提供了体系化的"体检"工具。本文以仓库文档 [docs/source/diagnostic.rst](https://link.gi

gitblog_01132的博客 255

【AI智能体】Coze 数据库从使用到实战操作详解

Coze 数据库使用到实战详解

congge 5915

揭示变化交互误差的回归测试-Regression Tests to Expose Change Interaction Errors

Regression Tests to Expose Change Interaction ErrorsBackgroundProblemMotivating ExampleDefinitionExample For Explanation Böhme M, Oliveira B C S, Roychoudhury A. Regression tests to expose change inte...

wcventure的博客 370

SonarQube 完整手册(2026 最新)

摘要: SonarQube是一款静态代码分析(SAST)平台,支持20+语言(如Java/Go/Python),提供Bug、漏洞、代码异味等检测,集成DevOps流水线。其架构包含服务端、扫描器和SonarLint插件。2026年四大版本:免费社区版(基础功能)、开发者版(多分支/PR分析)、企业版(合规治理)、数据中心版(高可用集群)。核心功能包括质量门禁(QualityGate)、密钥泄露检测及六大质量指标。部署推荐Docker+PostgreSQL,扫描支持Maven/CLI方式。

SmallBull的博客 670

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

Lemonade App Regression Tests 源码级解析:零依赖渲染层回归守卫的运行机制与实战指南

Lemonade 仓库在 [test/app/app-regression](https://link.gitcode.com/i/2d6bb12436fa91bf926ab6362b3d5b06) 目录下维护了一套面向桌面端渲染层的应用回归测试(App Regression Tests)。它以"零依赖、纯 Node、源码级守卫"为设计原则,专门保护 Model Manager、Model Opt

gitblog_01186的博客 1059

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

zstd 回归测试(Regression tests)完全指南:从 nightly 守护到 results.csv 重建

zstd 的回归测试框架通过固定数据集、固定压缩配置与多种压缩 API 组合,持续监控压缩后的总字节数,防止任何改动悄悄劣化压缩率。本文以 [src/third_party/zstandard/zstd/tests/regression/README.md](https://link.gitcode.com/i/92181eab9304ae2e09d1d950614ca13d) 为核心,结合框架源

gitblog_00697的博客 12

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

Stride.Graphics.Tests 跨平台图形回归测试工程指南

Stride(原 Xenko)的图形渲染引擎包含大量依赖具体 GPU 与渲染后端的测试用例,本文以 [Stride.Graphics.Tests/README.md](https://link.gitcode.com/i/f0f2bda0b329f9f311985ef17415ab8c) 为核心,结合 [Stride.Graphics.Tests.csproj](https://link.gitc

gitblog_00188的博客 400

别再混着聊评测了!一张两轴地图,把 LangSmith 评测讲透

LangSmith 官方把评测拆成两轴:何时评对应六种评测类型,怎么评对应五种评估器实现。 本文先铺时间轴,离线四类型加在线两类型,再铺方法轴,五类实现与配置位置。 读完你能对任何评测需求先定类型再选实现,混轴讨论的糊涂账一次理清。

深耕人工智能底层逻辑,专注大模型架构、分布式训练与推理优化。在这里,不贩卖焦虑,只拆解硬核技术。从Transformer的数学之美到Agent的工程落地,用代码和论文说话,记录在AI浪潮中探索技术边界的每一步的专栏 65

ubuntu 12.04 X64 编译安装 clearsilver 时错误

照文档提示安装clearsilver-0.10.5 ./confugure && make sudo make install 发现/usr/local/lib 下只有 -rw-r--r--  1 root root    292420  5月 20 16:26 libneo_cgi.a -rw-r--r--  1 root root    597162  5月 20 16:

snake_baoby的专栏 1324

【亲测免费】 PySR 开源项目教程

PySR 项目的目录结构如下: ``` PySR/ ├── Dockerfile ├── LICENSE ├── README.md ├── examples/ │ ├── pysr_demo.ipynb │ └── ... ├── pysr/ │ ├── __init__.py │ ├── core.py │ └── ... ├── setup.py └── tests/

gitblog_01092的博客 644

告别高DPI模糊:ExplorerPatcher的DPI适配快速指南

把设置窗口从1080p主屏拖到4K副屏,字体瞬间糊成一团,拖回来又恢复锐利——这就是高DPI模糊的典型症状。ExplorerPatcher 通过完整的每显示器 DPI 适配来根治它,本文给出从上手到进阶的完整路径。 ## 5步装好并开始用 1. 下载最新版的 `ep_setup.exe`(Intel/AMD)或 `ep_setup_arm64.exe`(骁龙),来源是项目的 Releases

gitblog_00572的博客 187

企业级视觉回归测试:cypress-visual-regression在CI/CD流程中的集成指南

cypress-visual-regression是一款为Cypress提供强大视觉回归测试能力的插件,能够帮助企业在CI/CD流程中高效实现视觉一致性检查,确保前端界面在迭代过程中保持预期的视觉效果。 ## 快速入门:安装与基础配置 ### 一键安装步骤 通过npm即可快速安装cypress-visual-regression插件: ```nodejs npm install cypress

gitblog_00711的博客 279

从基础到进阶:cypress-visual-regression API全解析与示例演示

cypress-visual-regression是一款为Cypress添加视觉回归测试能力的插件,它能够帮助开发者轻松实现UI界面的自动化视觉测试,通过对比基线截图与实际截图,快速发现界面变化。无论是前端组件库迭代还是大型应用UI重构,这款工具都能为你提供可靠的视觉保障。 ## 为什么选择cypress-visual-regression? 视觉回归测试是前端质量保障的重要环节,但传统测试方

gitblog_00181的博客 943

cypress-visual-regression性能优化:大幅提升测试速度的10个实用技巧

cypress-visual-regression是一款为Cypress添加视觉回归测试能力的工具,通过对比UI截图来确保界面一致性。在实际项目中,随着测试用例增多,视觉回归测试可能会变得缓慢。本文将分享10个实用技巧,帮助你显著提升cypress-visual-regression的测试速度,让视觉测试更高效。 ## 1. 精准设置错误阈值,减少不必要对比 合理配置错误阈值是提升测试效率的基

gitblog_01156的博客 1050
上一篇: Programming By Intention/Intro to JUnit
swverification
博客等级 码龄20年 0粉丝 4原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值