Back to Practice
Testing & DevOpsDebuggingHard
Interview Challenge
Repair a Brittle Apex Unit Test
Review an Apex unit test that depends on organization data and makes no meaningful assertion.
Challenge
Version 1
Inspect the evidence
Artifact / implementation
Review the supplied code, configuration or trace before proposing a fix.
@IsTest(SeeAllData=true)
private class AccountServiceTest {
@IsTest
static void testUpdateAccounts() {
Account acc = [SELECT Id, Description FROM Account LIMIT 1];
AccountService.process(acc.Id);
System.assert(true);
}
}Response workspace
Identify the issue, explain why it is a problem, and describe the fix. Include both your analysis and corrected solution below.
0 analysis characters
0 solution characters