Testing Flashcards
How to start a test class?
@isTest
How to make a test visible?
@TestVisible
System.RunAs()
Check if specific users have access to data
System.assert()
Checks if data matches for the test and results
Try/Catch vs Finally
Try catch makes an effort to execute the code
Finally will run no matter what
Types of exception handling
System
Custom
Positive Test
Tests to ensure that the application is working properly. If an application breaks during a positive test, the test fails
Negative test
Tests whether or not an application will fail given an input and is meant to handle the exception error.
Code Coverage required
75% code coverage minimum for AppExchange and Projects
Used to be 100%
Doesn’t include system debug lines