Testing, Debugging, and Deployment Flashcards
A third-party API endpoint that is designed to return posts from a certain platform was introduced to the developer team of a digital marketing company. The senior developer would like to quickly evaluate the API first by performing test callouts to an endpoint and examining returned responses.
What is a suitable option to complete this task?
A. Execute anonymous block
B. Create an outbound message
C. Write a unit test for the callout
D. Use Workbench REST explorer
A. Execute anonymous block
An anonymous block is the most suitable option for quickly evaluating Apex code.
A developer of Cosmic Solutions has updated an important process in a sandbox environment. He needs to push it to the company’s production org as an active process using a change set.
Which of the following should be considered when deploying an active process via a change set?
Choose 2
A. At least 75% of active processes and autolaunched flows must be covered by Apex tests
B. A process cannot be deployed as active if it calls an Apex method.
C. ‘Deploy processes and flows as active’ must be enabled in setup
D. An active process in the source org will be deployed as inactive in the destination org
A. At least 75% of active processes and autolaunched flows must be covered by Apex tests
C. ‘Deploy processes and flows as active’ must be enabled in setup
Which of the following can be used to execute specific Apex test methods in an organization?
Choose 3
A. Data Loader B. Visual Studio Code C. SOAP API D. Change Sets E. Developer Console
B. Visual Studio Code
C. SOAP API
E. Developer Console
Which of the following statements about triggers are true?
Choose 3
A. A developer can specify the version of Apex and API which can be used with the Trigger
B. Trigger code is stored as metadata under the object which they are associated with.
C. Apex Triggers are always active and cannot be turned off.
D. Triggers can be used to detect a before undelete event
E. For the Attachment, ContentDocument and Note standard objects, a trigger cannot be created in the Salesforce user interface
A. A developer can specify the version of Apex and API which can be used with the Trigger
B. Trigger code is stored as metadata under the object which they are associated with.
E. For the Attachment, ContentDocument and Note standard objects, a trigger cannot be created in the Salesforce user interface
Can Apex triggers be activated and deactivated?
yes
When would a full copy sandbox be required?
Choose 2
A. Performance and Load Testing
B. Staging
C. Training
D. Integration Testing
A. Performance and Load Testing
B. Staging
What is a Developer Sandbox intended for?
A Developer sandbox is intended for development and testing in an isolated environment. A Developer Sandbox includes a copy of your production org’s configuration (metadata).
What is a Developer Pro Sandbox intended for?
A Developer Pro sandbox is intended for development and testing in an isolated environment and can host larger data sets than a Developer sandbox. A Developer Pro sandbox includes a copy of your production org’s configuration (metadata). Use a Developer Pro sandbox to handle more development and quality assurance tasks and for integration testing or user training.
What is a Partial Copy Sandbox intended for?
Intended to be used as a testing environment. Use a partial copy for QA, UAT, Integration testing and training
What is a Full Sandbox intended for?
Performance testing, load testing, and staging
Which type of sandbox is a full replication of your production org
Full Sandbox
What is the procedure for unit testing?
A. Create test data, call the method being tested, verify results, delete an records created
B. Create test data, call the method being tested, verify results
C. Create test data, run all tests, verify results, delete any records created
D. Create test data, run all tests, delete any records created, and verify results
B. Create test data, call the method being tested, verify results
Why don’t you have to go back and delete test data?
Because the data is never committed, so it doesn’t need to be deleted
Which are true regarding the runAs() method?
Choose 2
A. runAs() ignores user license limits
B. runAs() enforces user permissions and field level permissions
C. runAs() can be used with existing users or a new user
D. runAs() can be used in any Apex method
A. runAs() ignores user license limits
C. runAs() can be used with existing users or a new user
True or False
the runAs() method enforces user permissions or field level permissions
False
it only enforces record sharing