阅读软件测试论文:Evaluation of a prioritization algorithm for test suite generation

版权声明:如需转载或引用,请注明出处。 https://blog.csdn.net/weixin_39278265/article/details/87274368

前言

在此阅读软件测试相关论文:Evaluation of a prioritization algorithm for test suite generation

并不是顶会论文,但是我从论文名字来看,值得出手一读(可以对测试用例生成,测试用例优化有个更好的理解)

1 基本信息

Begovic A, Holmelin V. Evaluation of a prioritization algorithm for test suite generation[J]. 2019.

作者在Google scholar上没有信息,故不做进一步说明描述。

2 文章内容

先介绍regression testing(回归测试):

Software is created to solve some defined problem. In this process incremental steps are usually taken towards the complete product. Once a piece of software has been written or changed, it has to be verified that the software is still functional and performs as expected. This verification is usually done through regression testing.

然后介绍软件测试用例优化的必要性和重要性:(科普性很强)

As the number of tests to run in a regression test suite increase, the longer time it takes to execute. Possibly undesirable long time for the developers of the software. Not all regression tests interact with the new or changed piece of software and are thus less useful from a testing perspective. If it is possible to know how to arrange the order of regression tests so that the tests interacting with the new software come first in the test suite, then the expected time until feedback to the developer that something is broken can be reduced. This reduction in time makes for a smoother work flow for the developer.

本文工作:

This thesis investigates a method for predicting which tests to run first given the changes made to the software.

进一步介绍:

The underlying idea of the method is to use historical test data and changes made to software in order to compute a correlation between tests and software. This idea is tested in a hypothesis test to determine if it has any predictive power. This choice of method is made as it is non-intrusive and does not requiring any instrumentation of the software but only knowledge of the historical test data.

Empirical Study环节:

Possible alternative methods are limited to what kind of data there exists and determined through data exploration. Methods for measuring performance and quality is determined through a combination of a literature survey and the desires of the stakeholder. The result indicates that this is a feasible method.

大意是:

每当软件的一部分被编写(written)或者改变(changed),软件就需要被验证是否依旧functional,并且performs as expected。这种验证(verification)通常通过回归测试来完成。

但是呢,随着回归测试用例集中的测试用例个数增多,验证所需要的执行时间也就越长。有可能不受欢迎的(undesirable)长时间的执行会让程序开发人员感到很困扰。 由于不是所有的回归测试都和新功能或者改变的软件代码相关,所以从测试的角度来说,这部分回归测试实际上就是没什么用的。如果我们能够知道怎么组织回归测试的测试顺序,使得和新的软件直接关联的测试排到测试用例集的最前面,那么预期的测试时间(即:到开发人员知道测试失败)就能缩短。这种时间上的减少能够给开发者带来一个更好的工作流程、模式。

本文给出一种在知道软件改变的情况下,对测试用例优先排序的预测方法。

这个方法的基础想法在于使用历史测试数据和软件代码改变来计算测试和软件之间的correlation(相关性)。这种方法在假设检验(hypothesis test)中被测试来确定其是否有任何的预测能力。这个方法的好处在于它是非入侵式的,且不需要任何软件插桩(instrumentation),只需要历史测试数据。

可能的代替方法局限在存在什么样的数据,并被数据探索(data exploration)决定。通过利益相关者的要求和文献调查的结合,决定衡量性能和质量的方法(就是说利益相关者要求和文献调查是判断评价标准)。结果表明这是一个可行方法。

3 几个QA

1)读了摘要,感觉和标题中的test suite generation没什么关联。想在文中找下test suite generation的介绍。
。。。
查找全文,只有标题有 generation,然后文中再无此词。
确实还是不是很靠谱哇。。。

2)想了解一下test prioritization 。

Test suite minimization, Test case selection, and Test case prioritization are three different approaches, that could be applied and combined in order to generate a more efficient test suite. Test suite minimization: removes all the redundant tests in the test suite. Test case selection: identifies the tests that are relevant to some set of recent changes. Test case prioritization: re-orders the tests to maximize early fault detection in the test suite [2].

如上,大意是:
Test suite minimization 指移除测试用例集中多余的测试。
Test case selection 指选择(识别,identifies )和软件近期改变的一些集合相关的测试。
Test case prioritization 指对测试进行重新排序以最大化测试集的缺陷检测。(突然想到了TSE 2019 A Theoretical and Empirical Analysis of Program Spectra Diagnosability

在这里插入图片描述

如上,这里讲的还是很详细的,给力。
大意就是: 一个公司以前都是 白天(几次)+晚上 运行测试用例,白天开发。后来呢,测试用例集规模越来越大,需要几个小时才能得到结果,那么白天不就废了吗。所以必须更加高效的运行测试用例。
他们想了一个办法,白天先运行最相关的一部分用例,以便第一时间把bug反馈给程序员,晚上呢,再跑剩下的大部分的测试用例。确实很机智哈。
但是呢,他们还想更加快,更加高效,所以需要automating自动化这个过程。

4 感想

1)原来test prioritization 即测试优先排序是为了节省发现bug的时间,从而使开发者开发过程更加平滑紧凑。
2)虽然想到了TSE 2019 A Theoretical and Empirical Analysis of Program Spectra Diagnosability,但是对其中内容已经基本忘记了,只得回去再翻看一下博客: https://blog.csdn.net/weixin_39278265/article/details/86777011
有点伤感,又有点释然。
伤感在于根本不记得以前读过的文章具体内容了。(可能当时就不是很理解)
释然在于,读这篇文章竟然还能想起来之前读过的文章,也不算白读。

总之,还得继续努力继续前进。

3)其实测试优化,测试优先排序还有很多工作,是个很大的方向。我这里就不多探究了,根本忙不过来。

猜你喜欢

转载自blog.csdn.net/weixin_39278265/article/details/87274368