4 ms·
Writing tests seems to actually be the easy part. Figuring out what to test is the hard part. Integration tests or unit tests. To mock or not to mock. How deep
by nickthemagicman 8y ago
Writing tests seems to actually be the easy part.
Figuring out what to test is the hard part.
Integration tests or unit tests.
To mock or not to mock.
How deep to test my logic in controllers.
How many edge cases is enough.
And no matter how good your tests are you can still get bugs.
Good QA people are worth their weight in gold.
- AdamM12 8y agoDoing Django dev right now. I always right unit tests for a component but not necessarily integration tests. Depends on whether or not the component interacts with an outside system (db, redis, aws, etc.). Always mock those systems if the component does. Also always assert as specific as possible on those mocks. I usually find by the time I have to write integration tests the majority of the issues are worked out as long as I'm very diligent about mocking the return values correctly.