How do you test external HTTP integrations?
Separate unit tests using mocked clients from integration tests against a sandbox or controlled test server.
The question library
Explore practical questions, clear explanations, and code examples across developer technologies.
Showing 3577–3588 of 3610 questions
Separate unit tests using mocked clients from integration tests against a sandbox or controlled test server.
Contract testing checks that a provider and consumer agree on request/response shapes and semantics.
Test producers and consumers against a real or containerized broker when broker semantics matter.
End-to-end tests exercise a complete user journey through the running system, often via the browser or public API.
Playwright is a browser automation framework supporting Chromium, Firefox, and WebKit, with auto-waiting, locators, browser contexts, and tracing.
Cypress is a web testing framework with a browser-based runner, retryable commands, and strong debugging support.
Prefer user-facing selectors such as role, accessible name, label, and stable test IDs.
Prefer auto-waiting assertions for specific states over arbitrary sleep calls.
Test authentication itself in dedicated scenarios and reuse authenticated storage state for unrelated tests when appropriate.
Playwright route interception can provide deterministic responses or simulate failures.
Run selected UI tests at representative viewport sizes and, where necessary, device profiles.
Visual regression testing compares screenshots or rendered output against approved baselines to detect unintended UI changes.