top | item 24283417

(no title)

stx | 5 years ago

> What triggers writing a test is what matters. Overzealous testers test for each new public method in a class.

I have seen this before. At one company I forced by a couple of other developers to write tests for accessors(get/set) on model classes. They would reject my PR if I didn't do it. To leadership it looked like I was against automated testing.

To me its more important to write tests for places where your most likely to make mistakes. For example calculations or business logic or how the view renders your model as it changes. Not every single small method.

discuss

order

No comments yet.