ZohhakRunner tests result in "TestCases should contain tests"

We use Zohhak to run data-driven unit tests. This has its own @TestWith annotation instead of JUnit’s @Test annotation so that you can specify multiple tests. This results in many false-positive “Add some tests to this class.” (squid:S2187) issues. Can we support the Zohhak test runner so that @TestWith is counted as a test?

Example test

public class DataDrivenTest {

       "clerk,      45'000 USD, GOLD",
       "supervisor, 60'000 GBP, PLATINUM"
   public void canAcceptDebit(Employee employee, Money money, ClientType clientType) {
       assertTrue(   employee.canAcceptDebit(money, clientType)   );


Thanks for the feedback and sorry for the delay.

Ticket created: https://jira.sonarsource.com/browse/SONARJAVA-3102

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.