Feb 4, 2023
4
Level 4
Example of a case where unit tests pass but not the feature test
I've been reading (and checking some nice gifs) about how you can have unit tests that pass but have a failed integration of what those tests test. The problem is I can't think of an example of how I can have these two things at the same time: failing integration put passing units in my code.
Can you please help me with examples? Code or external sources are ok.
Level 11
Imagine a few Auth tests.
Unit tests:
- Test the permission list of a certain user returns correct permissions
- Test the password is encrypted correctly when user is created
Feature/integration tests:
- Registration form filled in to get the correct role/permission
- Profile update password form updates data correctly
So it's about the same data, but internal checks may work correctly, but the features "from outside" may be called incorrectly or depend on each other in a wrong way.
1 like
Please or to participate in this conversation.