What are the three general buckets of software tests?
Unit
Functional
Integration
Name the 4 methods for creating test data
Brute Force
Test Factories
TestSetup Methods
CSV Data Files
What is the brute force method for creating test data?
Before you call the underlying code that you’re testing, you’re creating the necessary data by creating and inserting objects.
What is the drawback from brute force test creation?
It can lead to lengthy tests that are hard to follow, especially when you start generating records that are related to other records and contain lots of field details
What is the test factories method for creating test data?
Move your data creating into a reusable class. They’re called data factories, and they are reusable classes that contain methods that model the creation of one or more objects
What is the TestSetup method for creating test data?
Multiple test methods in the same class often have similar data requirements. You can annotate these methods in your test class as @testSetup. The platform calls these methods automatically before every individual test method. Because they’re called before every test method in the class, they’re perfect for creating test data. Note that the data is reset in between each and every test method’s execution.
What is the CSV Data Files method for creating test data?
You can create and upload a CSV file as a static resource and generate test data directly from that CSV
What is the typical positive testing pattern?
What do negative testing demonstrates?
That the code properly handles invalid data, unexpected user input, and changes in other parts of the code base.
More important, it affirms that the code is fault tolerant
What is the typical negative testing pattern?
What is the typical permissions testing pattern?
What wrapper libraries does the Lightning Platform app provide for testing JavaScript
Jasmine and Mocha
The Lightning Test Service provides:
A) A utility $T object
B) Software for automatically generating Javascript unit tests
C) A way to execute Javascript based Lightning Component tests
D) A and C
D) A and C
When writing Javascript unit tests for Lightning components, the $T object:
A) Creates and modifies instances of your Lightning components
B) Inserts fake values into your Lightning attributes
C) Organizes tests into suites using the describe keyword
D) What $T object?
A) Creates and modifies instances of your Lightning components
What are the use cases for mock and stub objects (Name two)
1: You find it whenever you’re making a callout from Apex to a third-party web service
2: You come across this use case whenever you’re testing code that relies on another object’s internal state or implementation
What is the pattern for creating a Mock Object?
What is the pattern for creating a Stub Object?
When would you do Stress Testing?
When you need to gauge performance during abnormal/extreme conditions
Stress testing is not necessary on the Force.com platform because Salesforce has already stress tested the platform so it is not necessary for you to
When would you do Load Testing
When you need to gauge performance under expected conditions with varying loads
What do you need to keep in mind when performing Load Testing?
What is the metric used for load testing?
TPS (Transactions per second)
When would you do performance testing?
When you need to gauge performance under particular workloads. This includes both stress and load testing collectively.
You can test in a sandbox to uncover conflicts between request (locking issues) or to test performance of external web services.
What are Apex Hammer Tests?
Salesforce runs your org’s Apex test in both the current and new release and compares the results to identify issues for you
What data is displayed on the Apex Hammer Test?