蛻變測試
蛻變測試(英語:Metamorphic testing)[1][2][3][4][5][6][7] 是一種用來緩解「測試準則問題」的軟件測試技術,它最初由 Swinburne University of Technology 的教授 Tsong Yueh Chen[1][8] 於 1998 年提出。測試準則是一種讓測試人員判定程序是否能通過測試的機制。當測試人員對於所選擇的測試用例難以確定預期的正確結果,或無法判定程序輸出是否滿足預期的結果時,便認為存在「測試準則問題」。
定義
蛻變測試中指出,給出一個或多個測試用例(稱為「源測試用例」或「原始測試用例」)及其預期輸出(如果有的話),一個或多個用來驗證系統或待實現函數的必要屬性(稱為蛻變關係)的後續測試用例可以被構造出來。例如,一個程序正確實現了sin x的100位有效數字。正弦函數的一個蛻變關係是「sin (π − x) = sin x」,因此即使對於源測試用例 x = 1.234 來說,sin x 的預期輸出並不知道,但依然可以以此構造一個後續測試用例 y = π − 1.234。然後判斷源測試用例和後續測試用例產生的輸出是否在蛻變關係下一致。任何不一致的輸出表示了程序的實現中存在缺陷。
應用
在一般情況下,蛻變關係並不需要一定是一個等式或方程,也可以是一個關係。蛻變試驗可以應用於包含了目標函數多次執行過程、其必要屬性可以被定製的任何問題中。一些成功應用蛻變測試的例子包括:偏微分方程[9]、普適計算[10]、服務計算[11]、繪圖軟件[12]、生物信息學[13] 、軟件產品線[14]以及網絡搜尋引擎[15]等。
蛻變測試也被應用於機器學習、人工智能算法、以及基於神經網絡的深度學習模型中 [16] [17] [18] [19],並被認為是用來驗證機器學習軟件的一種很有前景的方法[20]。
參考文獻
- ^ 1.0 1.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).
- ^ 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).
- ^ 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).
- ^ 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).
- ^ 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).
- ^ 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).
- ^ 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).
- ^ Researcher Profile | Swinburne University of Technology | Melbourne. www.swinburne.edu.au. [2024-06-28]. (原始內容存檔於2024-04-19).
- ^ 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).
- ^ 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).
- ^ 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).
- ^ 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).
- ^ 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).
- ^ 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).
- ^ 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).
- ^ 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).
- ^ 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.
- ^ S. Nakajima, "Generalized oracle for testing machine learning computer programs", in Software Engineering and Formal Methods, Springer, Berlin, Germany (2017).
- ^ 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).
- ^ Test your Machine Learning Algorithm with Metamorphic Testing. Trustable AI. 2017-11-14 [2017-11-15]. (原始內容存檔於2017-11-15) (美國英語).