Skip to content

Add workaround for automatically testing the repo #7

@jongpie

Description

@jongpie

Salesforce does not currently allow the metadata deploy method to be executed in a unit test - that makes this repo nearly impossible to properly test using Apex tests. As a possible workaround,

  1. Create an 'extra tests' folder that is only used by the pipeline (similar to Apex-Rollups)
  2. Include a flow in that folder that uses the invocable methods - this will serve as the 'test'
  3. In the repo's pipeline, deploy all metadata to a scratch org (including the extra folder)
  4. Run an apex script to execute the flow, and check the deployment ID for any errors. If any errors occur, fail the build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions