This repository houses a collection of Apex test classes, designed to validate the functionality and reliability of a Salesforce application. We use the sfdx-lwc-jest
library to run our unit tests.
The common test classes included in this directory under scripts/apex/
are designed to test various aspects of the Salesforce application. They include:
- Object Test Classes: These test classes are used to verify the behavior of custom objects in the application. They ensure that all object fields and methods function as expected.
- Trigger Test Classes: These test classes are used to test the triggers in the application. They ensure that the triggers execute correctly under various conditions.
- Controller Test Classes: These test classes are used to test the controllers in the application. They ensure that the controllers correctly manage the flow of data between the views and the model.
- Batch Job Test Classes: These test classes are used to test batch jobs in the application. They ensure that the batch jobs correctly process large volumes of data.
- Utility Test Classes: These test classes are used to test various utility classes in the application. They ensure that the utility classes correctly perform their intended functions.
- User Flow Test Classes ๐ถโโ๏ธ: These classes simulate a user's journey through the application, testing end-to-end functionality. They include:
- User Registration Flow Test Class
- User Login Flow Test Class
- Data Entry Flow Test Class
- Data Retrieval Flow Test Class
- User Profile Update Flow Test Class
- Data Update Flow Test Class
- Data Deletion Flow Test Class
- Search Functionality Flow Test Class
The sfdx-project.json
file contains configuration information for your project.
{
"packageDirectories": [
{
"path": "force-app",
"default": true
}
],
"name": "salesforce-apex-testing",
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "58.0"
}
Includes a .vscode
extension and debugging for Salesforce development in VS Code.
- Clone this repository
- Install dependencies with
npm install
- Run Apex unit tests with
npm run test:unit
See Salesforce DX Project Configuration in the Salesforce DX Developer Guide for details about this file. Do you want to deploy a set of changes, or create a self-contained application? Choose a development model.