Salesforce Flawless Packaging And Deployment

  • View
    181

  • Download
    2

  • Category

    Sales

Preview:

Citation preview

Flawless Packaging And Deployment

By Harshala Shewale

Lets connect on twitter @harshalashewale

Agenda What is Packaging

Challenges

Solutions

Reference

What is Packaging ?

1) Gather Requirement

2) Define Application Component

3) Test in allocated environment

4) Package and distribute

? Version Control ? Complex Development

? Continuous Integration?

? Handling Different Components ? Deployment Checklist

Automated Testing

Challenges

Solutions

1. Version Control

- Fork, Branching and Merging- Code History / Audit trail- Collaborative Development- Prevents lost Of Code

Challenges

✔ Version Control ? Complex Development

? Continuous Integration?

? Handling Different Components ? Deployment Checklist

Automated Testing

5 more to go

Solutions

2. Automated Testing

1) Prepare Test Cases for bugs/new feature2) Use of Selenium tool3) Validate New or Changed Code4) Special Org dedicated for Testing5) Run All Tests after code change , sometimes difference

in Run All Tests coverage and coverage while deploying package

Solutions

How to Run All test classes before deployment

1) Open Developer Console.2) Click the panel "Query Editor" Tab at the bottom of the screen3) Write the following Query in Query Editor.

SELECT Id, NumLinesUncovered FROM ApexCodeCoverageAggregate4) Check the checkbox "Use Tooling API" at the bottom of the screen.5) Click "Execute".6) Select all rows and delete them from "Query Results".7) Make sure there are no records of ApexCodeCoverageAggregate8) Clear all Test history (Setup | Developer | Apex Test Execution -> View est History -> Clear Test Results)9) Compile all classes10) Perform "Run All test".

Challenges

✔ Version Control ? Complex Development

? Continuous Integration

? Handling Different Components ? Deployment Checklist

Automated Testing✔

4 more to go

Solution

3. Handling Different Components

1) Custom Settings2) Custom Labels3) Custom Button and Links

Challenges

✔ Version Control Complex Development

? Continuous Integration

Handling Different Components ? Deployment Checklist

Automated Testing✔

3 more to go

?

Solution

4. Complex Development - Isolated Feature development

1) Keep feature separate, ➔ 1 feature – 1 org➔ Keep a separate branch for feature➔ Deploy branched code to org

2) Send pull request to main branch3) Merge the feature in main branch 4) Send code for QA test5) Reduces code conflict

Challenges

✔ Version Control ✔ Complex Development

? Continuous Integration

Handling Different Components ? Deployment Checklist

Automated Testing✔

2 more to go

Solution

5. Continuous Integration

- Constant flow of development changes and unit testing- Use of Force.com Migration Tool with Jenkins

Challenges

✔ Version Control ✔ Complex Development

Continuous Integration

Handling Different Components ? Deployment Checklist

Automated Testing✔

1 more to go

✔✔

Solution

6. Deployment Checklist

- Modified / New Components list- Post Deployment Checklist- Level of Access for components - Track all changes- Start the deployment early- Set up a maintenance window- Use a continuous integration server to make small improvements- Define data load process if any

Challenges

✔ Version Control ✔ Complex Development

Continuous Integration

Handling Different Components Deployment Checklist

Automated Testing✔

WooohoooDone!

✔✔

ReferencesJenkins : https://developer.salesforce.com/blogs/developer-relations/2013/03/setting-up-jenkins-for-force-com-continuous-integration.html

Seleniumhttps://developer.salesforce.com/blogs/engineering/2013/06/automated-testing-using-selenium-at-salesforce.html

http://www.slideshare.net/Salesforce/introduction-to-forcecom-application-distribution

http://www.slideshare.net/developerforce/techniques-and-tools-to-improve-the-salesforce-development-cycle

http://www.docurated.com/all-things-productivity/salesforce-deployment-checklist

Question(s)