Newer Version Available

This content describes an older version of this product. View Latest

Build and Test the Release Artifact

After your team has finished its development tasks, transition to the build release phase to integrate your changes in a Developer Pro sandbox. Then build the release artifact.

In the early testing phases, you use the source commands to deploy and retrieve metadata to and from your Developer sandboxes. The source:deploy command is not transactional and attempts to deploy all components. If any change in your project has errors but other changes are valid, the command deploys all changes that are valid and compile. Those changes that can’t compile are not deployed, but the overall command completes successfully. Therefore, when building and testing your release artifact, use the mdapi:deploy command.

Here are the high-level steps in the work flow to create the release artifact.

  1. Pull the changes from the repo so your local project contains all the changes your team has made.
  2. Authorize the Developer Pro sandbox.
  3. Build the release artifact so you can deploy the changes to the sandbox.
    1. Convert the source to metadata format.
      1sfdx force:source:convert --rootdir force-app --outputdir tmp_convert
      This command also creates a manifest in the output directory. The manifest indicates what changes to include in the build artifact.
    2. Create a .zip file of the contents in the tmp_convert directory.
  4. Delete the output directory, for example, tmp_convert.
  5. Run the deploy command that mimics what you’ll deploy to production, for example:
    1sfdx force:mdapi:deploy --zipfile winter19.zip --targetusername dev-pro-sandbox \
    2--testlevel RunSpecifiedTests --runtests TestMyCode
  6. Open the sandbox.
  7. Perform testing.
  8. If the testing passes, continue to the test release phase where you deploy the release artifact to the partial sandbox. Then perform user-acceptance testing.

After the testing passes, move to the release phase and perform regression tests in the Full sandbox.