Jester - a JUnit test tester

Jester - a JUnit test tester
复制标题

Jester - JUnit 测试仪

DOI:
--
复制
发表时间:
2001
期刊:
影响因子:
--
通讯作者:
I. Moore
I. Moore
中科院分区:
--
文献类型:
--
作者:
I. Moore

文献摘要

被引文献

相似文献

如果他们的代码通过了单元测试,那么极端的程序员就会对他们的代码充满信心。更有经验的极限程序员只有对自己的测试有信心,才会对自己的代码有信心。极端程序员在测试中获得信心所使用的一种技术是确保他们的测试能够发现代码中故意的错误。这种手工测试要么耗时,要么非常肤浅。Jester是用于JUnit测试的测试测试人员;它以各种方式修改源代码,并检查每次修改的测试是否失败。Jester表示可以进行的代码更改不会导致测试失败。如果代码可以在没有测试失败的情况下被修改,这要么表明缺少测试,要么表明代码是冗余的。Jester可以用来获得对现有测试足够的信心,或者提供关于缺失测试的线索。Jester与代码覆盖工具不同,因为它可以找到通过运行测试执行但没有实际测试的代码。Jester将与传统的代码覆盖工具进行比较。将讨论使用Jester的结果。极限程序员[1]对通过测试的代码有信心,对发现错误的测试有信心。许多极端的程序员暂时在他们的代码中故意放置错误,以检查他们的测试是否捕获了这些错误,然后再纠正代码以通过测试。在一些项目团队中,指定了一个项目破坏者[4],其角色是验证他们故意引入代码库副本的错误是否被测试捕获。Jester机械地执行类似的测试测试,对源文件进行一些更改,重新编译该文件,运行测试,如果测试通过,Jester将显示一条消息,说明更改的内容。Jester每次对目录树中的每个源文件进行一个更改,对每个源文件进行许多不同的更改。所做的不同类型的更改是
Extreme programmers have confidence in their code if it passes their unit tests. More experienced extreme programmers only have confidence in their code if they also have confidence in their tests. A technique used by extreme programmers to gain confidence in their tests is to make sure that their tests spot deliberate errors in the code. This sort of manual test testing is either time consuming or very superficial. Jester is a test tester for JUnit tests; it modifies the source in a variety of ways, and checks whether the tests fail for each modification. Jester indicates code changes that can be made that do not cause the tests to fail. If code can be modified without the tests failing, it either indicates that there is a test missing or that the code is redundant. Jester can be used to gain confidence that the existing tests are adequate, or give clues about the tests that are missing. Jester is different than code coverage tools, because it can find code that is executed by the running of tests but not actually tested. Jester will be compared with conventional code coverage tools. Results of using Jester will be discussed. 1 INTRODUCTION Extreme programmers[1] have confidence in code if it passes tests, and have confidence in tests if they catch errors. Many extreme programmers temporarily put deliberate errors in their code to check that their tests catch those errors, before correcting the code to pass the tests. In some project teams, a project saboteur[4] is appointed, whose role is to verify that errors that they deliberately introduce to a copy of the code base are caught by the tests. Jester performs similar test testing mechanically, by making some change to a source file, recompiling that file, running the tests, and if the tests pass Jester displays a message saying what it changed. Jester makes its changes one at a time, to every source file in a directory tree, making many different changes to each source file. The different types of change made are