Talks by Dr. Ducasse
Rotten Green Tests
by Dr. Stephane Ducasse, Research Director, Inria Lille, France
13:00- on 2019 July 1st
Medium meeting room on the 2nd Floor, I-REF building, The University of Tokyo.
Unit tests are a tenant of agile programming methodologies, and are widely used to improve code quality and prevent code regression. A passing (green) test is usually taken as a robust sign that the code under test is valid. However, some green tests contain assertions that are never executed. We call such tests Rotten Green Tests. Rotten Green Tests represent a case worse than a broken test: they report that the code under test is valid, but in fact do not test that validity. We describe an approach to identify rotten green tests by combining simple static and dynamic call-site analyses. Our approach takes into account test helper methods, inherited helpers, and trait compositions, and has been implemented in a tool called DrTest. DrTest reports no false negatives, yet it still reports some false positives due to conditional use or multiple test contexts. Using DrTest we conducted an empirical evaluation of 19,905 real test cases in mature projects of the Pharo ecosystem. The results of the evaluation shows that the tool is effective; it detected 294 tests as rotten– passing tests that contain assertions but that are not executed. The funny thing is that we started to check in Java and we found many rotten green tests. K. Beck the father of agile programming said: “I do love it” (talking about the ICSE paper).
Bio: I'm an Inria Research Director. I lead RMoD team. I'm expert in language design and reengineering. I worked on traits. Traits have been introduced in Pharo, Perl, PHP and under a variant into Scala, Groovy and Fortress. I'm expert on software quality, program understanding, program visualisations, reengineering and metamodeling. I'm one of the developer of Moose, an open-source software analysis platform. I created Synectique a company building dedicated tools for advanced software analyses. I'm one of the leader of Pharo a dynamic reflective object-oriented language supporting live programming. I built the industrial Pharo consortium. I work regularly with companies (Thales, Wordline, Siemens, Berger-Levrault, Arolla,...) on software evolution problems. I wrote couple hundred articles and several books. According to google my h-index is 54 for more than 12800 citations. I like to help people becoming what they want and building things.