66
mathume
78d

Reviewer: your pr has unit tests
Me: yes
Reviewer: well, we never had unit tests, this is kind of an issue, not sure how to handle this right now

return "LOL"

Comments
  • 3
    Well, then...consider the envelope pushed
  • 1
    integration tests > unit tests
  • 4
    @bioDan I hope you're kidding. People at my workplace might take you seriously (if they figure out the difference between these two).
    Both are important.
  • 1
    @dr-ant both are important, you are right. But if i had to pick one it would be integration tests
  • 4
    @bioDan makes sense. But you shouldn't have to choose. If integration tests play the role of unit tests, the advantages are all lost. Tests become fickle. It's hard to find out what went wrong. It's costly to fix. It becomes harder to change code and that's good you end up with debt laden legacy code.
  • 2
    @dr-ant well it depends on many cases like your infrastructure, the software architecture, how frequently you change components and features, and more.

    So the other side of the coin, for example in MV* architectures, integration tests can help identify false-positive and false-negative scenarios that unit test would fail to identify. Especially since most back-end and front-end components are interconnected and are expected to function together in a pre-defined order.

    *** INSERT 2 unit tests 0 integration tests MEME ***

    https://duckduckgo.com//...
  • 1
    @bioDan yeah that's why both are required. Most projects need the whole coin, not just one side of it. ^^
    I have come to believe that every project in active development can benefit from well defined unit tests coupled with good integration tests.
  • 2
    I’d consider agreeing;

    If you add the first unit test setup ever you should probably do that in a separate commit.

    After unit tests setup is done then of course tests should be included in the same PR as their associated code.

    But when you introduce a new process that can belong in a separate pr
  • 0
    @jiraTicket i agree generally, only that in this case it is plain python unittest, it's already there :)
Add Comment