Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Integrating with CI pipeline

adarsh-ramakrishna-sfdc edited this page Oct 16, 2015 · 1 revision

Integrating with CI pipeline

CI engines like Jenkins(https://jenkins-ci.org/) can be used to seamlessly integrate ApexUnit with CI pipelines.

Prerequisites :

Steps for creating a jenkins job for ApexUnit:

  • Create a "Free style project" using jenkins
  • (Optional)Select the "This build is parameterized" checkbox and parameterize the build by adding relevant (String/password) parameters for all of the cli options
  • Select the SCM where you checked in your code and update the location of source code to your code on SCM
  • Add the build step "Invoke Top level maven targets" with the command mentioned above in the "How to build" section. Use the parameters if you parameterized the build, otherwise provide the entire command with hard-coded values
  • In the post-build Actions step:
    • Add "Publish HTML reports" step and populate 'HTML directory to archive' field with 'Report' and 'Index page[s]' field with 'ApexUnitReport.html' and choose your 'Report title'
    • Add "Publish JUnit test result report" step and populate 'ApexUnitReport.xml' for the 'Test Report XMLs' field
    • If you would like to get email notifications on the build status for the job, add 'E-mail Notification' step and populate the 'Recipients' field with your and possible your teams email id(s)
Clone this wiki locally