arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1212.1796cs.SE
收藏

从交互式程序设计会话中抽取单元测试的研究

On Extracting Unit Tests from Interactive Programming Sessions

Adrian Kuhn

摘要:

软件工程方法论建议开发人员应该捕获他们的努力,以确保程序在可重复和自动化的工件中正确运行,例如单元测试。然而,当从探索性测试到脚本测试的范围内观察开发人员活动时,我们发现许多工程活动都包括探索性测试的爆发。在本文中,我们建议利用这些探索性的测试突发自动提取脚本测试从这些会话的记录。为了做到这一点,我们窃听开发环境,这样我们就可以记录所有的程序输入,所有用户发出的函数调用,以及探索性测试会话的所有程序输出。然后,我们建议使用机器学习(即聚类)从这些记录中实时提取脚本测试用例。我们概述了两个早期原型,一个是静态的,一个是动态的。我们通过例子概述了这个想法如何融入编程的更大研究方向。

英文摘要:

Software engineering methodologies propose that developers should capture their efforts in ensuring that programs run correctly in repeatable and automated artifacts, such as unit tests. However, when looking at developer activities on a spectrum from exploratory testing to scripted testing we find that many engineering activities include bursts of exploratory testing. In this paper we propose to leverage these exploratory testing bursts by automatically extracting scripted tests from a recording of these sessions. In order to do so, we wiretap the development environment so we can record all program input, all user-issued functions calls, and all program output of an exploratory testing session. We propose to then use machine learning (i.e. clustering) to extract scripted test cases from these recordings in real-time. We outline two early-stage prototypes, one for a static and one for a dynamic language. And we outline how this idea fits into the bigger research direction of programming by example.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