salesforce flawless packaging and deployment

20
Flawless Packaging And Deployment By Harshala Shewale Lets connect on twitter @harshalashewale

Upload: harshala-shewale-

Post on 21-Jan-2018

180 views

Category:

Sales


2 download

TRANSCRIPT

Page 1: Salesforce Flawless Packaging And Deployment

Flawless Packaging And Deployment

By Harshala Shewale

Lets connect on twitter @harshalashewale

Page 2: Salesforce Flawless Packaging And Deployment

Agenda What is Packaging

Challenges

Solutions

Reference

Page 3: Salesforce Flawless Packaging And Deployment

What is Packaging ?

1) Gather Requirement

2) Define Application Component

3) Test in allocated environment

4) Package and distribute

Page 4: Salesforce Flawless Packaging And Deployment

? Version Control ? Complex Development

? Continuous Integration?

? Handling Different Components ? Deployment Checklist

Automated Testing

Challenges

Page 5: Salesforce Flawless Packaging And Deployment

Solutions

1. Version Control

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

Page 6: Salesforce Flawless Packaging And Deployment

Challenges

✔ Version Control ? Complex Development

? Continuous Integration?

? Handling Different Components ? Deployment Checklist

Automated Testing

5 more to go

Page 7: Salesforce Flawless Packaging And Deployment

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

Page 8: Salesforce Flawless Packaging And Deployment

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".

Page 9: Salesforce Flawless Packaging And Deployment

Challenges

✔ Version Control ? Complex Development

? Continuous Integration

? Handling Different Components ? Deployment Checklist

Automated Testing✔

4 more to go

Page 10: Salesforce Flawless Packaging And Deployment

Solution

3. Handling Different Components

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

Page 11: Salesforce Flawless Packaging And Deployment

Challenges

✔ Version Control Complex Development

? Continuous Integration

Handling Different Components ? Deployment Checklist

Automated Testing✔

3 more to go

?

Page 12: Salesforce Flawless Packaging And Deployment

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

Page 13: Salesforce Flawless Packaging And Deployment

Challenges

✔ Version Control ✔ Complex Development

? Continuous Integration

Handling Different Components ? Deployment Checklist

Automated Testing✔

2 more to go

Page 14: Salesforce Flawless Packaging And Deployment

Solution

5. Continuous Integration

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

Page 15: Salesforce Flawless Packaging And Deployment

Challenges

✔ Version Control ✔ Complex Development

Continuous Integration

Handling Different Components ? Deployment Checklist

Automated Testing✔

1 more to go

✔✔

Page 16: Salesforce Flawless Packaging And Deployment

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

Page 17: Salesforce Flawless Packaging And Deployment

Challenges

✔ Version Control ✔ Complex Development

Continuous Integration

Handling Different Components Deployment Checklist

Automated Testing✔

WooohoooDone!

✔✔

Page 18: Salesforce Flawless Packaging And Deployment

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

Page 19: Salesforce Flawless Packaging And Deployment

Question(s)

Page 20: Salesforce Flawless Packaging And Deployment