@palerock/exam-qa 1.0.6-patch19 → 1.0.6-patch20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map +1 -1
  2. package/lib-json/Dev1/346/250/241/346/213/237/345/215/267A.json +2 -2
  3. package/lib-json/Dev1/346/265/201/347/250/213/350/207/252/345/212/250/345/214/226/344/270/216/351/200/273/350/276/2211.json +2 -2
  4. package/lib-json/[DEV2]Salesforce/345/237/272/347/241/200.json +375 -0
  5. package/lib-json/[DEV2]/346/200/247/350/203/275.json +728 -0
  6. package/lib-json/[DEV2]/346/250/241/346/213/237/345/215/267A.json +1403 -0
  7. package/lib-json/[DEV2]/346/250/241/346/213/237/345/215/267B.json +1387 -0
  8. package/lib-json/[DEV2]/346/265/213/350/257/225/344/270/216/351/203/250/347/275/262.json +828 -0
  9. package/lib-json/[DEV2]/347/224/250/346/210/267/347/225/214/351/235/2421.json +977 -0
  10. package/lib-json/[DEV2]/347/224/250/346/210/267/347/225/214/351/235/2422.json +667 -0
  11. package/lib-json/[DEV2]/351/200/273/350/276/221/343/200/201/346/265/201/347/250/213/350/207/252/345/212/250/345/214/226/345/222/214/351/233/206/346/210/2201.json +1387 -0
  12. package/lib-json/[DEV2]/351/200/273/350/276/221/343/200/201/346/265/201/347/250/213/350/207/252/345/212/250/345/214/226/345/222/214/351/233/206/346/210/2202.json +260 -0
  13. package/lib-json/map.json +9 -0
  14. package/package.json +2 -1
  15. package/lib-json/Salesforce-Admin(302)-[Set-10].json +0 -321
  16. package/lib-json/Salesforce-Admin(302)-[Set-1].json +0 -301
  17. package/lib-json/Salesforce-Admin(302)-[Set-2].json +0 -325
  18. package/lib-json/Salesforce-Admin(302)-[Set-3].json +0 -305
  19. package/lib-json/Salesforce-Admin(302)-[Set-4].json +0 -325
  20. package/lib-json/Salesforce-Admin(302)-[Set-5].json +0 -329
  21. package/lib-json/Salesforce-Admin(302)-[Set-6].json +0 -322
  22. package/lib-json/Salesforce-Admin(302)-[Set-7].json +0 -321
  23. package/lib-json/Salesforce-Admin(302)-[Set-8].json +0 -321
  24. package/lib-json/Salesforce-Admin(302)-[Set-9].json +0 -325
  25. package/lib-json/Salesforce-Admin-201-[Set-10].json +0 -769
  26. package/lib-json/Salesforce-Admin-201-[Set-1].json +0 -604
  27. package/lib-json/Salesforce-Admin-201-[Set-2].json +0 -621
  28. package/lib-json/Salesforce-Admin-201-[Set-3].json +0 -650
  29. package/lib-json/Salesforce-Admin-201-[Set-4].json +0 -636
  30. package/lib-json/Salesforce-Admin-201-[Set-5].json +0 -640
  31. package/lib-json/Salesforce-Admin-201-[Set-6].json +0 -640
  32. package/lib-json/Salesforce-Admin-201-[Set-7].json +0 -592
  33. package/lib-json/Salesforce-Admin-201-[Set-8].json +0 -539
  34. package/lib-json/Salesforce-Admin-201-[Set-9].json +0 -539
  35. package/lib-json/Salesforce-Certified-Platform-Developer-1-[Set-1].json +0 -321
  36. package/lib-json/Salesforce-Certified-Platform-Developer-1-[Set-2].json +0 -325
  37. package/lib-json/Salesforce-Certified-Platform-Developer-1-[Set-3].json +0 -321
  38. package/lib-json/Salesforce-Certified-Platform-Developer-1-[Set-4].json +0 -337
  39. package/lib-json/Salesforce-Certified-Platform-Developer-1-[Set-5].json +0 -329
  40. package/lib-json/Salesforce-Certified-Platform-Developer-1-[Set-6].json +0 -325
  41. package/lib-json/Salesforce-Certified-Platform-Developer-1-[Set-7].json +0 -480
  42. package/lib-json/Salesforce-Sales-Cloud-Certification(81)-[Set-1].json +0 -305
  43. package/lib-json/Salesforce-Sales-Cloud-Certification(81)-[Set-2].json +0 -297
  44. package/lib-json/Salesforce-Sales-Cloud-Certification(81)-[Set-3].json +0 -269
  45. package/lib-json/Salesforce-Sales-Cloud-Certification(81)-[Set-4].json +0 -309
  46. package/lib-json/Salesforce-Sales-Cloud-Certification(81)-[Set-5].json +0 -515
  47. package/lib-json/app-builder-01.json +0 -1
  48. package/lib-json/app-builder-02.json +0 -1
  49. package/lib-json/app-builder-03.json +0 -1
  50. package/lib-json/app-builder-04.json +0 -1
  51. package/lib-json/app-builder-05.json +0 -1
  52. package/lib-json/app-builder-06.json +0 -1
  53. package/lib-json/app-builder-07.json +0 -1
  54. package/lib-json/app-builder-08.json +0 -1
  55. package/lib-json/app-builder-09.json +0 -1
  56. package/lib-json/app-builder-10.json +0 -1
  57. package/lib-json/app-builder-11.json +0 -311
