Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-2699

Tests should include assertions

    XMLWordPrintable

    Details

    • Type: Code Smell Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
    • Message:
      Add at least one assertion to this test case.
    • Default Severity:
      Blocker
    • Impact:
      High
    • Likelihood:
      High
    • Default Quality Profiles:
      Sonar way
    • Targeted languages:
      APEX
    • Covered Languages:
      C#, Java, PHP
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      10min
    • Analysis Scope:
      Test Sources
    • Implementation details:
    • PMD:
      JUnitTestsShouldIncludeAssert

      Description

      A test case without assertions ensures only that no exceptions are thrown. Beyond basic runnability, it ensures nothing about the behavior of the code under test.

        Attachments

          Issue Links

          1.
          Java RSPEC-2784 Language-Specification Active Unassigned
          2.
          C# RSPEC-3413 Language-Specification Active Unassigned
          3.
          Apex RSPEC-5528 Language-Specification Active Unassigned
          4.
          PHP RSPEC-5921 Language-Specification Active Unassigned
          5.
          Javascript RSPEC-6075 Language-Specification Active Unassigned

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ann.campbell.2 Ann Campbell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: