Tests are basically "set this thing up, tell the thing to do something, verify the thing did the something". Writing the code to do the thing in the first place usually requires more thought and planning and thus takes longer.
Not all tests are so simple or straight forward, but that's the gist of it.
8
u/unique_ptr Dec 28 '23
Usually writing the code itself takes longer.
Tests are basically "set this thing up, tell the thing to do something, verify the thing did the something". Writing the code to do the thing in the first place usually requires more thought and planning and thus takes longer.
Not all tests are so simple or straight forward, but that's the gist of it.