Finding Polluter Tests Using Java PathFinder
Pu Yi Anjiang Wei Wing Lam
Tao Xie Darko Marinov
lukeyi@pku.edu.cn
What are Flaky Tests?
2
What are Order-Dependent Tests?
3
Why Look for Polluter Tests?
4
Prior Work
5
1. Gyori et al. "Reliable testing: detecting state-polluting tests to prevent test dependency." ISSTA 2015
PolDet’s Original Implementation
6
Challenge for PolDet
7
How to Avoid False Positives?
8
9
10
11
How to Implement PolDet in JPF
12
Our Implementation of PolDet in JPF
13
Experiments
14
Example Real Polluter Test
One polluter test we found in project spark uses powermock-reflection to modify a static field
15
modifies static field ExceptionMapper.servletInstance
Some Lessons Learned from Our Work
16
Some Points for Discussion
17
Ran only 189 of 1005�test classes we tried