利用产品-测试代码共同演化预测测试用例更新状态
发布时间:2025-06-28 02:51
软件项目中的代码普遍存在缺陷,这些缺陷可能会造成巨大的经济损失,甚至危及人类生命。软件开发人员一般通过编写测试用例,即单元测试,的方式来确保产品程序按预期的需求运行。尽管一般来说,测试代码被认为是没有缺陷的,但实际上并非如此。例如,当产品代码被更改时,若测试开发者未能及时更新测试代码,就会引发错误。在这种情况下,我们称这些测试代码是。直观地讲,测试代码和被测试的产品代码应该共同演化(Co-Evolution),即两者应该同时被修改、更新,否则,旧的测试代码可能会在新的产品代码逻辑中运行失败,造成开发人员的困扰和计算资源、时间等的浪费。先前的研究[21]指出,共同演化是耗费时间和资源的。也因此,在实际项目过程中,开发者很难维护产品和测试代码的共同演化。文献[8]指出,与编写产品代码相比,开发人员通常需要花费更多的时间阅读并理解测试用例的代码,而他们往往倾向于高估自己在维护测试代码时所花的时间。总的来说,尽管维护测试用例是很重要的工作,但在实际软件项目中经常没有得到重视。现有研究较少关注过时的测试用例的问题。已有的关于“产品-测试共同演化”的研究工作主要关注的是产品代码和测试代码的关联规则(...
【文章页数】:67 页
【学位级别】:硕士
【文章目录】:
摘要
ABSTRACT
Chapter 1 Introduction
Chapter 2 Preliminaries
2.1 Java Ecosystem
2.1.1 Integrated Development Environment
2.1.2 Project Management
2.1.3 Apache Software Foundation
2.2 Software Testing
2.3 JUnit Framework
2.4 Abstract Syntax Tree
Chapter 3 Empirical Study
3.1 Motivating Examples
3.1.1 Challenges in Test Update Prediction
3.1.2 Application Scenario
3.2 Data Source
3.3 Production-Test Co-Evolution
3.3.1 Co-Evolution in Single Commit
3.3.2 Cross-Commits Co-Evolution
3.3.3 Reasons for Co-Evolution
Chapter 4 Workflow Design
4.1 Overview
4.2 Matcher
4.3 Feature Extractor
4.3.1 Code Difference
4.3.2 Syntax Trees Traversal
4.3.3 Feature Extraction
4.4 Classifier
Chapter 5 Experiments
5.1 Setup
5.2 Metrics
5.2.1 Multiclass Metrics
5.3 Binary Classification v.s. Multiclass Classification
5.4 Balanced v.s. Imbalanced Training Data
5.5 Comparison of Classifiers
5.6 Contribution of Features
Chapter 6 Related Work
6.1 Source-Test Co-Evolution
6.2 Empirical Studies
6.3 Software Defect Prediction
6.4 Regression Testing
6.5 Test Repair on Java
Conclusions
References
Acknowledgements
本文编号:4054305
【文章页数】:67 页
【学位级别】:硕士
【文章目录】:
摘要
ABSTRACT
Chapter 1 Introduction
Chapter 2 Preliminaries
2.1 Java Ecosystem
2.1.1 Integrated Development Environment
2.1.2 Project Management
2.1.3 Apache Software Foundation
2.2 Software Testing
2.3 JUnit Framework
2.4 Abstract Syntax Tree
Chapter 3 Empirical Study
3.1 Motivating Examples
3.1.1 Challenges in Test Update Prediction
3.1.2 Application Scenario
3.2 Data Source
3.3 Production-Test Co-Evolution
3.3.1 Co-Evolution in Single Commit
3.3.2 Cross-Commits Co-Evolution
3.3.3 Reasons for Co-Evolution
Chapter 4 Workflow Design
4.1 Overview
4.2 Matcher
4.3 Feature Extractor
4.3.1 Code Difference
4.3.2 Syntax Trees Traversal
4.3.3 Feature Extraction
4.4 Classifier
Chapter 5 Experiments
5.1 Setup
5.2 Metrics
5.2.1 Multiclass Metrics
5.3 Binary Classification v.s. Multiclass Classification
5.4 Balanced v.s. Imbalanced Training Data
5.5 Comparison of Classifiers
5.6 Contribution of Features
Chapter 6 Related Work
6.1 Source-Test Co-Evolution
6.2 Empirical Studies
6.3 Software Defect Prediction
6.4 Regression Testing
6.5 Test Repair on Java
Conclusions
References
Acknowledgements
本文编号:4054305
本文链接:https://www.wllwen.com/kejilunwen/ruanjiangongchenglunwen/4054305.html