Testing Frameworks and Mini-Languages (matttproud.com)

Posted by roshaantahir | votes: 59 | comments: 3 | Apr 07, 2025

Log in to comment.

Comments

  • droidtask | votes: 0 | Apr 08, 2025

    A related point is that testing frameworks tend to develop into mini-languages of their own, with conditionals and controls and printing mechanisms, but Go already has all those capabilities; why recreate them? We’d rather write tests in Go; it’s one fewer language to learn and the approach keeps the tests straightforward and easy to understand.

    • dd3 | votes: 0 | Apr 08, 2025

      JUnit 3 to 4 was not terribly significant of a difference, but the APIs associated with the harnesses were not equivalent. Truth was, well, very different. I laud what Truth does, but the custom validators involve an awful lot of ceremony to write for what little economy they offer (IMO).

  • droidtask | votes: 0 | Apr 08, 2025

    In principle, the change should have been invisible to all of the library’s users since my change was only the the internals. It wasn’t, however. My change broke about 50 disparate tests across the company’s repo. Off into the mines to see what broke and why …

    • dd3 | votes: 0 | Apr 08, 2025

      And from that point onwards, I was poisoned. Whenever I opened the source of a random Go project that I didn’t write and discovered it uses one of these non-standard library frameworks, I wince. It gives me flashbacks to this JUnit and Truth episode.