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)
2
Gson: JsonWriter name(String name)
Do tests need to be modified or added?
3
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
4
Identify all tests
Identify tests for the code change
Tedious & challenging (Rompaey and Demeyer ICSMR 09, Hurdugaci and Zaidman ICSMR 12)
Manually
5
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
6
App (Gson)
Existing Commit Analysis
Method-test pairs + Frequency
name(String)
7 testInvalidTopLevelTypes
7 closeAllObjectsAndTryToAddElements
5 testNameWithoutValue
4 testTwoNames
4 testClosedWriterThrowsOnName
1 testNameAsTopLevelValue
TRec
7
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
8
Effectiveness of TRec:
Does TREC recommend the same tests that developers modify for code changes?
9
Effectiveness of TRec:
84% of the developers’ modified tests are the same as TRec’s recommended tests
10
TRec: An open-source command line tool
ajay.jha.1@ndsu.edu