It is good practice to name test methods such that they are comprehensible to developers; they must be written in such a way that their purpose and functionality are clear to those who will maintain them. Unfortunately, there is little automated support for writing or maintaining the names of test methods. This can lead to inconsistent and low-quality test names and increase the maintenance cost of supporting these methods. Due to this risk, it is essential to help developers in maintaining their test method names over time. In this paper, we use grammar patterns, and how they relate to test method behavior, to understand test naming practices. This data will be used to support an automated tool for maintaining test names.
翻译:命名测试方法,使开发商能够理解这些方法,这是良好做法;这些方法的写法必须使其目的和功能对维护这些方法的人清楚明了。 不幸的是,在书写或维护测试方法名称方面几乎没有自动支持,这可能导致测试方法名称不一致和低质量,并增加支持这些方法的维护费用。由于这一风险,必须帮助开发商在一段时间内保持测试方法名称。在本文件中,我们使用语法模式,以及它们与测试方法行为的关系,以理解测试命名做法。这些数据将用来支持用于维护测试名称的自动化工具。