• GissaMittJobb@lemmy.ml
      link
      fedilink
      arrow-up
      17
      ·
      5 days ago

      A limitation of testing is that you can only write tests for cases that you can think of, and cases you can think of ways to write tests for.

      It’s still valuable despite this limitation, of course.

      • FizzyOrange@programming.dev
        link
        fedilink
        arrow-up
        5
        ·
        5 days ago

        That’s not entirely true, e.g. you can do fuzz testing or constrained random testing. Maybe you aren’t including those in “testing”?

        • GissaMittJobb@lemmy.ml
          link
          fedilink
          arrow-up
          5
          ·
          5 days ago

          I was mostly thinking about hand-written tests and manual test procedures, but yeah, fuzzing can help you catch issues as well and you don’t necessarily consciously know about the test cases you put into the system in that case.

          Then again, you have to design the fuzzing input consciously so I guess that’s kind of a “what you can think about”-limitation.

          Good point regardless, thanks

    • MagicShel@lemmy.zip
      link
      fedilink
      English
      arrow-up
      10
      arrow-down
      5
      ·
      5 days ago

      You can write shit tests. Finding new bugs doesn’t surprise me. Putting that much effort in does, but 600:1? That’s some serious red flags there. There are only so many variables in a single line of code. How many unhappy paths can there be for a single line?

      • Kogasa@programming.dev
        link
        fedilink
        arrow-up
        11
        ·
        5 days ago

        SQLite is one of the best tested codebases in existence. Having only so many variables per line means nothing