SFRA Testing Technologies
Include integration, unit, and functional tests in your SFRA development process.
Supported testing technologies include these kinds of tests:
- Controllers are tested with integration tests. Salesforce B2C Commerce uses mocha, chai, and request-promise for integration testing.
- Models are tested with unit tests. B2C Commerce uses mocha, chai, sinon, and proxyquire for unit tests.
- Views are tested with functional tests. B2C Commerce uses mocha, chai, and webdriver.io for functional tests.
Testing Commands
Use these commands:
Command | Description |
---|---|
|
Runs unit tests with a coverage report. |
|
* Runs all SFRA unit tests. |
|
* Runs functional tests for mobile devices. |
|
* Runs the integration tests. |
|
Runs the functional tests in the browser. |
|
Runs the functional tests from inside docker. |
|
Runs the remote functional tests |
Note: * These commands require a
dw.json
file or extra command-line parameters.