@techreport{oai:ipsj.ixsq.nii.ac.jp:00237371, author = {堀川, 康生 and 馬渕, 航 and 柏, 祐太郎 and 藤原, 賢二 and 飯田, 元 and Kosei, Horikawa and Wataru, Mabuchi and Yutaro, Kashiwa and Kenji, Fujiwara and Hajimu, Iida}, issue = {17}, month = {Jul}, note = {リファクタリングは,内部構造の単純化や可読性の向上を目的として,外部から見た振る舞いを変更せずにプログラムを修正することを指す.その対象はプロダクションコードに留まらず,テストコードに対しても行われる.しかし,テストコードに対するリファクタリングは体系化されておらず,存在するリファクタリングのパターンやその効果が明らかになっていない.そこで,本研究では目視調査を通して,テストコード固有のリファクタリングパターンの特定・分類を行う.また,検出したテスト固有リファクタリングがテストコードにおける潜在的な問題(テストスメル)の解決にどの程度効果を有するかを調査する.調査結果より,100 件中 49 件のコミットで 29 種類のテスト固有リファクタリングが確認できた.また,テスト固有リファクタリング前後のテストスメルを分析した結果,Verification Method では Magic Number Test や Exception Handling を増加させていることが明らかとなった.また,Remove Overzealous Test では,Assertion Roulette を削減していることを確認した., Refactoring refers to modifying a program without changing its external behavior to simplify its internal structure or improve its performance. Refactoring is performed not only on production code but also on test code. However, refactoring for test code has not been thoroughly studied, and the test refactoring patterns and their effects are yet to be revealed. In this study, we aim at identifying and classifying refactoring patterns specific to test code through a manual inspection. Additionally, we investigate how each identified test-specific-refactoring addresses potential issues in test code, known as test smells. Our empirical results discovered 29 distinct test-specific refactoring patterns across 48 out of 100 commits. We demonstrated that the Verification Method refactoring increased occurrences of Magic Number Test and Exception Handling. In contrast, the Remove Overzealous Test refactoring was observed to reduce instances of Assertion Roulette.}, title = {テストコード固有のリファクタリングが及ぼす影響調査にむけて}, year = {2024} }