Validate

Validate changes against a scratch org or sandbox

sfp validate org

Validate a change in your project repository against a provided org

USAGE
  $ sfp validate org --repository <value> --sfp-server-url <value> -o <value> --mode individual|thorough
    --releaseconfig <value>... [--json] [-e <value>] [-t <value>] [--coveragepercent <value>] [--diffcheck]
    [--disableartifactupdate] [-g <value>...] [--ref <value> --baseRef <value>] [--orginfo] [--installdeps]
    (--disablesourcepkgoverride -v <value>) [--disableparalleltesting] [--skipTesting] [--deploywithtests]
    [--markdownoutput <value>] [--commit-sha <value>] [--pr-number <value>] [--publish-results] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -o, --targetorg=<value>           (required) Username or alias of the target org.
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
  -v, --devhubalias=<value>         (required) Username or alias of the Dev Hub org.
      --baseRef=<value>             The sha/ref to the base commit against which this ref will be merged into, In CI/CD
                                    platforms please pass in the full sha as opposed to branch name
      --commit-sha=<value>          Commit SHA for CI check creation (used with --pr-number to create checks without CI
                                    env vars)
      --coveragepercent=<value>     [default: 75] Minimum required percentage coverage for validating code coverage of
                                    packages with Apex classes
      --deploywithtests             Embed package apex tests in the deploy (RunSpecifiedTests with rollbackOnError=false)
                                    instead of running deploy then test as separate phases. Faster validate; coverage is
                                    read from the deploy response. Honors skipTesting and skipCoverageValidation per
                                    package descriptor.
      --diffcheck                   Only build the packages which have changed by analyzing previous tags
      --disableartifactupdate       Do not update information about deployed artifacts to the org
      --disableparalleltesting      Disable test execution in parallel, this will execute apex tests in serial
      --disablesourcepkgoverride    Disables overriding unlocked package installation as source package installation
                                    during validate
      --installdeps                 Install external package dependencies before validation
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --markdownoutput=<value>      Directory to write markdown output files
      --mode=<option>               (required) [default: thorough] validation mode
                                    <options: individual|thorough>
      --orginfo                     Display info about the org that is used for validation
      --pr-number=<value>           Pull request number for CI check association (used with --commit-sha)
      --publish-results             Publish validation results to the SFP Server for dashboard rendering
      --ref=<value>                 The sha/ref that need to be validated, this should not be the merge ref in some
                                    ci/cd systems, rather the head ref of the branch that is proposed to be merged
      --releaseconfig=<value>...    (required) Path(s) to the release config file(s) defining the domain(s) to validate.
                                    Accepts a comma-separated list. Domain scoping limits validation to packages
                                    declared in the listed release config(s) and enables alwaysSync inclusion in
                                    thorough mode.
      --repository=<value>          (required) The repository identifier. E.g `owner/repo` for GitHub/GitLab or
                                    `org/project/repo` for Azure DevOps
      --sfp-server-url=<value>      (required) URL of the SFP server. Can be set via SFP_SERVER_URL env var or config:
                                    sfp config:set server-url
      --skipTesting                 This option skips execution of tests during validation

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Validate a change in your project repository against a provided org

EXAMPLES
  $ sfp validate org  -o <targetorg>

  $ sfp validate org  -o <targetorg> --skipTesting

See code: src/commands/validate/org.ts

sfp validate pool

Validate a change in your project repository against a scratch org prepared by the prepare command

See code: src/commands/validate/pool.ts

Last updated

Was this helpful?