arieslab / jnose

JNose - Java TestSmells Detection
GNU General Public License v3.0
20 stars 8 forks source link

Feature: support other JUnit versions #36

Open luana-martins opened 3 years ago

luana-martins commented 3 years ago

Problem. Currently, JNose supports only JUnit4. However, we reused the detection rules from tsDetect and it also supports JUnit3. We have inserted an unnecessary restriction to JNose regarding the JUnit version. We only consider a class that has a "@Test" annotation, which might occur in JUnit 4 or higher.

Solution. To identify a test class, we can (1) check if its name contains the word "Test" as a prefix or suffix, and (2) check if there is a JUnit import.