One thing I have struggled with in the past is the balance between unit tests and end to end tests.
Unit tests usually feel too tightly coupled with the implementation and need to be constantly changed. And because they don't test integrations between the components I still find that most of the potential bugs go untested.
End to end on the other hand are amazing. I find that they catch a lot of errors. It's impossible to test everything though as they end up being quite slow and you get an explosion of input parameters combinations.
So I end up writing a lot of end to end tests and just unit test the critical parts of my code.
Yeah, it does become a bit tedious to change my unit tests every time I make some modifications to my code. I'm trying out different testing methodologies at the moment, and your method seems like it could save a lot of time.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great introduction to testing in Go!
One thing I have struggled with in the past is the balance between unit tests and end to end tests.
Unit tests usually feel too tightly coupled with the implementation and need to be constantly changed. And because they don't test integrations between the components I still find that most of the potential bugs go untested.
End to end on the other hand are amazing. I find that they catch a lot of errors. It's impossible to test everything though as they end up being quite slow and you get an explosion of input parameters combinations.
So I end up writing a lot of end to end tests and just unit test the critical parts of my code.
Yeah, it does become a bit tedious to change my unit tests every time I make some modifications to my code. I'm trying out different testing methodologies at the moment, and your method seems like it could save a lot of time.