Fix test smell detection: PrintStatement
luana-martins opened this issue · 1 comments
Definition: Print statements in unit tests are redundant as unit tests are executed as part of an automated process with little to no human intervention. Print statements are possibly used by developers for traceability and debugging purposes and then forgotten.
Detection: A test method that invokes either the print or println or printf or write method of the System class.
Problem: Only one PrintStatement is detected in the test method, even if the test method has multiple print statements. Fix the test smell detection to count each of its instances and to point the line where it is located.
Hey, @luana-martins :)
Reopening this issue because the result of the detection to this test smell is wrong:
The colum: "testSmellMethod" is returning the type of print like "printf" instead of the name of the method.