Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

16
  • 2
    "High-level" in the test pyramid sense and "high-level" in behavioral tests sense are not the same. One is about the scope of what's under test, the other is about how you express, in code, the rules and relationships pertaining to the component being tested (i.e. is the test explicitly expressing a rule or a constraint, or are you implicitly testing the rule by relying on specific values and implementation details). Commented May 29, 2023 at 7:25
  • 2
    The entire point of unit tests is to test behaviour, not implementation. Even something notionally as simple as multiplication could be implemented in totally different ways, and the test shouldn't care. Commented May 29, 2023 at 8:24
  • 1
    Hi Doc, my question is precisely about the "guideline" and about this mapper example which is very common (maybe 80% of apps ?). How can I rephrase it so it fits your standards ? Commented May 29, 2023 at 9:22
  • 2
    I tried to answer several times and every time I tried I realised how many things the OP was conflating or assuming. I think, @Tristan, you should read more about this topic (Pyramid) to realise that it has nothing to do with how many tests (of one type or another) you write. It's not even a best practice or principle. It's not a technique either. It's a strategy to balance the cost/time of systems testing. The pyramid illustrates how most of the confidence (and savings) comes from tests cheap to write, easy to change, fast to execute, but overall, deterministic. Commented May 29, 2023 at 13:52
  • 1
    Really sorry to see this closed. I think this is a good challenging question. It had me contemplating how much of the test pyramid is based in structural thinking. Pity it went this way. Commented May 30, 2023 at 5:36