Question 640
Two warehouse tests pass separately but fail together because one test leaves mutated records behind. A targeted trial still reproduces the original gap after the team attempted this change: Use suitable test transaction isolation and controlled fixture setup. Which repair directly addresses the remaining defect?
Explanation
Correct Answer
Adjust test isolation or fixture cleanup so each test begins from a known database state. This directly addresses the remaining defect for the requirement—Two warehouse tests pass separately but fail together because one test leaves mutated records behind. It restores the mechanism described here: independent test transactions and deliberate isolation prevent one test's data changes from corrupting later test outcomes.
Incorrect Answers
This correction is for the separate condition: A codeunit test triggers a lookup dialog and fails without a UI session. It would not directly restore the intended behavior in this situation: Two warehouse tests pass separately but fail together because one test leaves mutated records behind. Here, adjust test isolation or fixture cleanup so each test begins from a known database state, because independent test transactions and deliberate isolation prevent one test's data changes from corrupting later test outcomes.
This correction is for the separate condition: Developers want to execute installed sample tests before shipping a payment extension to customers. It would not directly restore the intended behavior in this situation: Two warehouse tests pass separately but fail together because one test leaves mutated records behind. Here, adjust test isolation or fixture cleanup so each test begins from a known database state, because independent test transactions and deliberate isolation prevent one test's data changes from corrupting later test outcomes.
This correction is for the separate condition: A warehouse integration test has no assertion about actual records written after the service call. It would not directly restore the intended behavior in this situation: Two warehouse tests pass separately but fail together because one test leaves mutated records behind. Here, adjust test isolation or fixture cleanup so each test begins from a known database state, because independent test transactions and deliberate isolation prevent one test's data changes from corrupting later test outcomes.





Microsoft Dynamics 365 Business Central Developer (MB-820) Practice Tests