{
  "id": 14722989,
  "title": "Treat Your Demo Environment Like a Test Fixture",
  "url": "https://urgent.news/2026/10/15/treat-your-demo-environment-like-a-test-fixture",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-15T15:11:46.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/demovexa/treat-your-demo-environment-like-a-test-fixture-45dj"
  },
  "original_language": "en",
  "account": "When a feature demo requires multiple attempts, the root cause is often the application, not the person recording it. Common issues include changing toast notifications, sorting discrepancies, and varying timestamps. Developers are familiar with this kind of problem, which is similar to what causes tests to be flaky - uncontrolled state. To resolve this, treat the demo environment like a test fixture, ensuring known data, a fixed starting point, and consistency between runs. This article focuses on that setup. Recording screen sessions is helpful, but creating demo videos from code can also be beneficial. Key takeaways for minimizing demo retakes include:\n\n1. Deterministic means for a demo: A test is deterministic when the same input produces the same output every time. For demos, this means consistent data, screen appearance, and timing. Common issues include relative times, random IDs, sorting dependencies, background jobs, feature flags, and development-only UI elements. Addressing these issues creates a stable demo environment.\n\n2. Seed script: Develop a one-command script to create demo data, ensuring consistent starting conditions. Incorporate principles like believable names, fixed dates, stable order, and no real customer data.\n\n3. Reset command: Create a reset command that returns the demo environment to its original state after each take. Use a separate demo account or tenant and ensure it cannot be run on production.\n\n4. Pin the screen: Utilize a production build for demos, match the window size to what users see, and configure the environment to remove overlays and distractions.\n\n5. Freeze time and quiet the background: Control timestamps using a fixed clock or demo mode, disable background jobs and websockets, and minimize OS notifications.\n\n6. Match feature flags: Ensure the demo reflects the state users will actually experience by incorporating feature flag values into the demo configuration.\n\nBefore recording, perform a walkthrough of the flow using a script or Playwright test. This will help identify potential issues and confirm that the demo looks as expected.",
  "summary": "When a feature demo takes far more takes than it should, the cause is often the app, not the person recording it. A toast from a background job slides in. A table sorts differently than it did last time. A timestamp says \"3 minutes ago\" in one take and \"11 minutes ago\" in the next. A dev overlay sits in the corner of every frame. Developers already know this kind of problem. It's the same thing…",
  "key_points": [
    "Treat demo environment like test fixture for consistent results",
    "Develop seed script for stable demo data and conditions",
    "Create reset command to return environment to original state"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}