Skip to content

hardis:org:test:apex

Description

Run apex tests in Salesforce org

If following configuration is defined, it will fail if apex coverage target is not reached:

  • Env APEX_TESTS_MIN_COVERAGE_ORG_WIDE or .sfdx-hardis property apexTestsMinCoverageOrgWide
  • Env APEX_TESTS_MIN_COVERAGE_ORG_WIDE or .sfdx-hardis property apexTestsMinCoverageOrgWide

You can override env var SFDX_TEST_WAIT_MINUTES to wait more than 60 minutes.

This command is part of sfdx-hardis Monitoring and can output Grafana, Slack and MsTeams Notifications.

Parameters

Name Type Description Default Required Options
debug
-d
boolean Activate debug mode (more logs)
flags-dir option undefined
json boolean Format output as json.
skipauth boolean Skip authentication check when a default username is required
target-org
-o
option undefined
testlevel
-l
option Level of tests to apply to validate deployment RunLocalTests NoTestRun
RunSpecifiedTests
RunLocalTests
RunAllTestsInOrg
websocket option Websocket host:port for VsCode SFDX Hardis UI integration

Examples

$ sf hardis:org:test:apex