蛻變測試First introduced in TY Chen SC Cheung and SM Yiu Metamorphic testing a new approach for generating next test cases Technical Report HKUSTCS9801 Department of Computer Science Hong Kong University of Science and Technology Hong Kong 1998First regular conference paper TY Chen TH Tse and Z Zhou Faultbased 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 172178 2001First journal paper TY Chen TH Tse and ZQ Zhou Faultbased testing without the need of oracles Information and Software Technology vol 45 no 1 pp 19 2003First IEEE TSE paper TY Chen TH Tse and ZQ Zhou Semiproving an integrated method for program proving testing and debugging IEEE Transactions on Software Engineering 37 1 109125 2011Recent IEEE TSE paper ZQ Zhou S Xiang and TY Chen Metamorphic testing for software quality assessment A study of search engines IEEE Transactions on Software Engineering 42 3 264284 2016First major survey paper S Segura G Fraser Ana B Sánchez and A RuizCortés A Survey on Metamorphic Testing IEEE Transactions on Software Engineering 42 9 805824 2016Second major survey paper TY Chen FC Kuo H Liu PL Poon D Towey TH Tse and ZQ Zhou Metamorphic testing A review of challenges and opportunities ACM Computing Surveys 51 1 41427 2018 是一種用來緩解 測試準則問題 的軟體測試技術，它最初由 Swinburne University of Technology 的教授 Tsong Yueh Chen 於 1998 年提出。測試準則是一種讓測試人員判定程式是否能透過測試的機制。當測試人員對於所選擇的測試用例難以確定預期的正確結果，或無法判定程式輸出是否滿足預期的結果時，便認為存在 測試準則問題。 定義 蛻變測試中指出，給出一個或多個測試用例（稱為 源測試用例 或 原始測試用例）及其預期輸出（如果有的話），一個或多個用來驗證系統或待實現函式的必要屬性（稱為蛻變關係）的後續測試用例可以被構造出來。例如，一個程式正確實現了 sin x 的 100 位有效數字。正弦函式的一個蛻變關係是 sin π x sin x，因此即使對於源測試用例 x 1234 來說，sin x 的預期輸出並不知道，但依然可以以此構造一個後續測試用例 y π 1234。然後判斷源測試用例和後續測試用例產生的輸出是否在蛻變關係下一致。任何不一致的輸出表示了程式的實現中存在缺陷。 應用 在一般情況下，蛻變關係並不需要一定是一個等式或方程，也可以是一個關係。蛻變試驗可以應用於包含了目標函式多次執行過程、其必要屬性可以被定製的任何問題中。一些成功應用蛻變測試的例子包括：偏微分方程 TY Chen J Feng and TH TseMetamorphic 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 327333 2002、普適計算 TH Tse SS Yau WK Chan H Lu and TY Chen Testing contextsensitive middlewarebased software applications in Proceedings of the 28th Annual International Computer Software and Applications Conference COMPSAC 04 vol 1 IEEE Computer Society pp 458465 2004、服務計算 WK Chan SC Cheung and KRPH Leung A metamorphic testing approach for online testing of serviceoriented software applications International Journal of Web Services Research 4 2 6080 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 757781 2007、生物資訊學 TY Chen JWK 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 RM Hierons D Benavides and A RuizCortesAutomated 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 3544 2010 以及網路搜尋引擎 ZQ Zhou S Zhang M Hagenbuchner TH Tse FC Kuo and TY ChenAutomated functional testing of online search services Software Testing Verification and Reliability 22 4 221243 2012 等。 蛻變測試也被應用於機器學習、人工智慧演算法、以及基於神經網路的深度學習模型中 WK Chan JCF Ho and TH 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 89120 2010 J Ding XH 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 101109TBDATA20172680460 S Nakajima Generalized oracle for testing machine learning computer programs in Software Engineering and Formal Methods Springer Berlin Germany 2017 X Xie JWK Ho C Murphy GE Kaiser B Xu and TY Chen Testing and validating machine learning classifiers by metamorphic testing Journal of Systems and Software 84 4 544558 2011 ，並被認為是用來驗證機器學習軟體的一種很有前景的方法。 參考文獻 外部連結 ACM SIGSOFT webinar on metamorphic testing Category 軟體測試