TRec: A Regression Test Recommender for Java Projects
Software Testing And Maintenance Lab.
Sai Kiran Bhrugumalla
Ajay Jha
40th IEEE International Conference on Software Maintenance and Evolution (ICSME)
Gson: JsonWriter name(String name)
Do tests need to be modified or added?
Gson: JsonWriter name(String name)
Do tests need to be modified or added?
Identify all tests
Identify tests for the code change
Modify or add tests
Identify all tests
Identify tests for the code change
Tedious & challenging (Rompaey and Demeyer ICSMR 09, Hurdugaci and Zaidman ICSMR 12)
Manually
Test
Code
Test-to-code traceability (TCT) techniques (White et al. ICSE 20, Sohn and Papadakis ISSRE 22)
Do not recommend tests for a code change
Do not incrementally update TCT links
App (Gson)
Existing Commit Analysis
Method-test pairs + Frequency
name(String)
7 testInvalidTopLevelTypes
7 closeAllObjectsAndTryToAddElements
5 testNameWithoutValue
4 testTwoNames
4 testClosedWriterThrowsOnName
1 testNameAsTopLevelValue
TRec
App (Gson)
Existing Commit Analysis
Method-test pairs + Frequency
name(String)
7 testInvalidTopLevelTypes
7 closeAllObjectsAndTryToAddElements
5 testNameWithoutValue
4 testTwoNames
4 testClosedWriterThrowsOnName
1 testNameAsTopLevelValue
New Commit Analysis
parseReader(JsonReader)
1 testStrict
name(String)
No tests modified
name(String) - Top 5 tests
7 testInvalidTopLevelTypes
7 closeAllObjectsAndTryToAddElements
5 testNameWithoutValue
4 testTwoNames
4 testClosedWriterThrowsOnName
TRec
Effectiveness of TRec:
Does TREC recommend the same tests that developers modify for code changes?
Effectiveness of TRec:
84% of the developers’ modified tests are the same as TRec’s recommended tests
TRec: An open-source command line tool
ajay.jha.1@ndsu.edu