...
首页> 外文期刊>Journal of computer sciences >A Complete Automation of Unit Testing for JavaScript Programs | Science Publications
【24h】

A Complete Automation of Unit Testing for JavaScript Programs | Science Publications

机译:完全自动化的JavaScript程序单元测试|科学出版物

获取原文
           

摘要

> Problem statement: Program testing is expensive and labor intensive, often consuming more than half of the total development costs, and yet it is frequently not done well and the results are not always satisfactory. The objective of this paper is to present an automatic test data generation tool that aims to completely automate unit testing of JavaScript functions. The methodology: In order to use the proposed tool, the tester annotates the files that contain the class to be tested. Moreover, the tester must specify the test data coverage criterion to be used, either branch coverage or mutation analysis. However, the tool is then integrated into the JavaScript compiler and test generation is invoked by a command line option. Also, the code to be tested is parsed into an abstract syntax tree from which the test tool generates a program dependency graph for the function under test. However, if mutation analysis coverage is required, the abstract syntax tree for a meta-mutant program is also generated. To provide guidance for the test data search, the function under test instrumented in accordance with the coverage criterion. Branch predicate expressions are always instrumented, in the case of mutation coverage, mutated statements are also instrumented. Compilation then continues from the modified abstract syntax tree to generate instrumented executables that were loaded into the test data search module. Results: The experiment done in our study by using the proposed tool for branch coverage shows that the most effective result for string equality was obtained using the edit distance fitness function, while no significant difference was found in the fitness function for string ordering. Through exhaustive mulation coverage 8% are found to be equivalent. Conclusion: By having a complete automation it reduces the cost of software testing dramatically and also facilitates continuous testing. It is reported that at least 50% of the total software development costs is due to testing, and 10
机译: > 问题陈述:程序测试是昂贵且劳动密集型的,通常消耗总开发成本的一半以上,但往往做得不好,结果并不总是如此满意的。本文的目的是一种自动生成测试数据的工具,旨在完全自动化JavaScript函数的单元测试。 方法论:为了使用建议的工具,测试人员对包含要测试的类的文件进行注释。而且,测试人员必须指定要使用的测试数据覆盖标准,即分支覆盖或突变分析。但是,然后将该工具集成到JavaScript编译器中,并通过命令行选项调用测试生成。此外,将要测试的代码解析为抽象语法树,测试工具从该语法树中为被测函数生成程序依赖图。但是,如果需要进行突变分析,则还会生成元突变程序的抽象语法树。为了为测试数据搜索提供指导,根据覆盖标准对被测功能进行了测试。分支谓词表达式始终被检测,在发生突变的情况下,也检测被突变的语句。然后,从修改后的抽象语法树继续进行编译,以生成已检测到的可执行文件,这些可执行文件已加载到测试数据搜索模块中。 结果:在我们的研究中,使用建议的分支覆盖工具进行的实验表明,使用编辑距离适应度函数可获得最有效的字符串相等度结果,而在适应度上则无显着差异字符串排序功能。通过详尽的模拟覆盖,发现8%是等效的。 结论:通过完全自动化,它可以大大降低软件测试的成本,并有助于进行连续测试。据报道,软件开发总成本中至少有50%是由于测试造成的,而10

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号