• FaceDeer@fedia.io
      link
      fedilink
      arrow-up
      2
      arrow-down
      2
      ·
      3 days ago

      They check to make sure that the code continues producing the expected results. For example if I had some code that added up numbers, I might have a unit test that calls that function with the parameters “2” and “2” and checks to make sure the result is “4”. If something changes that makes it start returning something else then a flag is immediately raised.

      • resipsaloquitur@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        3
        ·
        3 days ago

        Are these tests written by AI? Have you reviewed the tests? Do they cover all code paths and all the possible inputs and outputs? Do the tests have requirements cited (traceability)?