Giving warning about non parameterized tests with PowerMockRunner and JUnit 4

Please provide

  • Operating system: Windows 10
  • IDE name and flavor/env: Jetbrains IntelliJ IDEA 2022.1.2 (Ultimate Edition)
  • SonarLint plugin version: 6.7.0.45926
  • Is connected mode used: no
    • Connected to SonarCloud or SonarQube (and which version):

And a thorough description of the problem / question:

It is giving the following warning:

Similar tests should be grouped in a single Parameterized test

Code smell

Major
java:S5976

But I am using PowerMockRunner with JUnit version 4, which does not supported parameterized tests.

I have tried PowerMockRunnerDelegate(Parameterized.class) but I can’t get it to work.

Hey @sjmuir,

Thanks for reporting the issue. Could you share a bit of self-contained code that triggers the issue?
As I am not sure we are covering this combination of test framework and runner, this would help us to understand if we are missing something.

Thanks