All jobs / Backend developer / Testing

Backend developer interview question · 0–1 years

A teammate calls their test a unit test, but it starts a database container and an HTTP server. Does the label matter?

The strongest answer

Yes — a unit test exercises one behaviour with no database, network, clock or filesystem, so it is fast and deterministic; what they have is an integration test, which is fine but belongs in a slower stage

Why it works

Exactly — the label sets the expectation: runs on every save, deterministic, and never red because something else was down.

What a good answer covers

Answers that fall short

Who gets asked this

More Testing questions