Types of tests
Unit tests check one small piece of code (a function or class) in isolation and run in milliseconds. Integration tests check that several parts work together, for example your code plus a real database or a real HTTP client against a running service. End-to-end (E2E) tests drive the whole system the way a user would, through the UI or the public API, and are the slowest and most fragile.
Contract tests check that a service and its consumer agree on the shape of an API (fields, types, status codes), so each side can be tested and deployed without running the other. A quick way to classify a test: ask what it talks to. Only in-process code means unit; a real external component means integration; the whole deployed system means E2E.