Skip to content

Instantly share code, notes, and snippets.

@erudenko
Last active April 23, 2025 04:21
Show Gist options
  • Select an option

  • Save erudenko/2a5f013551d56ff4d4b35823f2ef3c82 to your computer and use it in GitHub Desktop.

Select an option

Save erudenko/2a5f013551d56ff4d4b35823f2ef3c82 to your computer and use it in GitHub Desktop.
elevator task

The Broken Elevator

Scenario: You’re testing a building’s elevator system. There are 10 floors, and the elevator should stop at all floors when buttons are pressed.

Problem:

  • You press the buttons for floors 3, 5, and 7. The elevator stops at 3 and 7, but skips 5.
  • You press buttons 2, 4, and 6. It stops at 2 and 6, but skips 4.
  • Now you press 1, 8, and 9. It stops at 1 and 9, but skips 8.

Question: What might be the logic behind the skipped floors? How would you approach debugging this as a QA?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment