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.
- A. P-3, Q-1, R-4, S-2
- B. P-4, Q-1, R-3, S-2
- C. P-3, Q-2, R-4, S-1
- 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.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A state machine has 4 states and 3 possible events, with 5 valid transitions defined. A tester also wants negative tests for every (state…
- For integer x, what is the weakest precondition wp(if x > 0 then y := x else y := −x, y ≥ 2)?
- An IDE has a small core that loads, at start-up, independently developed extensions which register through defined extension points. Which…
- An order flow touches payment, inventory and shipping services. In design 1 each service reacts to events from the others; in design 2 one…
- A producer emits 10,000 events per second into a stream whose consumer can process 2,000 per second. Which reactive-streams mechanism lets…
- A table of user events is sharded by event date, and all writes for today land on one shard, which is overloaded while others sit idle…