Stubbing API Calls in Cypress Tests with cy.intercept
Learn how to use Cypress.io's cy.intercept to stub API calls, create deterministic UI tests, and avoid backend‑induced flakiness while understanding the trade‑offs.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to use Cypress.io's cy.intercept to stub API calls, create deterministic UI tests, and avoid backend‑induced flakiness while understanding the trade‑offs.
Learn how to eliminate duplicated expectations in RSpec by using shared examples with parameters, see a concrete Money/Weight example, and understand the trade‑offs.
Replace fixed sleeps in Vitest with expect.poll to assert eventually true conditions. Learn the mechanics, a worked example, trade-offs, and verification steps for stable
Replace hidden instance-variable dependencies in RSpec before hooks with let and let!. Make setup explicit, lazy where possible, and isolated so failures point to the example.
Learn how to import, run, and export utPLSQL test suites inside SQL Developer, with a step‑by‑step example and notes on limitations.
Re‑use expensive resources in your test suite with pytest’s session and module fixture scopes. Learn how to set up a persistent HTTP client and a per‑file database fixture, verify lifetimes, and avoid shared‑state pitfalls.
Learn how to set up and run JUnit 5 parameterized tests with @CsvSource, handle nulls, escape commas, and troubleshoot common pitfalls. A step‑by‑step guide with examples and validation tips.
Learn how to define shared_examples in RSpec, parameterize them with block arguments, and apply the same behavior to different object types while keeping your test suite DRY and readable.
Replace hard-coded paths with pytest's tmp_path fixture to give each test a unique, isolated temporary directory. Covers basic usage, nested structures, legacy string APIs, session-scoped sharing, retention control, and common failure fixes.