蜕变测试

维基百科,自由的百科全书

蜕变测试(英語:Metamorphic testing[1][2][3][4][5][6][7] 是一种用来缓解“测试准则问题”的软件测试技术。 测试准则是一种让测试人员判定程序是否能通过测试的机制。当测试人员对于所选择的测试用例难以确定预期的正确结果,或无法判定程序输出是否满足预期的结果时,便认为存在“测试准则问题”。

定義[编辑]

蜕变测试中指出,给出一个或多个测试用例(称为“源测试用例”或“原始测试用例”)及其预期输出(如果有的话),一个或多个用来验证系统或待实现函数的必要属性(称为蜕变关系)的后续测试用例可以被构造出来。例如,一个程序正确实现了sin x的100位有效数字。正弦函数的一个蜕变关系是“sin (π − x) = sin x”,因此即使对于源测试用例 x = 1.234 来说,sin x 的预期输出并不知道,但依然可以以此构造一个后续测试用例 yπ − 1.234。然后判断源测试用例和后续测试用例产生的输出是否在蜕变关系下一致。任何不一致的输出表示了程序的实现中存在缺陷。

應用[编辑]

在一般情况下,蜕变关系并不需要一定是一个等式或方程,也可以是一个关系。蜕变试验可以应用于包含了目标函数多次执行过程、其必要属性可以被定制的任何问题中。一些成功应用蜕变测试的例子包括:偏微分方程[8]普适计算[9]服务计算[10]绘图软件[11]生物信息学[12] 、软件产品线[13]以及网络搜索引擎[14]等。

蜕变测试也被应用于机器学习、人工智能算法、以及基于神经网络的深度学习模型中 [15] [16] [17] [18],并被认为是用来验证机器学习软件的一种很有前景的方法[19]

参考文献[编辑]

  1. ^ First introduced in T.Y. Chen, S.C. Cheung, and S.M. Yiu, "Metamorphic testing: a new approach for generating next test cases", Technical Report HKUST-CS98-01, Department of Computer Science, Hong Kong University of Science and Technology, Hong Kong (1998).
  2. ^ First regular conference paper: T.Y. Chen, T.H. Tse, and Z. Zhou, "Fault-based testing in the absence of an oracle", in Proceedings of the 25th Annual International Computer Software and Applications Conference (COMPSAC '01), IEEE Computer Society, pp. 172–178 (2001).
  3. ^ First journal paper: T.Y. Chen, T.H. Tse, and Z.Q. Zhou, "Fault-based testing without the need of oracles", Information and Software Technology, vol. 45, no. 1, pp. 1–9 (2003).
  4. ^ First IEEE TSE paper: T.Y. Chen, T.H. Tse, and Z.Q. Zhou, "Semi-proving: an integrated method for program proving, testing, and debugging", IEEE Transactions on Software Engineering 37 (1): 109-125 (2011).
  5. ^ Recent IEEE TSE paper: Z.Q. Zhou, S. Xiang, and T.Y. Chen, "Metamorphic testing for software quality assessment: A study of search engines", IEEE Transactions on Software Engineering, 42 (3): 264-284 (2016).
  6. ^ First major survey paper: S. Segura, G. Fraser, Ana B. Sánchez and A. Ruiz-Cortés, "A Survey on Metamorphic Testing", IEEE Transactions on Software Engineering, 42 (9): 805-824 (2016).
  7. ^ Second major survey paper: T.Y. Chen, F.-C. Kuo, H. Liu, P.-L. Poon, D. Towey, T.H. Tse, and Z.Q. Zhou, "Metamorphic testing: A review of challenges and opportunities", ACM Computing Surveys 51 (1): 4:1-4:27 (2018).
  8. ^ T.Y. Chen, J. Feng, and T.H. Tse,"Metamorphic testing of programs on partial differential equations: a case study", in Proceedings of the 26th Annual International Computer Software and Applications Conference (COMPSAC '02), IEEE Computer Society, pp. 327−333 (2002).
  9. ^ T.H. Tse, S.S. Yau, W.K. Chan, H. Lu, and T.Y. Chen, "Testing context-sensitive middleware-based software applications", in Proceedings of the 28th Annual International Computer Software and Applications Conference (COMPSAC '04), vol. 1, IEEE Computer Society, pp. 458−465 (2004).
  10. ^ W.K. Chan, S.C. Cheung, and K.R.P.H. Leung, "A metamorphic testing approach for online testing of service-oriented software applications", International Journal of Web Services Research 4 (2): 60−80 (2007).
  11. ^ R. Guderlei and J. Mayer, "Towards automatic testing of imaging software by means of random and metamorphic testing", International Journal of Software Engineering and Knowledge Engineering 17 (6): 757−781 (2007).
  12. ^ T.Y. Chen, J.W.K. Ho, H. Liu, and X. Xie, "An innovative approach for testing bioinformatics programs using metamorphic testing", BMC Bioinformatics 10: article no. 24 (2009).
  13. ^ S. Segura, R.M. Hierons, D. Benavides, and A. Ruiz-Cortes, "Automated test data generation on the analyses of feature models: a metamorphic testing approach", in Proceedings of the 3rd International Conference on Software Testing, Verification, and Validation (ICST '10), IEEE Computer Society, pp. 35−44 (2010).
  14. ^ Z.Q. Zhou, S. Zhang, M. Hagenbuchner, T.H. Tse, F.-C. Kuo, and T.Y. Chen, "Automated functional testing of online search services", Software Testing, Verification and Reliability 22 (4): 221−243 (2012).
  15. ^ W.K. Chan, J.C.F. Ho, and T.H. Tse, "Finding failures from passed test cases: Improving the pattern classification approach to the testing of mesh simplification programs", Software Testing, Verification and Reliability 20 (2): 89-120 (2010).
  16. ^ J. Ding, X.-H. Hu, and V. Gudivada, "A machine learning based framework for verification and validation of massive scale image data", IEEE Transactions on Big Data (2017). doi: 10.1109/TBDATA.2017.2680460.
  17. ^ S. Nakajima, "Generalized oracle for testing machine learning computer programs", in Software Engineering and Formal Methods, Springer, Berlin, Germany (2017).
  18. ^ X. Xie, J.W.K. Ho, C. Murphy, G.E. Kaiser, B. Xu, and T.Y. Chen, "Testing and validating machine learning classifiers by metamorphic testing", Journal of Systems and Software 84 (4): 544-558 (2011).
  19. ^ Test your Machine Learning Algorithm with Metamorphic Testing. Trustable AI. 2017-11-14 [2017-11-15]. (原始内容存档于2017-11-15) (美国英语). 

外部链接[编辑]