General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Theo - t3․gg
comments
Comments by "" (@grokitall) on "The ONLY REASON To Unit Test" video.
end to end tests are not usually integration tests, but are instead acceptance tests, which serve a different purpose. unit tests and integration tests are used by continuous integration to regression test your public api. they tell you if you built what you intended to build. acceptance tests are done after continuous integration is done, and tell you if what you intended to build is what the customer wanted. as most typical projects have 60% of the requirements being unknowable until you start building it, knowing this difference matters. i tend not to see many tests which have high utility which are end to end or ui tests. they are needed for regression testing, but tend to be both slow and fragile.
1
@havokgames8297 not sure i would agree. the purpose of the higher level tests is to make a stable public api, after which you can change anything underneath even to the extent of keeping the header file and throwing everything else away. you can also test your private code, but it should already be covered by the high level tests, or be dead code which is never used.
1
which is why continuous integration uses regression testing of the public api, admittedly implemented with unit tests, rather than a unit test everywhere approach. it is also why it ends up with near 100% coverage, as the public api should be stable between major versions.
1
this is why continuous integration uses automated regression testing of the public api, rather than a simplistic cover everything with unit tests approach. as your public api should be stable between major versions, the tests don't break, or if they do, you find out before your users. because your public api is stable and does not expose internal details, you do not need to write tests for your private code, as it already gets called with yhe existing tests or it is dead code and can just be deleted.
1