|
|
|
|
|
by BeetleB
1464 days ago
|
|
> It's easier conceptually go to 'up' the testing tree from unit tests to E2E tests, than it is to come down. It all depends on the language and the project, but my experience is usually the opposite. It's often much easier to write an end to end test. To be able to write a unit test you usually have to architect the code to make it easy to mock, etc - and that takes significant skill for most real world projects. E2E tests have a lot of downsides, but being challenging to write is probably not one of them. |
|
My experience agrees with this. Adding unit tests to untestable code (think: class has 10 dependencies that it news up being the first branching of a depdendecy graph to be untangled) requires refactors that just don’t get done with the busyness of other priorities.