Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-3527

Rule S5977: Tests should use fixed data instead of randomized data

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.8
    • Component/s: Rules
    • Labels:
      None

      Description

      We might have some false positives if the Random object is only passed to production code, ex: via an injection. If this happens we could keep only issues when the Random objects' nextInt/nextLong/... methods are called inside the tests.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              margarita.nedzelska Margarita Nedzelska
              Reporter:
              nicolas.harraudeau Nicolas Harraudeau (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: