One of the biggest truths when it comes to developer testing is that it has to be easy! If it's not easy, we'll simply don't do it. We'll find lots of different excuses, such as "I don't have time", or "Ah, I don't really need to test this", or "It's not worth it". But the thing is: no one says these things if writing the test takes just a few minutes.
I resonate with this post a lot, difficulty of testing has been one of the large barriers my team has had in the past couple of years. My team works on data pipelines that integrate datasets from many different sources, and seeding tests is our biggest challenge because the cardinality of edge cases is so high.
I am currently doing some research and testing with a different paradigm of testing, using live statistical validations rather than the very logical and straight forward "this function takes input x and outputs y, validate y is expected". The main problem we are addressing here is generating combinations of inputs is really hard. Would love to chat with you if you have any insights in this field if you get the chance!
professor, in regards of it has to be easy.. do you have an advice of how to test authentication for apis without duplication. I mean, when we define an api, we add some configuration in that api to inform it can only be accessed by authorized users. So in my tests I have to write a unit test for the authorized and unauthorized case for this api. This goes over and over for every api..