@@ -0,0 +1,828 @@
1
+ {
2
+ "title": "测试与部署",
3
+ "category": "Dev2-自由部落侠",
4
+ "questions": [
5
+ {
6
+ "describe": "An end user reports that a Lightning component is performing poorly.\nWhich two steps should be taken in production to investigate? Choose 2 answers",
7
+ "answerOptions": [
8
+ {
9
+ "describe": "Enable Debug Mode for Lightning components.",
10
+ "isRight": false
11
+ },
12
+ {
13
+ "describe": "Print console.log() statements to identify where actions are deplayed.",
14
+ "isRight": true
15
+ },
16
+ {
17
+ "describe": "Use the Salesforce Lightning Inspector Chrome extension.",
18
+ "isRight": true
19
+ },
20
+ {
21
+ "describe": "Add a trace flag to the user who reported the issue.",
22
+ "isRight": false
23
+ }
24
+ ],
25
+ "hashCode": "2019147344",
26
+ "analysis": ""
27
+ },
28
+ {
29
+ "describe": "UC allows customers to log into a Salesforce Community and update their orders via a custom Visualforce page. Universal Containers' sales representatives can edit the orders on the same Visualforce page.\nWhat should a developer use in an Apex test class to test that record sharing is enforced on the Visualforce page?",
30
+ "answerOptions": [
31
+ {
32
+ "describe": "Use System.profileIs() to test as an administrator and a community user.",
33
+ "isRight": false
34
+ },
35
+ {
36
+ "describe": "Use System.runAs() to test as a sales rep and a community user.",
37
+ "isRight": true
38
+ },
39
+ {
40
+ "describe": "Use System.profileIs() to test as a sales rep and a community user.",
41
+ "isRight": false
42
+ },
43
+ {
44
+ "describe": "Use System.runAs() to test as an administrator and a community user.",
45
+ "isRight": false
46
+ }
47
+ ],
48
+ "hashCode": "2019147320",
49
+ "analysis": ""
50
+ },
51
+ {
52
+ "describe": "How should a developer assert that a trigger with an asynchronous process has successfully run?",
53
+ "answerOptions": [
54
+ {
55
+ "describe": "Create all test data, use @future in the test class, then perform assertions.",
56
+ "isRight": false
57
+ },
58
+ {
59
+ "describe": "Create all test data in the test class, invoke Test.startTest() and Test.stopTest() and then perform assertions,",
60
+ "isRight": true
61
+ },
62
+ {
63
+ "describe": "Insert records Into Salesforce, use seeAllData=true, then perform assertions.",
64
+ "isRight": false
65
+ },
66
+ {
67
+ "describe": "Create all test data in the test class, use system.runAs() to invoke the trigger, then perform assertions.",
68
+ "isRight": false
69
+ }
70
+ ],
71
+ "hashCode": "2019146633",
72
+ "analysis": ""
73
+ },
74
+ {
75
+ "describe": "A developer wrote an Apex method that makes an HTTP callout to an external system to get specialized data when a button is clicked from a custom Lightning web component on the Account record page.\nRecently, users have complained that it takes longer than desired for the data to appear on the page after clicking the button.\nWhat should the developer use to troubleshoot this Issue?",
76
+ "answerOptions": [
77
+ {
78
+ "describe": "Lightning Inspector",
79
+ "isRight": true
80
+ },
81
+ {
82
+ "describe": "Developer Console",
83
+ "isRight": false
84
+ },
85
+ {
86
+ "describe": "Salesforce CLI",
87
+ "isRight": false
88
+ },
89
+ {
90
+ "describe": "Event Logs",
91
+ "isRight": false
92
+ }
93
+ ],
94
+ "hashCode": "2019146603",
95
+ "analysis": ""
96
+ },
97
+ {
98
+ "describe": "What are three reasons that a developer should write Jest tests for Lightning web components?\nChoose 3 answers",
99
+ "answerOptions": [
100
+ {
101
+ "describe": "To verify that events fire when expected",
102
+ "isRight": true
103
+ },
104
+ {
105
+ "describe": "To test basic user interaction",
106
+ "isRight": true
107
+ },
108
+ {
109
+ "describe": "To verify the DOM output of a component",
110
+ "isRight": true
111
+ },
112
+ {
113
+ "describe": "To test how multiple components work together",
114
+ "isRight": false
115
+ },
116
+ {
117
+ "describe": "To test a component's non public properties",
118
+ "isRight": false
119
+ }
120
+ ],
121
+ "hashCode": "2019146573",
122
+ "analysis": "https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.testing"
123
+ },
124
+ {
125
+ "describe": "A developer recently released functionality to production that performs complex commission calculations in Apex code called from an Opportunity trigger . Users report that the calculations seem incorrect because the values they see for commissions are wrong.\nThe developer has representative test data in their developer sandbox.\nWhich three tools or techniques should the developer use to execute the code and pause it at key lines to visually inspect values of various Apex variables?\nChoose 3 answers",
126
+ "answerOptions": [
127
+ {
128
+ "describe": "Developer Console",
129
+ "isRight": true
130
+ },
131
+ {
132
+ "describe": "Visual Studio Code",
133
+ "isRight": true
134
+ },
135
+ {
136
+ "describe": "Breakpoints",
137
+ "isRight": false
138
+ },
139
+ {
140
+ "describe": "Apex Replay Debugger",
141
+ "isRight": true
142
+ },
143
+ {
144
+ "describe": "Workbench",
145
+ "isRight": false
146
+ }
147
+ ],
148
+ "hashCode": "2019146542",
149
+ "analysis": ""
150
+ },
151
+ {
152
+ "describe": "A developer has a Visualforce page that automatically assigns ownership of an Account to a queue upon save.The page appears to correctly assign ownership, but an assertion validating the correct ownership fails.\nWhat can cause this problem?",
153
+ "answerOptions": [
154
+ {
155
+ "describe": "The test class does not retrieve the updated value from the database.",
156
+ "isRight": true
157
+ },
158
+ {
159
+ "describe": "The test class does not use the seeAllData=true annotation.",
160
+ "isRight": false
161
+ },
162
+ {
163
+ "describe": "The test class does not use the Bulk API for loading test data.",
164
+ "isRight": false
165
+ },
166
+ {
167
+ "describe": "The test class does not implement the Queueable interface.",
168
+ "isRight": false
169
+ }
170
+ ],
171
+ "hashCode": "2019146515",
172
+ "analysis": ""
173
+ },
174
+ {
175
+ "describe": "Universal Containers (UC) currently does all development in its full copy sandbox.\nRecently, UC has projects that require multiple developers to develop concurrently. UC is running into issues with developers making changes that cause errors in work done by other developers.\nAdditionally, when they are ready to deploy, many unit tests fail which prevents the deployment.\nWhich three types of orgs should be recommended to UC to eliminate these problems?\nChoose 3 answers",
176
+ "answerOptions": [
177
+ {
178
+ "describe": "Data Migration org",
179
+ "isRight": true
180
+ },
181
+ {
182
+ "describe": "Development org",
183
+ "isRight": true
184
+ },
185
+ {
186
+ "describe": "Staging org",
187
+ "isRight": true
188
+ },
189
+ {
190
+ "describe": "Systems Integration org",
191
+ "isRight": false
192
+ },
193
+ {
194
+ "describe": "Continuous Integration (CI) Org",
195
+ "isRight": false
196
+ }
197
+ ],
198
+ "hashCode": "2019146507",
199
+ "analysis": ""
200
+ },
201
+ {
202
+ "describe": "A developer is debugging an Apex-based order creation process that has a requirement to have three savepoints, SP1, SP2, and SP3 (created in order, before the final execution of the process.\nDuring the final execution process, the developer has a routine to roll back to SP1 for a given condition. Once the condition is fixed, the code then calls a roll back to SP3 to continue with final execution. However, when the roll back to SP3 is called, a runtime error occurs.\nWhy does the developer receive a runtime error?",
203
+ "answerOptions": [
204
+ {
205
+ "describe": "The developer used too many savepoints in one trigger session.",
206
+ "isRight": false
207
+ },
208
+ {
209
+ "describe": "The developer has too many DML statements between the savepoints.",
210
+ "isRight": false
211
+ },
212
+ {
213
+ "describe": "SP3 became invalid when SP1 was rolled back.",
214
+ "isRight": true
215
+ },
216
+ {
217
+ "describe": "The developer should have called SP2 before calling SP3.",
218
+ "isRight": false
219
+ }
220
+ ],
221
+ "hashCode": "2019146483",
222
+ "analysis": ""
223
+ },
224
+ {
225
+ "describe": "A developer is writing a lest test for a Lightning web component that conditionally displays child components based on a user's checkbox selections.\nWhat should the developer do to properly test that the correct components display and hide for each scenario?",
226
+ "answerOptions": [
227
+ {
228
+ "describe": "Reset the DOM after each test with the afterEach{} method.",
229
+ "isRight": false
230
+ },
231
+ {
232
+ "describe": "Add a teardown block to reset the DOM after each test.",
233
+ "isRight": false
234
+ },
235
+ {
236
+ "describe": "Create a new describe block for each test.",
237
+ "isRight": true
238
+ },
239
+ {
240
+ "describe": "Create a new ladom instance for each test.",
241
+ "isRight": false
242
+ }
243
+ ],
244
+ "hashCode": "2019146477",
245
+ "analysis": ""
246
+ },
247
+ {
248
+ "describe": "A developer wrote a trigger on Opportunity that will update a custom Last Sold Date field on the Opportunity's Account whenever an \nOpportunity is closed. In the test class for the trigger, the assertion to validate the Last Sold Date field fails.\n\nWhat might be causing the failed assertion?",
249
+ "answerOptions": [
250
+ {
251
+ "describe": "The test dass has not defined an Account owner when inserting the test data.",
252
+ "isRight": false
253
+ },
254
+ {
255
+ "describe": "The test class has not re-queried the Account record after updating the Opportunity.",
256
+ "isRight": true
257
+ },
258
+ {
259
+ "describe": "The test class has not implemented seeAllData=true in the test method.",
260
+ "isRight": false
261
+ },
262
+ {
263
+ "describe": "The test class is not using System.runAs() to run tests as a Salesforce administrator.",
264
+ "isRight": false
265
+ }
266
+ ],
267
+ "hashCode": "2019146451",
268
+ "analysis": ""
269
+ },
270
+ {
271
+ "describe": "How should a devloper verify that a specific Account record is being tested in a test class for a Visualforce controller?",
272
+ "answerOptions": [
273
+ {
274
+ "describe": "Instantiate the page reference in the test class, insert the Account in the test class, then use seeAllData=true to view the Account.",
275
+ "isRight": false
276
+ },
277
+ {
278
+ "describe": "Instantiate the page reference in the test class, insert the Account in the test class, then use System.setParentRecordId( ).get( ) to set the Account ID. ",
279
+ "isRight": false
280
+ },
281
+ {
282
+ "describe": "Insert the Account into Salesforce, instantiate the page reference inthe test class, then use System.setParentRecordId( ).get( ) to set the Account ID.",
283
+ "isRight": false
284
+ },
285
+ {
286
+ "describe": "Insert the Account in the test class, instantiate the page reference in the test class, then use System.currentPageReference( ).getParameters( ).put( ) to set the Account ID.",
287
+ "isRight": true
288
+ }
289
+ ],
290
+ "hashCode": "2019146446",
291
+ "analysis": "https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_system.htm\nhttps://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_System_PageReference_getParameters.htm"
292
+ },
293
+ {
294
+ "describe": "A large company uses Salesforce across several departments. Each department has its own Salesforce Administrator. It was agreed that each \nAdministrator would have their own sandbox in which to test changes.\n\nRecently, users notice that fields that were recently added for one department suddenly disappear without warning. Also, Workflows that \nonce sent emails and created tasks no longer do so.\n\nWhich two statements are true regarding these issues and resolution?Choose 2 answers",
295
+ "answerOptions": [
296
+ {
297
+ "describe": "The administrators are deploying their own Change Sets, thus deleting each other's fields from the objects in production.",
298
+ "isRight": false
299
+ },
300
+ {
301
+ "describe": "A sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to production.",
302
+ "isRight": true
303
+ },
304
+ {
305
+ "describe": "The administrators are deploying their own Change Sets over each other, thus replacing entire Page Layouts and Workflows in Production.",
306
+ "isRight": true
307
+ },
308
+ {
309
+ "describe": "Page Layouts should never be deployed via Change Sets, as this causes Workflows and Field-level Security to be reset and fields to disappear.",
310
+ "isRight": false
311
+ }
312
+ ],
313
+ "hashCode": "2019146420",
314
+ "analysis": ""
315
+ },
316
+ {
317
+ "describe": "Which statement is true regarding savepoints?",
318
+ "answerOptions": [
319
+ {
320
+ "describe": "You can roll back to any savepoint variable created in any order.",
321
+ "isRight": false
322
+ },
323
+ {
324
+ "describe": "Reference to savepoints can cross trigger invocations.",
325
+ "isRight": false
326
+ },
327
+ {
328
+ "describe": "Savepoints are not limited by DML statement governor limits.",
329
+ "isRight": false
330
+ },
331
+ {
332
+ "describe": "Static variables are not reverted during a rollback.",
333
+ "isRight": true
334
+ }
335
+ ],
336
+ "hashCode": "2019146417",
337
+ "analysis": "https://developer.salesforce.com/docs/atlas.en-us.234.0.apexcode.meta/apexcode/langCon_apex_transaction_control.htm"
338
+ },
339
+ {
340
+ "describe": "What is the best practice to initialize a Visualforce page in a test class?",
341
+ "answerOptions": [
342
+ {
343
+ "describe": "Use Test.currentPage.getParameters.put(MyTestPage);",
344
+ "isRight": false
345
+ },
346
+ {
347
+ "describe": "Use Test.setCurrentPage(Page.MyTestPage);",
348
+ "isRight": true
349
+ },
350
+ {
351
+ "describe": "Use Test.setCurrentPage.MyTestPage;",
352
+ "isRight": false
353
+ },
354
+ {
355
+ "describe": "Use controller.currentPage.setPage(MyTestPage);",
356
+ "isRight": false
357
+ }
358
+ ],
359
+ "hashCode": "2019146388",
360
+ "analysis": ""
361
+ },
362
+ {
363
+ "describe": "An Apex class does not achieve expected code coverage. The testSetup method explicitly calls a method in the Apex class. \nHow can the developer generate the code coverage?",
364
+ "answerOptions": [
365
+ {
366
+ "describe": "Call the Apex class method from a testMethod instead of the testSetup method.",
367
+ "isRight": true
368
+ },
369
+ {
370
+ "describe": "Add @testVisible to the method in the class the developer is testing.",
371
+ "isRight": false
372
+ },
373
+ {
374
+ "describe": "Use system.assert() in testSetup to verify the values are being returned.",
375
+ "isRight": false
376
+ },
377
+ {
378
+ "describe": "Verify the user has permissions passing a user into System.runAs().",
379
+ "isRight": false
380
+ }
381
+ ],
382
+ "hashCode": "2019145678",
383
+ "analysis": ""
384
+ },
385
+ {
386
+ "describe": "A developer is trying to access org data from within a test class.\nWhich sObject type requires the test class to have the (seeAllData=true) annotation?",
387
+ "answerOptions": [
388
+ {
389
+ "describe": "RecordType",
390
+ "isRight": false
391
+ },
392
+ {
393
+ "describe": "Report",
394
+ "isRight": true
395
+ },
396
+ {
397
+ "describe": "User",
398
+ "isRight": false
399
+ },
400
+ {
401
+ "describe": "Profile",
402
+ "isRight": false
403
+ }
404
+ ],
405
+ "hashCode": "2019145677",
406
+ "analysis": "https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_data_access.htm"
407
+ },
408
+ {
409
+ "describe": "Just prior to a new deployment, the Salesforce Administrator who configured a new order fulfillment process in a developer sandbox\nsuddenly left the company. The users had fully tested all of the changes in the sandbox and signed off on them.\n\nUnfortunately, although a Change Set was started, it was not complete. A developer is brought in to help finish the deployment.\n\nWhat should the developer do to identify the configuration changes that need to be moved into production?",
410
+ "answerOptions": [
411
+ {
412
+ "describe": "In Salesforce setup, look at the last modified date for every object to determine which should be added to the Change Set.",
413
+ "isRight": false
414
+ },
415
+ {
416
+ "describe": "Use the Metadata API and a supported development IDE to push all of the configuration from the sandbox into production to ensure no changes are lost.",
417
+ "isRight": false
418
+ },
419
+ {
420
+ "describe": "Set up Continuous Integration and a Git repository to automatically merge all changes from the sandbox metadata with the production metadata.",
421
+ "isRight": false
422
+ },
423
+ {
424
+ "describe": "Leveage the Setup Audit Trail to review the changes made by the departed Administrator and identify which changes should be added to the Change Set.",
425
+ "isRight": true
426
+ }
427
+ ],
428
+ "hashCode": "2019145672",
429
+ "analysis": ""
430
+ },
431
+ {
432
+ "describe": "The Contact object in an org is configured with workflow rules that trigger field updates. The fields are not updating, even though the end user expects them to. The developer creates a debug log to troubleshoot the problem.\n\nWhat should the developer specify in the debug log to see the values workflow rule conditions and debug the problem?",
433
+ "answerOptions": [
434
+ {
435
+ "describe": "ERROR level for the Database log category",
436
+ "isRight": false
437
+ },
438
+ {
439
+ "describe": "INFO level for the Workflow log category",
440
+ "isRight": true
441
+ },
442
+ {
443
+ "describe": "ERROR level for the Workflow log category",
444
+ "isRight": false
445
+ },
446
+ {
447
+ "describe": "INFO level for the Database log Category",
448
+ "isRight": false
449
+ }
450
+ ],
451
+ "hashCode": "2019145646",
452
+ "analysis": "https://help.salesforce.com/articleView?id=sf.code_setting_debug_log_levels.htm&type=5"
453
+ },
454
+ {
455
+ "describe": "A company notices that their unit tests in a test class with many methods to create many records for prerequisite reference data are slow. \nWhat can a developer to do address the issue?",
456
+ "answerOptions": [
457
+ {
458
+ "describe": "Move the prerequisite reference data setup to a TestDataFactory and call that from each test method.",
459
+ "isRight": false
460
+ },
461
+ {
462
+ "describe": "Move the prerequisite reference data setup to a @testSetup method in the test class.",
463
+ "isRight": true
464
+ },
465
+ {
466
+ "describe": "Move the prerequisite reference data setup to a static method in the test class and call that from each test method.",
467
+ "isRight": false
468
+ },
469
+ {
470
+ "describe": "Move the prerequisite reference data setup to the constructor for the test class.",
471
+ "isRight": false
472
+ }
473
+ ],
474
+ "hashCode": "2019145612",
475
+ "analysis": ""
476
+ },
477
+ {
478
+ "describe": "A company has many different unit test methods that create Account records as part of their data setup. A new required field was added to the Account and now all of the unit tests fail.\nWhat is the optimal way for a developer to fix the issue?",
479
+ "answerOptions": [
480
+ {
481
+ "describe": "Add a before insert trigger on Account to set the value of the required field.",
482
+ "isRight": false
483
+ },
484
+ {
485
+ "describe": "Add the required field to the data setup for all of the unit tests.",
486
+ "isRight": false
487
+ },
488
+ {
489
+ "describe": "Create a TestDataFactory class that serves as the single place to create Accounts for unit tests and set the required field there.",
490
+ "isRight": true
491
+ },
492
+ {
493
+ "describe": "Change the required field to be a validation rule that excludes the System Administrator profile.",
494
+ "isRight": false
495
+ }
496
+ ],
497
+ "hashCode": "2019145585",
498
+ "analysis": ""
499
+ },
500
+ {
501
+ "describe": "A developer has working business logic code, but sees the following error in the test class:\nYou have uncommitted work pending. Please commit or rollback before calling out.\nWhat is a possible solution?",
502
+ "answerOptions": [
503
+ {
504
+ "describe": "Call support for help with the target endpoint, as it is likely an external code error.",
505
+ "isRight": false
506
+ },
507
+ {
508
+ "describe": "Use test.IsRunningTest( ) before making the callout to bypass it in test execution.",
509
+ "isRight": true
510
+ },
511
+ {
512
+ "describe": "Set seeAllData to \"true\" at the top of the test class, since the code does not fail in practice. ",
513
+ "isRight": false
514
+ },
515
+ {
516
+ "describe": "Rewrite the business logic and test classes with @TestVisible set on the callout.",
517
+ "isRight": false
518
+ }
519
+ ],
520
+ "hashCode": "2019145581",
521
+ "analysis": ""
522
+ },
523
+ {
524
+ "describe": "<p>Consider the following code snippet:</p><p>01 public class with sharing AccountsController{</p><p>02&nbsp;</p><p>03&nbsp; &nbsp; &nbsp;@AuraEnabled</p><p>04&nbsp; &nbsp; &nbsp;public List&lt;Accounts&gt; getAllAccounts() {</p><p>05&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return [SELECT Id, Name, Industry FROM Account];</p><p>06&nbsp; &nbsp; &nbsp;}</p><p>07</p><p>08 }</p><p><br/></p><p>As part of the deployment cycle, a developer creates the following test class:</p><p>01 private class with sharing AccountsController_Test{</p><p>02</p><p>03&nbsp; &nbsp; &nbsp;@TestSetup</p><p>04&nbsp; &nbsp; &nbsp;private sstatic void makeData() {</p><p>05&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;User user1 = [SELECT Id FROM User WHERE Profile.Name = &#39;System Administrator&#39; and isActive = true LIMIT 1];</p><p>06&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;User user2 = [SELECT Id FROM User WHERE Profile.Name = &#39;Standard User&#39; and userName = &#39;test@test.com&#39; and isActive = true LIMIT 1];</p><p>07</p><p>08&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TestUtils.insertAccounts(10, user1.Id);</p><p>09&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TestUtils.insertAccounts(20, user2.Id);</p><p>10&nbsp; &nbsp; &nbsp;}</p><p>11</p><p>12&nbsp; &nbsp; &nbsp;@IsTest</p><p>13&nbsp; &nbsp; &nbsp;private static void getAllAccounts_StandardUser_Test() {</p><p>14</p><p>15&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;List&lt;Account&gt; result = AccountsController.getAllAccounts();</p><p>16&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.assertEquals(20, result.size() );</p><p>17</p><p>18&nbsp; &nbsp; &nbsp;}</p><p>19</p><p>20 }</p><p>When the test class runs, the assertion fails.</p><p>Which change should the developer implement in the Apex test method to ensure the test method executes successfully?</p><p><br/></p>",
525
+ "answerOptions": [
526
+ {
527
+ "describe": "<p>Query the Standard User info memory and enclose lines 14 and 15 within the System.runAs(user) method.</p>",
528
+ "isRight": true
529
+ },
530
+ {
531
+ "describe": "<p>Add System.runAs(User) to line 14 and enclose line 14 within Test.startTest() and Test.stopTest().</p>",
532
+ "isRight": false
533
+ },
534
+ {
535
+ "describe": "<p>Query the Administrator user into memory and enclose lines 14 and 15 within the System.runAs(user) method.</p>",
536
+ "isRight": false
537
+ },
538
+ {
539
+ "describe": "<p>Add @IsTest(seeAllData=true) to line 12 and enclose lines 14 and 15 within Test.startTest() and Test.stopTest().</p>",
540
+ "isRight": false
541
+ }
542
+ ],
543
+ "hashCode": "2019145576",
544
+ "analysis": ""
545
+ },
546
+ {
547
+ "describe": "<p>Refer to the test method below:</p><p>Line 1: @isTest</p><p>Line 2: static void testMyTrigger ( )</p><p>Line 3: {</p><p>Line 4:&nbsp; &nbsp; &nbsp;//Do a bunch of data setup</p><p>Line 5:&nbsp; &nbsp; &nbsp;DataFactory.setupDataForMyTriggerTest ();</p><p>Line 6:</p><p>Line 7:&nbsp; &nbsp; &nbsp;List&lt;Account&gt; acctsBefore = [SELECT Is_Customer__c FROM Account WHERE Id IN :DataFactory.accounts];</p><p>Line 8:</p><p>Line 9:&nbsp; &nbsp; &nbsp;//Utility to assert all accounts are not customers before the update</p><p>Line 10:&nbsp; &nbsp; AssertUtil.assertNotCustomers(acctsBefore);</p><p>Line 11:</p><p>Line 12:&nbsp; &nbsp; //Set accounts to be customers</p><p>Line 13:&nbsp; &nbsp; for(Account a : DataFactory.accounts)</p><p>Line 14:&nbsp; &nbsp; {</p><p>Line 15:&nbsp; &nbsp; &nbsp; &nbsp; a.Is_Customer__c = true;</p><p>Line 16:&nbsp; &nbsp; }</p><p>Line 17:</p><p>Line 18:&nbsp; &nbsp; update DataFactory.accounts;</p><p>Line 19:</p><p>Line 20:&nbsp; &nbsp; List&lt;Account&gt; acctsAfter = [SELECT Number_Of_Transfers__c FROM Account WHERE Id IN :DataFactory.accounts];</p><p>Line 21:</p><p>Line 22:&nbsp; &nbsp; //Utility to assert Number_Of_Transfers__c is correct based on test data</p><p>Line 23:&nbsp; &nbsp; AssertUtil.assertNumberOfTransfers(acctsAfter);</p><p>Line 14: }</p><p>The test method tests an Apex trigger that the developer knows will make a lot of queries when a lot of Accounts are simultaneously updated to be customers.</p><p>The test method fails at the Line 20 because of too many SOQL queries.</p><p>What is the correct way to fix this?</p><p><br/></p>",
548
+ "answerOptions": [
549
+ {
550
+ "describe": "<p>Add Test.startTest( ) before and add Test.stopTest( ) after Line 18 of the code.</p>",
551
+ "isRight": true
552
+ },
553
+ {
554
+ "describe": "<p>Use Limits.getLimitQueries( ) to find the total number of queries that can be issued.</p>",
555
+ "isRight": false
556
+ },
557
+ {
558
+ "describe": "<p>Add Test.startTest( ) before and add Test.stopTest( ) after both Line 7 and Line 20 of the code.</p>",
559
+ "isRight": false
560
+ },
561
+ {
562
+ "describe": "<p>Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced.</p>",
563
+ "isRight": false
564
+ }
565
+ ],
566
+ "hashCode": "2019145551",
567
+ "analysis": ""
568
+ },
569
+ {
570
+ "describe": "<p>A developer wrote the following method to find all the test accounts in the org:</p><p><br/></p><p>public static Account[] searchTestAccounts() {</p><p>List&lt;List&lt;Sobject&gt;&gt; searchList = [ FIND &#39;test&#39; IN ALL FIELDS RETURNING Account (Name)];</p><p>return (Account[]) searchList[0];</p><p>}</p><p><br/></p><p>However, the test method below fails.</p><p><br/></p><p>@isTest .</p><p>public static void testSearchTestAccounts() {</p><p>Account a = new Account (name=&#39;test&#39;);</p><p>insert a;</p><p>Account [] accounts = TestAccountFinder.searchTestAccounts();</p><p>system.assert (accounts.size() == 1 );</p><p>&nbsp;}</p><p><br/></p><p>What should be used to fix this failing test?</p><p><br/></p>",
571
+ "answerOptions": [
572
+ {
573
+ "describe": "<p>Test.loadData to set up expected data</p>",
574
+ "isRight": false
575
+ },
576
+ {
577
+ "describe": "<p>Test.fixedsearchResults() method to set up expected data</p>",
578
+ "isRight": true
579
+ },
580
+ {
581
+ "describe": "<p>@isTest (SeeAllData=true) to access org data for the test</p>",
582
+ "isRight": false
583
+ },
584
+ {
585
+ "describe": "<p>@testsetup method to set up expected data</p>",
586
+ "isRight": false
587
+ }
588
+ ],
589
+ "hashCode": "2019145517",
590
+ "analysis": "<p>https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_SOSL.htm</p>"
591
+ },
592
+ {
593
+ "describe": "<p>A developer created the following test method:</p><p><br/></p><p>@isTest (SeeAllData= true)</p><p>public static void testDeleteTrigger(){</p><p><br/></p><p>Account testAccount = new Account (name = &#39; Test1&#39;);</p><p>Insert testAccount;</p><p><br/></p><p>List&lt;Account&gt; testAccounts = [SELECT Id, Name from Account WHERE Name like &#39; Test &#39;];</p><p>System.assert (testAccounts.size() &gt; 0);&nbsp;</p><p><br/></p><p>delece testAccounts;</p><p>testAccounts = [SELECT Id, Name from Account WHERE Name like &#39; Test &#39;];</p><p>System.assert (testAccounts.size() == 0);</p><p>}</p><p><br/></p><p>The developer org has five accounts where the name starts with &quot;Test&quot;. The developer executes this test in the Developer Console.</p><p>After the test code runs, which statement is true?</p><p><br/></p>",
594
+ "answerOptions": [
595
+ {
596
+ "describe": "<p>The test will fail.</p>",
597
+ "isRight": false
598
+ },
599
+ {
600
+ "describe": "<p>There will be no accounts where the name starts with &quot;Test&quot;.</p>",
601
+ "isRight": false
602
+ },
603
+ {
604
+ "describe": "<p>There will be five accounts where the name starts with &quot;Test&quot;.</p>",
605
+ "isRight": true
606
+ },
607
+ {
608
+ "describe": "<p>There will be six accounts where the name starts with &quot;Test&quot;.</p>",
609
+ "isRight": false
610
+ }
611
+ ],
612
+ "hashCode": "2019145486",
613
+ "analysis": ""
614
+ },
615
+ {
616
+ "describe": "<p>A developer wrote a class named AccounthistoryManager that relies on field history tracking. The class has a static method called getAccountHistory that takes in an Account as a parameter and returns a list of associated AccountHistory object records.</p><p>The following test fails:</p><p><br/></p><p>@isTest</p><p>public static void testAccountHistory() {&nbsp;</p><p>Account a= new Account (Name = &quot;test&quot;);</p><p>insert a;</p><p>a.name =&nbsp; a.name = *1</p><p>Update a;</p><p>List&lt;AccountHistory&gt; ahList = AccounthistoryManager. GetAccounthistory(a);</p><p>System.assert ( ahList.size() &gt; 0 )</p><p><br/></p><p>What should be done to make this test pass?</p><p><br/></p>",
617
+ "answerOptions": [
618
+ {
619
+ "describe": "<p>Use Test.isRunningTest() in getAccountHistory() to conditionally return fake AccountHistory records.</p>",
620
+ "isRight": true
621
+ },
622
+ {
623
+ "describe": "<p>Use @isTest(SeeAllData=true) to see historical data from the org and query for AccountHistory records.</p>",
624
+ "isRight": false
625
+ },
626
+ {
627
+ "describe": "<p>Create AccountHistory records manually in the test setup and write a query to get them.</p>",
628
+ "isRight": false
629
+ },
630
+ {
631
+ "describe": "<p>The test method should be deleted since this code cannot be tested.</p>",
632
+ "isRight": false
633
+ }
634
+ ],
635
+ "hashCode": "2019145485",
636
+ "analysis": ""
637
+ },
638
+ {
639
+ "describe": "<p>A developer created a class that implements the Queueable Interface, as follows:&nbsp;&nbsp;</p><p><br/></p><p>Public class without sharing OrderQueueableJob implements Queueable {</p><p>Public void execute (QueueableContext context) {</p><p>//implementation logic</p><p>System. enqueueJob {new FollowUpJob()};</p><p>}</p><p>}</p><p><br/></p><p>As part of the deployment process, the developer is asked to create a corresponding test class.</p><p>Which two actions should the developer take to successfully execute the test class?</p><p>Choose 2 answers</p><p><br/></p>",
640
+ "answerOptions": [
641
+ {
642
+ "describe": "<p>Ensure the running user of the test class has, at least, the View All permission on the Order object.</p>",
643
+ "isRight": false
644
+ },
645
+ {
646
+ "describe": "<p>Enclose System. enqueueJob (new OrderQueueableJob()} within Test.startTest and Test. stopTest().</p>",
647
+ "isRight": true
648
+ },
649
+ {
650
+ "describe": "<p>Implement seeAllData=true to ensure the Queueable job is able to run in bulk mode.</p>",
651
+ "isRight": false
652
+ },
653
+ {
654
+ "describe": "<p>Implement Test.isRunningTest to prevent chaining jobs during test execution.</p>",
655
+ "isRight": true
656
+ }
657
+ ],
658
+ "hashCode": "2019145461",
659
+ "analysis": ""
660
+ },
661
+ {
662
+ "describe": "<p>Consider the following code snippet:</p><p><br/></p><p>public class searchFeature{</p><p>public sratic List&lt;List&lt;sObject&gt;&gt; searchRecords(string searchquery){</p><p>return[FIND searchquery IN ALL FIELDS RETURNTMNG Account,Opporcunity,Lead];</p><p>}</p><p>}</p><p>A developer created the following test class to provide the proper code coverage for the snippet above:</p><p>@isTest</p><p>private class searchFeature_Test{</p><p><br/></p><p>@TestSetup</p><p>private static void makeData(){</p><p>//insert opportunities, accounts and lead</p><p>}</p><p><br/></p><p>@isTest</p><p>private static searchRecords_Test(){</p><p>List&lt;List&lt;sObjeot&gt;&gt; records=searchFeature,searchReords (&#39;Test &#39;);</p><p>System.assertNotEquals(records .size(),0);</p><p>}</p><p>}</p><p>However,when the test runs,no data is returned and the assertion fails.</p><p>private static void makeData() {</p><p>/ /insert opportunities, accounts and lead</p><p>&nbsp; &nbsp; }</p><p><br/></p><p>@isTest</p><p>private static searchRecords_Test(){</p><p>List&lt;List&lt;sObjeot&gt;&gt; records=searchFeature,searchReords (&#39;Test &#39;);</p><p>System.assertNotEquals(records.size(),0);</p><p>}</p><p>}</p><p>However, when the test runs, no data is returned and the assertion fails.</p><p><br/></p><p>Which edit should the developer make to ensure the test class runs successfully?</p><p><br/></p>",
663
+ "answerOptions": [
664
+ {
665
+ "describe": "<p>Enclose the method call within Test.startTest() and test.stopTest ().</p>",
666
+ "isRight": false
667
+ },
668
+ {
669
+ "describe": "<p>Implement the seeAllData=true attribute in the @Islest annotation.</p>",
670
+ "isRight": false
671
+ },
672
+ {
673
+ "describe": "<p>Implement the without sharing keyword in the searchFeature Apex class.</p>",
674
+ "isRight": false
675
+ },
676
+ {
677
+ "describe": "<p>Implement the setFixedSearchResults method in the test class.</p>",
678
+ "isRight": true
679
+ }
680
+ ],
681
+ "hashCode": "2019145459",
682
+ "analysis": "<p>https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_SOSL.htm</p>"
683
+ },
684
+ {
685
+ "describe": "<p>A developer has a Batch Apex process, Batch_Account_Sales, that updates the sales amount for 10,000 Accounts on a nightly basis. The&nbsp;</p><p>Batch Apex works as designed in the sandbox. However, the developer cannot get code coverage on the Batch Apex class.</p><p>The test class is below:</p><p>@IsTest private Batch_Account_Update_Test() {</p><p>&nbsp; &nbsp; &nbsp; @IsTest static void UnitTest() {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Account a = new Account(Name=&#39;test&#39;, Type=&#39;Customer&#39;,Sales_Amount__c=0);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; insert a;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Batch_Account_Sales bas = new Batch_Account_Sales();</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ID jobid = database.executebatch(bas);</p><p>&nbsp; &nbsp; &nbsp; &nbsp;}</p><p>}</p><p>What is causing the code coverage problem?</p><p><br/></p>",
686
+ "answerOptions": [
687
+ {
688
+ "describe": "<p>The &nbsp;batch process will not recognize new accounts created in the same session.</p>",
689
+ "isRight": false
690
+ },
691
+ {
692
+ "describe": "<p>The account creation a already sets the sales amount to 0.</p>",
693
+ "isRight": false
694
+ },
695
+ {
696
+ "describe": "<p>The executeBatch must fall within test.startTest() and test.stopTest().</p>",
697
+ "isRight": true
698
+ },
699
+ {
700
+ "describe": "<p>The batch needs more than one account record created.</p>",
701
+ "isRight": false
702
+ }
703
+ ],
704
+ "hashCode": "2019145452",
705
+ "analysis": ""
706
+ },
707
+ {
708
+ "describe": "<p>A developer created an Apex class that makes an outbound RESTful callout. The following class was created to send a fake response in Apex test methods.</p><p><br/></p><p>@isTest</p><p>public class TestHttpCalloutMock implements</p><p>HttpCalloutMock {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public HTTPResponse respond (HTTPRequest request) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HttpResponse response = new HttpResponse( ) ;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; response.setHeader (&#39;Content-Type &#39; ,</p><p>&#39;application/json&#39;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; response.setBody(&#39; {&quot;colors&quot;: [&quot;red&quot;, &quot;blue&quot;, &quot;yellow&quot;, &quot;green&quot;, &quot;pink&quot;]}&#39;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; response.setStatusCode (200);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return response;</p><p><br/></p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p><br/></p><p>}</p><p><br/></p><p>Which method can be called to return this fake response in the test methods?</p><p><br/></p>",
709
+ "answerOptions": [
710
+ {
711
+ "describe": "Test.setTestData",
712
+ "isRight": false
713
+ },
714
+ {
715
+ "describe": "<p>Test.setMock</p>",
716
+ "isRight": true
717
+ },
718
+ {
719
+ "describe": "<p>Test.createStub</p>",
720
+ "isRight": false
721
+ },
722
+ {
723
+ "describe": "<p>testSetup</p>",
724
+ "isRight": false
725
+ }
726
+ ],
727
+ "hashCode": "2019145429",
728
+ "analysis": "<p>https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_restful_http_testing_httpcalloutmock.htm</p>"
729
+ },
730
+ {
731
+ "describe": "<p>Assuming the CreateOneAccount class creates one account and implements the Queueable interface, which syntax properly tests the \nApex code?</p>",
732
+ "answerOptions": [
733
+ {
734
+ "describe": "<p>List&lt;Account&gt; accts;</p><p>System.enqueueJob( new CreateOneAccount() );</p><p>Test.getFlexQueueOrder();</p><p>System.assertEquals(1, accts.size() );</p><p><br/></p>",
735
+ "isRight": false
736
+ },
737
+ {
738
+ "describe": "<p>List&lt;Account&gt; accts;</p><p>System.enqueueJob( new CreateOneAccount() );</p><p>accts = [SELECT Id FROM Account];</p><p>System.assertEquals(1, accts.size() );</p><p><br/></p>",
739
+ "isRight": false
740
+ },
741
+ {
742
+ "describe": "<p>List&lt;Account&gt; accts;</p><p>System.enqueueJob( new CreateOneAccount() );</p><p>Test.startTest();</p><p>System.assertEquals(1, accts.size() );</p><p>Test.stopTest();</p><p><br/></p>",
743
+ "isRight": false
744
+ },
745
+ {
746
+ "describe": "<p>List&lt;Account&gt; accts;</p><p>Test.startTest();</p><p>System.enqueueJob( new CreateOneAccount() );</p><p>Test.stopTest();</p><p>accts = [SELECT Id FROM Account];</p><p>System.assertEquals(1, accts.size() );</p><p><br/></p>",
747
+ "isRight": true
748
+ }
749
+ ],
750
+ "hashCode": "2019145427",
751
+ "analysis": ""
752
+ },
753
+ {
754
+ "describe": "<p>&nbsp;@isTest</p><p>static void testUpdateSuccess( ) {</p><p>&nbsp; &nbsp; &nbsp; Account acct = new Account (Name = &#39;test&#39;) ;</p><p>&nbsp; &nbsp; &nbsp; insert acct;</p><p><br/></p><p>// Add code here</p><p><br/></p><p>extension.inputValue = &#39;test&#39;;</p><p>PageReference pageRef = extension.update( );&nbsp;</p><p>System.assertNotEquals(null, pageRef) ;</p><p>}</p><p><br/></p><p>What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?</p><p><br/></p>",
755
+ "answerOptions": [
756
+ {
757
+ "describe": "<p>ApexPages.StandardController sc = new ApexPages.StandardController(acct.Id);</p><p>AccountControllerExt extension = new AccountControllerExt(sc);</p><p><br/></p>",
758
+ "isRight": false
759
+ },
760
+ {
761
+ "describe": "<p>AccountControllerExt extension = new AccountControllerExt(acct.Id);</p>",
762
+ "isRight": false
763
+ },
764
+ {
765
+ "describe": "<p>ApexPages.Standardcontroller sc = new ApexPages.standardController(acct) ;</p><p>AccountControllerExt extension = new AccountControllerExt(sc) ;</p><p><br/></p>",
766
+ "isRight": true
767
+ },
768
+ {
769
+ "describe": "<p>AccountControllerExt extension = new AccountControllerExt(acct);</p>",
770
+ "isRight": false
771
+ }
772
+ ],
773
+ "hashCode": "2019145399",
774
+ "analysis": "<p>https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm</p>"
775
+ },
776
+ {
777
+ "describe": "<p>&lt;lightning:button label=&quot;Save&quot; onclick=&quot;{!c.handleSave}&quot; /&gt;</p><p><br/></p><p>({</p><p>&nbsp; &nbsp; &nbsp; &nbsp;handleSave : function (component, event, helper) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;helper.saveAndRedirect (component) ;</p><p><br/></p><p>&nbsp; &nbsp; &nbsp; }</p><p><br/></p><p>})</p><p><br/></p><p>A company has the Lightning Component above that allows users to click a button to save their changes and redirects them to a different page. Currently, when the user hits the Save button the recorrds are getting saved, but they are not redirected.</p><p><br/></p><p>Which three techiques can a developer use to debug the JavaScript? Choose 3 answers</p><p><br/></p>",
778
+ "answerOptions": [
779
+ {
780
+ "describe": "<p>Use console.log( ) messages in the JavaScript.</p>",
781
+ "isRight": true
782
+ },
783
+ {
784
+ "describe": "<p>Use Developer Console to view the debug log.</p>",
785
+ "isRight": false
786
+ },
787
+ {
788
+ "describe": "<p>Use Developer Console to view checkpoints.</p>",
789
+ "isRight": false
790
+ },
791
+ {
792
+ "describe": "<p>Use the browser&#39;s dev tools to debug the JavaScript.</p>",
793
+ "isRight": true
794
+ },
795
+ {
796
+ "describe": "<p>Enable Debug Mode for Lightning components for the user.</p>",
797
+ "isRight": true
798
+ }
799
+ ],
800
+ "hashCode": "2019145396",
801
+ "analysis": ""
802
+ },
803
+ {
804
+ "describe": "<p>&#39;@isTest</p><p>static void testAccountUpdate() {</p><p>&nbsp; &nbsp; &nbsp; Account acct = new Account (Name = &#39;Test&#39;);</p><p>&nbsp; &nbsp; &nbsp; acct.Integration_Updated_c = false;</p><p>&nbsp; &nbsp; &nbsp; insert acct;</p><p><br/></p><p>&nbsp; &nbsp; &nbsp;CalloutUtil.sendAccountUpdate(acct.Id);</p><p>&nbsp; &nbsp; &nbsp;Account acctAfter = [SELECT Id, Integration_Updated_c FROM Account WHERE Id = :acct.Id][0];</p><p>&nbsp; &nbsp; &nbsp;System.assert(true, acctAfter.Integration_Updated_c );</p><p>}</p><p><br/></p><p>The test method above calls a web service that updates an external system with Account Information and sets the Account&#39;s</p><p>Integration_Updated_c checkbox to True when It completes. The test falls to execute and exits with an error: &quot;Methods defined as TestMethod</p><p>do not support Web service callouts.&quot;</p><p><br/></p><p>What is the optimal way to fix this?</p><p><br/></p>",
805
+ "answerOptions": [
806
+ {
807
+ "describe": "<p>Add Test.startTest() before and Test.stopTest() after CalloutUtil.sendAccountUpdate.</p>",
808
+ "isRight": false
809
+ },
810
+ {
811
+ "describe": "<p>Add Test.startTest() before and Test.setMock and Test.stopTest() after CalloutUtil.sendAccountUpdate.</p>",
812
+ "isRight": false
813
+ },
814
+ {
815
+ "describe": "<p>Add if (!Test.IsRunningTest()) around CalloutUtil.sendAccountUpdate.</p>",
816
+ "isRight": false
817
+ },
818
+ {
819
+ "describe": "<p>Add Test.startTest() and Test.setMock before and Test.stopTest() after CalloutUtil.sendAccountUpdate.</p>",
820
+ "isRight": true
821
+ }
822
+ ],
823
+ "hashCode": "2019145394",
824
+ "analysis": ""
825
+ }
826
+ ],
827
+ "hashCode": "-42739326"
828
+ }