Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
DevOps for Salesforce

You're reading from   DevOps for Salesforce Build, test, and streamline data pipelines to simplify development in Salesforce

Arrow left icon
Product type Paperback
Published in Sep 2018
Publisher
ISBN-13 9781788833349
Length 220 pages
Edition 1st Edition
Concepts
Arrow right icon
Authors (3):
Arrow left icon
Mukta Aphale Mukta Aphale
Author Profile Icon Mukta Aphale
Mukta Aphale
Nagraj Gornalli Nagraj Gornalli
Author Profile Icon Nagraj Gornalli
Nagraj Gornalli
Priyanka Dive Priyanka Dive
Author Profile Icon Priyanka Dive
Priyanka Dive
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Salesforce Development and Delivery Process FREE CHAPTER 2. Applying DevOps to Salesforce Applications 3. Deployment in Salesforce 4. Introduction to the Force.com Migration Tool 5. Version Control 6. Continuous Integration 7. Continuous Testing 8. Tracking Application Changes and the ROI of Applying DevOps to Salesforce 9. Other Books You May Enjoy

Executing Apex tests in a deployment using Jenkins


In Salesforce code, coverage of Apex components should be more than 75% to deploy changes to production. If any test case fails during deployment, then deployment to production will also fail. To avoid this, it is recommended that you test your deployment in sandbox first before deploying it to production. Sometimes, individual code coverage of Apex components may be less than 75%, but overall code coverage for your organization should be 75% or more. To ensure test cases don't fail in production, you can execute a subset of test cases in sandbox after it's deployed. We have already seen deploying changes from one sandbox to another in the previous chapter. We just need to make small changes in build.xml to specify the subset of tests to execute while deploying.

 

Here is a sample build.xml with test cases to execute:

<target name="deployCode"> 
    <sf:deploy username="${sf.username}" password="${sf.password}" 
           sessionId...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image