Save the code or save the tests? (2020)
1–10 of 33 posts
Re: Save the code or save the tests? (2020)
#2Re: Save the code or save the tests? (2020)
#3^^ comment from someone named hobbs
Exactly. Users can tolerate an app that's kinda broken in some ways, but tests don't make money. In fact tests can often cost money anyway if they're not testing what's really important. No matter what, there are going to be parts of your code that simply cannot be described by the tests that were written.
Re: Save the code or save the tests? (2020)
#4Re: Save the code or save the tests? (2020)
#5Even IF I ever wrote unit tests for it - which I don't do and have never done for anything - those unit tests wouldn't have anything in them from which I could reconstruct the UI.
No. You save the code and the surrounding UI and the UI glue code.
Re: Save the code or save the tests? (2020)
#6Re: Save the code or save the tests? (2020)
#7So to rephrase the question: save the code, or save something that makes it easier to change code you no longer have? It seems a bit easier to answer if asked this way...
Re: Save the code or save the tests? (2020)
#8Re: Save the code or save the tests? (2020)
#9Re: Save the code or save the tests? (2020)
#10Surprise, common sense.
Saving the tests is like needing to know the answer to the Ultimate Question of Life, the Universe, and Everything (which is 42) and discarding the question.