CS FundamentalsHardProduct-company placement

Match each test smell with its description. P. Assertion roulette Q. Mystery guest R. Eager test S. Sleepy test 1. Depends on an external file or database row not visible in the test. 2. Waits a fixed time with sleep() for something asynchronous to finish. 3. Has many unlabelled assertions, so a failure doesn't say which check broke. 4. Exercises several unrelated behaviours of the object in one test.

  1. A. P-3, Q-1, R-4, S-2
  2. B. P-4, Q-1, R-3, S-2
  3. C. P-3, Q-2, R-4, S-1
  4. D. P-1, Q-3, R-4, S-2

Correct answer: A. P-3, Q-1, R-4, S-2

Assertion roulette hides which assertion failed; a mystery guest relies on unseen fixtures; an eager test checks too much at once; sleeping makes tests slow and flaky.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic