arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2310.07856cs.CLcs.SE
收藏

评估神经测试预言生成的评价指标

Assessing Evaluation Metrics for Neural Test Oracle Generation

York University(约克大学)

Jiho Shin, Hadi Hemmati, Moshi Wei, Song Wang

AI总结:

本研究评估神经测试预言生成模型的NLG与测试充分性指标,发现两者无显著相关,并分析原因,为深度学习在软件测试生成中的应用评估提供指导。

摘要:

在这项工作中,我们重新审视了现有的预言生成研究以及ChatGPT,以实证调查它们在基于自然语言生成(NLG)的指标和测试充分性指标上的当前表现。具体来说,我们训练并运行了四个最先进的测试预言生成模型,并使用五个基于NLG的指标和两个测试充分性指标进行分析。我们在这两组不同的指标之间应用了两种不同的相关性分析。令人惊讶的是,我们发现基于NLG的指标与测试充分性指标之间没有显著的相关性。例如,在项目activemq-artemis上,由ChatGPT生成的预言在所有研究的神经预言生成器(NOGs)中,在所有基于NLG的指标上表现最高,然而,与所有研究的NOGs相比,它在测试充分性指标上出现下降的项目数量最多。我们进一步进行了定性分析以探索我们观察背后的原因,发现具有高NLG指标但低测试充分性指标的预言往往在预言参数中包含复杂或多个链式方法调用,这使得模型难以完全生成,从而影响了测试充分性指标。另一方面,具有低NLG指标但高测试充分性指标的预言往往需要调用不同的断言类型或与真实情况中功能相似的不同方法。总体而言,这项工作通过使用NLG和测试充分性指标进行广泛的性能评估,补充了先前关于测试预言生成的研究,并为未来软件测试生成中深度学习应用的更好评估提供了指导。

英文摘要:

In this work, we revisit existing oracle generation studies plus ChatGPT to empirically investigate the current standing of their performance in both NLG-based and test adequacy metrics. Specifically, we train and run four state-of-the-art test oracle generation models on five NLG-based and two test adequacy metrics for our analysis. We apply two different correlation analyses between these two different sets of metrics. Surprisingly, we found no significant correlation between the NLG-based metrics and test adequacy metrics. For instance, oracles generated from ChatGPT on the project activemq-artemis had the highest performance on all the NLG-based metrics among the studied NOGs, however, it had the most number of projects with a decrease in test adequacy metrics compared to all the studied NOGs. We further conduct a qualitative analysis to explore the reasons behind our observations, we found that oracles with high NLG-based metrics but low test adequacy metrics tend to have complex or multiple chained method invocations within the oracle's parameters, making it hard for the model to generate completely, affecting the test adequacy metrics. On the other hand, oracles with low NLG-based metrics but high test adequacy metrics tend to have to call different assertion types or a different method that functions similarly to the ones in the ground truth. Overall, this work complements prior studies on test oracle generation with an extensive performance evaluation with both NLG and test adequacy metrics and provides guidelines for better assessment of deep learning applications in software test generation in the future.

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

↑