Question 680
At fictional Yorkshire Housing, the Business Central development team is supporting property service charges and reviewing automated testing and diagnostics during an extension upgrade rehearsal (MB820-5.1-163). The observed development issue is that a test alters live customer records because the developer runs the suite against production data. Which Business Central or AL development principle best explains the right response?
Explanation
Correct Answer
The governing principle is that test isolation must include the underlying business database. The engineering response is to run Business Central tests using an isolated test environment and controlled fixtures. Verification should show that the test creates and cleans up synthetic records without touching production customers.
Incorrect Answers
The proposed “Integration tests should isolate consequential external actions” tests a different control: use controlled HTTP mocks or supported test isolation and fixture responses. The reported condition is that a test alters live customer records because the developer runs the suite against production data; the more direct action is to run Business Central tests using an isolated test environment and controlled fixtures.
“Regression testing needs executable assertions, not only manual exploration” supports the separate task “create AL test codeunits with [Test] procedures covering success and rejection branches”, not the reported problem: a test alters live customer records because the developer runs the suite against production data. This case instead calls for “run Business Central tests using an isolated test environment and controlled fixtures”.
“Upgrade testing differs from clean-install testing” concerns the separate step “seed an older app version with representative data then test upgrade preservation”. The reported issue is that a test alters live customer records because the developer runs the suite against production data, so the direct response is to run Business Central tests using an isolated test environment and controlled fixtures.