Now that the Jenkins server is set up for Automation test execution, we can begin setting up the Salesforce org with the Copado Configuration installation to queue the Jenkins job we just created.
Once your Copado installation is complete and your user has been granted the correct permissions, you should see the following Copado applications in your App Launcher for that Salesforce Org.
Namely, the following:
- Copado Release Manager
- Copado Pipeline Manager
- Copado Developer
- Copado Compliance Hub
- Copado Permission
- Copado Selenium Testing
Note: Instructions for installing the Automation Test Results package are in a later section of this guide. This package will be used to capture our test results written back from the Jenkins job.
Creating the External Continuous Integration Setting in Copado (Optional)
First, we will search for External CI in the AppLauncher to set up our Copado to Jenkins integration. For the most part, we will operate in the Copado Release Manager, although it is advisable to read all of Copado’s documentation regarding their other applications. Follow Copado Configuration documentation on how to set up an external CI job here: https://docs.copa.do/article/nl2v8znpeh-external-ci-jobs.
Note: We will also walk through how to set up our integration.
From here, select External CI Settings, then choose New on the following page.
You can name this External CI Setting whatever you wish, but you should choose something easily identifiable. For instance, if you have multiple Jenkins instances you want to integrate, name each setting according to the Jenkins instance it belongs to.
External CI Settings Name: This is a demo Jenkins server, so we have named it accordingly.
CI Tool: Jenkins in this case, but Bamboo and TeamCity are also supported here.
Endpoint: This should be the base URL of your Jenkins server.
Username: A user with the correct authentication privileges to Jenkins and queue jobs.
Password: The user’s password.
API Token: Also, recall the value of your API token from setting up the Jenkins bob. This will be used to authenticate the External CI.
Once you have completed your External CI Setting, save it and test the connection before proceeding.
Click the Validate Connection button in the top right of this External CI Setting page:
Now, we can create an External CI Job that utilizes this connection.
Creating an External CI job in Copado (Optional)
From the External CI Setting page, click New External CI Job.
Fill in the fields necessary to create this External CI Job from here.
External CI Jobs Name: Name of the External CI Job. Classifying this name similarly to the Jenkins Job name is helpful since the two will be linked 1-to-1.
External CI Setting: Select the External CI Setting created in the previous step.
Environment: Leave blank for now, but it can be filled in once you define environments in your org via Copado.
User Story: Leave blank for now, but it can be filled in once you create User Stories in your org via Copado.
Order: Set this value to 1; it is the order to execute this job concerning other jobs.
Invoke On: Can be set to before or after the deployment phase (typically set to before deployment).
Continue on failure: Leave this unchecked (want to exit on failures).
Timeout in minutes: Leave this set to 15 minutes (will timeout the job if no response is received in that time frame).
The bottom part of this setup is selecting which Jenkins Job you would like this external CI job to the queue via a webhook. Select CI Job and choose the Jenkins job we created in the Jenkins Configuration section.
We will also add our build parameters corresponding to the build parameters created in that same Jenkins job earlier.
Add each build parameter in the name/value pairs you wish to pass to the Jenkins job.
The DEPLOYMENT_ID (or EXTERNAL_ID, depending on how you named the build parameter in Jenkins) cannot be passed in via the External CI job. This is the primary reason we will use a URL callout for the main deployment step. However, it is good practice to set up this job for future use.
Once this is done, save the external CI job.
Testing the External CI job (Optional: if you set up an External CI Job, try it!)
You can test this External CI job by clicking Build Job in the top right.
Once you do, you should see the confirmation message notifying you of your job being started:
You can also track the status in Jenkins or wait for the job to complete and report the results to the External CI Job in Copado Configuration. You may have to refresh the page before the Related tab displays any Job result information.
Creating a Deployment Job in Copado
Follow Copado’s documentation on how to set up a deployment here: https://docs.copa.do/article/afa12a7uwv-creating-a-deployment
Note: We will also walk through how to set up our integration.
Open the AppLauncher and search for Copado Release Manager.
Open this application and navigate to the Deployments tab. From here, create a new Deployment by selecting the New button.
Firstly, enter a deployment name and save the deployment.
From here, fill in the fields as necessary to create the deployment Job.
Source Org: Use the org lookup to find the desired org as the deployment source.
To Org: Use the org lookup to find the desired org as the deployment destination.
Add Steps to Deployment Job
In the Steps section, click Add Step to create a deployment step for this job.
Step Name: The name of the step (Note: This step will be calling the Jenkins Job via a URL Callout).
Type: Select URL Callout from the dropdown.
If you set up an External CI Job/Settings, you can also select External CI Job here and use that instead. Use the Lookup to find the External CI Job you set up previously. Also, the name used here may be different from yours.
Type: Perform callout and continue with deployment.
Method: Set the Method to POST.
Dynamic Parameters: None.
URL: Set this value to http://my.jenkins.server.com/job/JobName/buildWithParameters.
TEST_PLAN (Optional): Test Plan Name
BUILD_FILE (Optional): ANT/build.xml
Authorization: Basic XXXX
You will need to convert your Jenkins API token to an authentication header. There are various tools online where you can do this. One such tool is here: https://www.blitter.se/utils/basic-authentication-header-generator/
You provide the username to which the API Token is registered and the API token.
Please copy the entire string it generates, which is the Authorization Header in the Copado URL Callout.
Click Save once the URL Callout has been added to the step.
Scroll down to the Copado Configuration Deployment History to ensure each step has been added and saved successfully.
Your Deployment/External CI jobs are now set up, and your Copado configuration is complete!
To test this deployment, click Deploy directly from the deployment screen view.
Make sure to Deploy All on the next screen.
You can also view the results from this deployment on this screen by clicking Result for the Call Jenkins Job step.
You can also select View in Jenkins on the External CI Job itself once the job is complete in Jenkins to view the build log.
- Provar Automation
- Installing Provar Automation
- Updating Provar Automation
- Using Provar Automation
- API Testing
- Behavior-Driven Development
- Creating and Importing Projects
- Creating Test Cases
- Custom Table Mapping
- Debugging Tests
- Defining a Namespace Prefix on a Connection
- Defining Proxy Settings
- Environment Management
- Exporting Test Cases into a PDF
- Exporting Test Projects
- Override Auto-Retry for Test Step
- Managing Test Steps
- Namespace Org Testing
- Provar Automation
- Provar Test Builder
- Refresh and Recompile
- Reintroduction of CLI License Check
- Reload Org Cache
- Running Tests
- Searching Provar with Find Usages
- Secrets Management and Encryption
- Setup and Teardown Test Cases
- Tags and Service Level Agreements (SLAs)
- Test Cycles
- Test Plans
- Testing Browser Options
- Tooltip Testing
- Using the Test Palette
- Test Palette Introduction
- Control Test Steps
- Generate Test Case
- List Compare
- Page Object Cleaner
- Read Test Step
- String Test Steps
- UI Test Steps
- Using Custom APIs
- Callable Tests
- Data-Driven Testing
- Page Objects
- Block Locator Strategies
- Introduction to XPaths
- Creating an XPath
- Label Locator Strategies
- Maintaining Page Objects
- Mapping Non-Salesforce fields
- Page Object Operations
- Refresh and Reselect Field Locators in Test Builder
- Using Java Method Annotations for Custom Objects
- Applications Testing
- Database Testing
- Document Testing
- Email Testing
- Mobile Testing
- OrchestraCMS Testing
- Salesforce CPQ Testing
- ServiceMax Testing
- Skuid Testing
- Vlocity API Testing
- Webservices Testing
- Provar Manager
- Provar Manager Setup and User Guide
- Installing Provar Manager
- Configuring Provar Manager
- How to Use Provar Manager
- Managing Your Testing Life Cycle
- Provar Manager Test Execution
- Test Executions and Defect Management
- Provar Manager Test Coverage
- How to Integrate Provar Manager
- Setting Up a Connection to Provar Manager
- Object Mapping Between Automation and Manager
- How to Upload Test Plans, Test Plan Folders, Test Plan Instances, and Test Cases
- Provar Manager Filters
- Uploading Callable Test Cases in Provar Manager
- Uploading Test Steps in Provar Manager
- How to Know if a File in Automation is Linked in Test Manager
- Test Execution Reporting
- Provar Manager Plugins
- Uploading Existing Manual Test Cases to Provar Manager with DataLoader.Io
- Metadata Coverage with Manager
- Provar Grid
- Introduction to Provar DevOps
- Introduction to Test Scheduling
- Apache Ant
- Configuration for Sending Emails via the Automation Command Line Interface
- Continuous Integration
- AutoRABIT Salesforce DevOps in Provar Test
- Azure DevOps
- Running a Provar CI Task in Azure DevOps Pipelines
- Configuring the Automation secrets password in Microsoft Azure Pipelines
- Parallel Execution in Microsoft Azure Pipelines using Multiple build.xml Files
- Parallel Execution in Microsoft Azure Pipelines using Targets
- Parallel execution in Microsoft Azure Pipelines using Test Plans
- Bitbucket Pipelines
- GitHub Actions
- Integrating GitHub Actions CI to Run Automation CI Task
- Remote Trigger in GitHub Actions
- Parameterization using Environment Variables in GitHub Actions
- Parallel Execution in GitHub Actions using Multiple build.xml Files
- Parallel Execution in GitHub Actions using Targets
- Parallel Execution in GitHub Actions using Test Plan
- Parallel Execution in GitHub Actions using Job Matrix
- GitLab Continuous Integration
- Travis CI
- Execution Environment Security Configuration
- Provar Jenkins Plugin
- Parallel Execution
- Running Provar on Linux
- Salesforce DX
- Team Foundation Server
- Version Control
- Masking Provar Credentials on CI
- Salesforce Testing
- Adding a Salesforce Connection
- Assert Page Error Messages on Add/Edit Product
- Internationalization Support
- List and Table Testing
- Salesforce Console Testing
- Salesforce Lightning Testing
- Salesforce Lightning Web Component (LWC) Locator Support
- Salesforce Release Updates
- Visualforce Testing
- Best Practices
- Salesforce Connection Best Practices
- Improve Your Metadata Performance
- Testing Best Practices
- Automation Planning
- Supported Testing Phases
- Provar Naming Standards
- Test Case Design
- Create records via API
- Avoid using static values
- Abort Unused Test Sessions/Runs
- Avoid Metadata performance issues
- Increase auto-retry waits for steps using a global variable
- Create different page objects for different pages
- The Best Ways to Change Callable Test Case Locations
- Working with the .testProject file and .secrets file
- Best practices for the .provarCaches folder
- Best practices for .pageObject files
- Configurations and Permissions
- Error Messages
- Provar Manager 3.0 Install Error Resolution
- Provar Manager Test Case Upload Resolution
- Administrator has Blocked Access to Client
- macOS Big Sur Upgrade
- Resolving Failed to Create ChromeDriver Error
- Resolving Jenkins License Missing Error
- Resolving Metadata Timeout Errors
- Test Execution Fails – Firefox Not Installed
- Licensing, Installation and Firewalls
- Test Builder and Test Cases
- Release Notes