• RonSijm
    link
    fedilink
    arrow-up
    2
    ·
    3 months ago

    In C# I’m generally using Verify for these happyflow tests - So instead of explitly testing every individual property, you just do Verify(state); and compare the entire state against a json saved state.

    A little bit for the same reason of “testing fatigue” - having to manually rewrite assertions of a lot of tests is getting annoying. With that approach you just do a merge compare between results, accept them, and you’re done

    • lysdexicOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      3 months ago

      In C# I’m generally using Verify for these happyflow tests (…)

      I don’t think this is related to this topic. The problem domain cover the exact opposite of happy flow tests: it’s about maximizing edge case coverage by minimizing the amount of tests required. This has nothing to do with what invariants you’re tracking, but how many tests you are using to cover the paths you’re covering and how to tell which tests you can dump while keeping the same coverage.