SlideShare a Scribd company logo
1 of 23
Download to read offline
Advanced Testing & Debugging
Getting the Most from the Developer Console
Josh Kaplan, Salesforce.com, Sr. Product Manager
@Josh SFDC

Tony Tonev, Salesforce.com, Software Engineer
Safe harbor
       Safe harbor statement under the Private Securities Litigation Reform Act of 1995:

       This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties
       materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results
       expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be
       deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other
       financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any
       statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.

       The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new
       functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our
       operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of
       intellectual property and other litigation, risks associated with possible mergers and acquisitions, the immature market in which we
       operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new
       releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization
       and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com,
       inc. is included in our annual report on Form 10-Q for the most recent fiscal quarter ended July 31, 2012. This documents and others
       containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site.

       Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently
       available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based
       upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-
       looking statements.




Join the conversation: #forcewebinar
Speakers

                                         Josh Kaplan           Tony Tonev
                                       Sr. Product Manager,   Software Engineer
                                           @JoshSFDC




Join the conversation: #forcewebinar
Follow Developer Force for the latest news

                         @forcedotcom / #forcewebinar

                         Developer Force – Force.com Community


                         +Developer Force – Force.com Community


                         Developer Force

                         Developer Force group
Join the conversation: #forcewebinar
Have questions?

         §  We have an expert support team at the ready to answer your questions
             during the webinar.
         §  Ask your questions via the GoToWebinar Questions Pane.
         §  The speaker(s) will choose top questions to answer live at the end of the
             webinar.
         §  Please post your questions as we go along!
         §  Only post your question once; we’ll get to it as we go down the list.




Join the conversation: #forcewebinar
Agenda

         §  Testing Apex
                •  Why test?
                •  When test?
                •  How test?
         §  Code Coverage
         §  Advanced Debugging
                •  Log Inspector
                •  Checkpoints
                       –  Set checkpoints
                       –  View memory contents
                       –  Inject logic

Join the conversation: #forcewebinar
Assumptions

   This webinar assumes the following:
         §  You know…
                •  …what Apex code is
                •  …how to launch the Developer Console

         §  You have…
                •  …used the Developer Console before
                •  …done debugging before



   But don’t worry, you can catch up via these resources:
   http://wiki.developerforce.com/page/Webinar:_Intro_to_Apex_Code_(2012-July)


Join the conversation: #forcewebinar
Why test?




Join the conversation: #forcewebinar
Testing Protects You From Others




Join the conversation: #forcewebinar
Testing Protects You From Us




Join the conversation: #forcewebinar
When should I test?

    Write tests throughout development
           §  Before development
           §  After development
           §  In their own @isTest classes
    You should test frequently!
           §  During development
           §  Before deployment
           §  During deployment
           §  During release preview window

Join the conversation: #forcewebinar
How can I run tests on my code?

    Salesforce provides several avenues for test execution
           §  Developer Console
           §  “Setup” User Interface
           §  Automatically during deployment
           §  Through the Tooling API *COMING SOON!*




Join the conversation: #forcewebinar
Developer Console




Join the conversation: #forcewebinar
Testing in “Setup” User Interface




Join the conversation: #forcewebinar
Asynchronous Test Execution

    Salesforce runs your tests in the background so they can be
    processed as resources allow.
           §  Asyncronous testing runs tests in no particular order
           §  It allows you to see status of tests as they complete
           §  The process is integrated into developer console




Join the conversation: #forcewebinar
Code Coverage

    We store the results of your testing to calculate code coverage,
    and show you these stored results in the developer console.
           §  Aggregate coverage for each class and trigger
           §  Coverage by each test method on each class and trigger


           §  CAUTION!
             These results are stale as soon as you change the test or the class




Join the conversation: #forcewebinar
Let’s See The Demo Already!




Join the conversation: #forcewebinar
Use Case: UberJet




Join the conversation: #forcewebinar
Debugging Code




Join the conversation: #forcewebinar
Debugging with the Log Inspector

           §  Execution Log
                 •  The entire transaction, line by line and more

           §  Source / Variables
                 •  Current code location and variable values

           §  Stack
                 •  How you got where you are
                 •  How long each step took
           §  Execution Overview
                 •  Limits
                 •  Performance per action, per method


Join the conversation: #forcewebinar
When the log is not enough…checkpoints!

    A checkpoint is like a breakpoint, but cloud-approved
           §  Heap
                 •  Provide a view into the memory at the checkpoint
           §  SOQL query
                 •  Run a SOQL query at the checkpoint

           §  Apex Code
                 •  Inject a miniature apex snippet at the checkpoint




Join the conversation: #forcewebinar
Recap

         §  Testing Is Important, Testing Is Easy
                •  Test always
                •  Use the Developer Console to see results and code coverage statistics
         §  Debugging Is Hard, Debugging Can Be Easier
                •  The Log Inspector provides many views into the haystack
                •  Use Checkpoints to see the state of the world at a critical point




Join the conversation: #forcewebinar
Resources

         §  Developer Console topic page:
             http://wiki.developerforce.com/page/Developer_Console
         §  Next Steps
                •  Write More Tests!
                •  Use Developer Console To Run Your Tests
                •  Use Developer Console To Debug Your Code




Join the conversation: #forcewebinar

More Related Content

What's hot

Javascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsJavascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsSalesforce Developers
 
Virtual Dreamin Salesforce DevOps Top 10
Virtual Dreamin Salesforce DevOps Top 10Virtual Dreamin Salesforce DevOps Top 10
Virtual Dreamin Salesforce DevOps Top 10Richard Clark
 
The definitive guide to salesforce sandbox flosum
The definitive guide to salesforce sandbox flosumThe definitive guide to salesforce sandbox flosum
The definitive guide to salesforce sandbox flosumFlosum
 
Patterns of a "Good" Test Automation Framework, Locators & Data
Patterns of a "Good" Test Automation Framework, Locators & DataPatterns of a "Good" Test Automation Framework, Locators & Data
Patterns of a "Good" Test Automation Framework, Locators & DataAgile Testing Alliance
 
Promoting Agility with Running Tested Features - Lightening Talk
Promoting Agility with Running Tested Features - Lightening TalkPromoting Agility with Running Tested Features - Lightening Talk
Promoting Agility with Running Tested Features - Lightening TalkCamille Bell
 
Visual Studio ALM 2013 - Edition Comparison
Visual Studio ALM 2013 - Edition ComparisonVisual Studio ALM 2013 - Edition Comparison
Visual Studio ALM 2013 - Edition ComparisonSteve Lange
 
Integration Testing in AEM
Integration Testing in AEMIntegration Testing in AEM
Integration Testing in AEMconnectwebex
 
Continuous Integration and Testing with Branch Orgs
Continuous Integration and Testing with Branch OrgsContinuous Integration and Testing with Branch Orgs
Continuous Integration and Testing with Branch OrgsSalesforce Developers
 
An easy way to automate complex UI
An easy way to automate complex UIAn easy way to automate complex UI
An easy way to automate complex UIIvan Pashko
 
Team Development & Continuous Integration on the Salesforce Platform
Team Development & Continuous Integration on the Salesforce PlatformTeam Development & Continuous Integration on the Salesforce Platform
Team Development & Continuous Integration on the Salesforce PlatformCarlos Ramirez Martinez-Eiroa
 
Testing lightning components feb 15th 2018
Testing lightning components feb 15th 2018Testing lightning components feb 15th 2018
Testing lightning components feb 15th 2018Richard Clark
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkOleksiy Rezchykov
 
Automating the Impossible: End to End Team Development for ISVs (October 14, ...
Automating the Impossible: End to End Team Development for ISVs (October 14, ...Automating the Impossible: End to End Team Development for ISVs (October 14, ...
Automating the Impossible: End to End Team Development for ISVs (October 14, ...Salesforce Partners
 
Test Automation
Test AutomationTest Automation
Test AutomationTomas Riha
 
Client-Side Performance Testing
Client-Side Performance TestingClient-Side Performance Testing
Client-Side Performance TestingAnand Bagmar
 
Continuous Integration - Software development lifecycle for Force.com projects
Continuous Integration - Software development lifecycle for Force.com projectsContinuous Integration - Software development lifecycle for Force.com projects
Continuous Integration - Software development lifecycle for Force.com projectsAldo Fernandez
 
London SF Developers: Custom Lightning Component Error Handling
London SF Developers: Custom Lightning Component Error HandlingLondon SF Developers: Custom Lightning Component Error Handling
London SF Developers: Custom Lightning Component Error HandlingRichard Clark
 
How to Perform Test Automation With Gauge & Selenium Framework
How to Perform Test Automation With Gauge & Selenium Framework How to Perform Test Automation With Gauge & Selenium Framework
How to Perform Test Automation With Gauge & Selenium Framework Sarah Elson
 

What's hot (20)

Apex Testing Best Practices
Apex Testing Best PracticesApex Testing Best Practices
Apex Testing Best Practices
 
Javascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsJavascript-heavy Salesforce Applications
Javascript-heavy Salesforce Applications
 
Virtual Dreamin Salesforce DevOps Top 10
Virtual Dreamin Salesforce DevOps Top 10Virtual Dreamin Salesforce DevOps Top 10
Virtual Dreamin Salesforce DevOps Top 10
 
The definitive guide to salesforce sandbox flosum
The definitive guide to salesforce sandbox flosumThe definitive guide to salesforce sandbox flosum
The definitive guide to salesforce sandbox flosum
 
Patterns of a "Good" Test Automation Framework, Locators & Data
Patterns of a "Good" Test Automation Framework, Locators & DataPatterns of a "Good" Test Automation Framework, Locators & Data
Patterns of a "Good" Test Automation Framework, Locators & Data
 
Promoting Agility with Running Tested Features - Lightening Talk
Promoting Agility with Running Tested Features - Lightening TalkPromoting Agility with Running Tested Features - Lightening Talk
Promoting Agility with Running Tested Features - Lightening Talk
 
Visual Studio ALM 2013 - Edition Comparison
Visual Studio ALM 2013 - Edition ComparisonVisual Studio ALM 2013 - Edition Comparison
Visual Studio ALM 2013 - Edition Comparison
 
Integration Testing in AEM
Integration Testing in AEMIntegration Testing in AEM
Integration Testing in AEM
 
Continuous Integration and Testing with Branch Orgs
Continuous Integration and Testing with Branch OrgsContinuous Integration and Testing with Branch Orgs
Continuous Integration and Testing with Branch Orgs
 
An easy way to automate complex UI
An easy way to automate complex UIAn easy way to automate complex UI
An easy way to automate complex UI
 
Team Development & Continuous Integration on the Salesforce Platform
Team Development & Continuous Integration on the Salesforce PlatformTeam Development & Continuous Integration on the Salesforce Platform
Team Development & Continuous Integration on the Salesforce Platform
 
Testing lightning components feb 15th 2018
Testing lightning components feb 15th 2018Testing lightning components feb 15th 2018
Testing lightning components feb 15th 2018
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium Framework
 
Automating the Impossible: End to End Team Development for ISVs (October 14, ...
Automating the Impossible: End to End Team Development for ISVs (October 14, ...Automating the Impossible: End to End Team Development for ISVs (October 14, ...
Automating the Impossible: End to End Team Development for ISVs (October 14, ...
 
Test Automation
Test AutomationTest Automation
Test Automation
 
Client-Side Performance Testing
Client-Side Performance TestingClient-Side Performance Testing
Client-Side Performance Testing
 
EVOLVE'15 | Enhance | Rene Ugarte | AEM Quality Assurance
EVOLVE'15 | Enhance | Rene Ugarte | AEM Quality AssuranceEVOLVE'15 | Enhance | Rene Ugarte | AEM Quality Assurance
EVOLVE'15 | Enhance | Rene Ugarte | AEM Quality Assurance
 
Continuous Integration - Software development lifecycle for Force.com projects
Continuous Integration - Software development lifecycle for Force.com projectsContinuous Integration - Software development lifecycle for Force.com projects
Continuous Integration - Software development lifecycle for Force.com projects
 
London SF Developers: Custom Lightning Component Error Handling
London SF Developers: Custom Lightning Component Error HandlingLondon SF Developers: Custom Lightning Component Error Handling
London SF Developers: Custom Lightning Component Error Handling
 
How to Perform Test Automation With Gauge & Selenium Framework
How to Perform Test Automation With Gauge & Selenium Framework How to Perform Test Automation With Gauge & Selenium Framework
How to Perform Test Automation With Gauge & Selenium Framework
 

Viewers also liked

Inside the Force.com Query Optimizer Webinar
Inside the Force.com Query Optimizer WebinarInside the Force.com Query Optimizer Webinar
Inside the Force.com Query Optimizer WebinarSalesforce Developers
 
Understanding Your Consumers: Building Better campaigns
Understanding Your Consumers: Building Better campaignsUnderstanding Your Consumers: Building Better campaigns
Understanding Your Consumers: Building Better campaignsExperian
 
Postman Collection Format v2.0 (pre-draft)
Postman Collection Format v2.0 (pre-draft)Postman Collection Format v2.0 (pre-draft)
Postman Collection Format v2.0 (pre-draft)Postman
 
Salesforce API Series: Fast Parallel Data Loading with the Bulk API Webinar
Salesforce API Series: Fast Parallel Data Loading with the Bulk API WebinarSalesforce API Series: Fast Parallel Data Loading with the Bulk API Webinar
Salesforce API Series: Fast Parallel Data Loading with the Bulk API WebinarSalesforce Developers
 
Made With Creative Commons
Made With Creative CommonsMade With Creative Commons
Made With Creative CommonsPaul_Stacey
 
Creative Commons Certificates
Creative Commons CertificatesCreative Commons Certificates
Creative Commons CertificatesPaul_Stacey
 

Viewers also liked (8)

Inside the Force.com Query Optimizer Webinar
Inside the Force.com Query Optimizer WebinarInside the Force.com Query Optimizer Webinar
Inside the Force.com Query Optimizer Webinar
 
Understanding Your Consumers: Building Better campaigns
Understanding Your Consumers: Building Better campaignsUnderstanding Your Consumers: Building Better campaigns
Understanding Your Consumers: Building Better campaigns
 
Postman
PostmanPostman
Postman
 
Postman Collection Format v2.0 (pre-draft)
Postman Collection Format v2.0 (pre-draft)Postman Collection Format v2.0 (pre-draft)
Postman Collection Format v2.0 (pre-draft)
 
Salesforce API Series: Fast Parallel Data Loading with the Bulk API Webinar
Salesforce API Series: Fast Parallel Data Loading with the Bulk API WebinarSalesforce API Series: Fast Parallel Data Loading with the Bulk API Webinar
Salesforce API Series: Fast Parallel Data Loading with the Bulk API Webinar
 
Made With Creative Commons
Made With Creative CommonsMade With Creative Commons
Made With Creative Commons
 
Creative Commons Certificates
Creative Commons CertificatesCreative Commons Certificates
Creative Commons Certificates
 
En 20 minutos ... Chrome Developer Tools
En 20 minutos ... Chrome Developer ToolsEn 20 minutos ... Chrome Developer Tools
En 20 minutos ... Chrome Developer Tools
 

Similar to Advanced Testing and Debugging using the Developer Console webinar

AppExchange for Developers: Monetize your App in the Cloud Webinar
AppExchange for Developers: Monetize your App in the Cloud WebinarAppExchange for Developers: Monetize your App in the Cloud Webinar
AppExchange for Developers: Monetize your App in the Cloud WebinarSalesforce Developers
 
Winter 13 Release Developer Preview Webinar
Winter 13 Release Developer Preview WebinarWinter 13 Release Developer Preview Webinar
Winter 13 Release Developer Preview WebinarSalesforce Developers
 
Boost Your Career: Get Cloud-Trained and Certified
Boost Your Career: Get Cloud-Trained and CertifiedBoost Your Career: Get Cloud-Trained and Certified
Boost Your Career: Get Cloud-Trained and CertifiedSalesforce Developers
 
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14Salesforce Developers
 
[HCM Scrum Breakfast] How to improve product quality in Scrum Team
[HCM Scrum Breakfast] How to improve product quality in Scrum Team[HCM Scrum Breakfast] How to improve product quality in Scrum Team
[HCM Scrum Breakfast] How to improve product quality in Scrum TeamScrum Breakfast Vietnam
 
Java Best Practices - Tools, Performance, and Deployment
Java Best Practices - Tools, Performance, and DeploymentJava Best Practices - Tools, Performance, and Deployment
Java Best Practices - Tools, Performance, and DeploymentSalesforce Developers
 
Webinar: From Sandbox to Production: Demystifying Force.com Release Managemen...
Webinar: From Sandbox to Production: Demystifying Force.com Release Managemen...Webinar: From Sandbox to Production: Demystifying Force.com Release Managemen...
Webinar: From Sandbox to Production: Demystifying Force.com Release Managemen...Salesforce Developers
 
MavensMate: An Open Source Alternative to the Force.com IDE
MavensMate: An Open Source Alternative to the Force.com IDEMavensMate: An Open Source Alternative to the Force.com IDE
MavensMate: An Open Source Alternative to the Force.com IDESalesforce Developers
 
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...Shift Conference
 
Apex for Admins: Get Started with Apex in 30 Minutes! (part 1)
Apex for Admins: Get Started with Apex in 30 Minutes! (part 1)Apex for Admins: Get Started with Apex in 30 Minutes! (part 1)
Apex for Admins: Get Started with Apex in 30 Minutes! (part 1)Salesforce Developers
 
Web testing with Selenium
Web testing with SeleniumWeb testing with Selenium
Web testing with SeleniumXBOSoft
 
DevOps in Salesforce AppCloud
DevOps in Salesforce AppCloudDevOps in Salesforce AppCloud
DevOps in Salesforce AppCloudrsg00usa
 
SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA Webinar: Process Compression For Mobile App Dev 120612SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA Webinar: Process Compression For Mobile App Dev 120612SOASTA
 
Apex Trigger Debugging: Solving the Hard Problems
Apex Trigger Debugging: Solving the Hard ProblemsApex Trigger Debugging: Solving the Hard Problems
Apex Trigger Debugging: Solving the Hard ProblemsSalesforce Developers
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsMichael Lihs
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
Apex for Admins: Beyond the Basics (Part 2)
Apex for Admins: Beyond the Basics (Part 2) Apex for Admins: Beyond the Basics (Part 2)
Apex for Admins: Beyond the Basics (Part 2) Salesforce Developers
 

Similar to Advanced Testing and Debugging using the Developer Console webinar (20)

AppExchange for Developers: Monetize your App in the Cloud Webinar
AppExchange for Developers: Monetize your App in the Cloud WebinarAppExchange for Developers: Monetize your App in the Cloud Webinar
AppExchange for Developers: Monetize your App in the Cloud Webinar
 
Winter 13 Release Developer Preview Webinar
Winter 13 Release Developer Preview WebinarWinter 13 Release Developer Preview Webinar
Winter 13 Release Developer Preview Webinar
 
Boost Your Career: Get Cloud-Trained and Certified
Boost Your Career: Get Cloud-Trained and CertifiedBoost Your Career: Get Cloud-Trained and Certified
Boost Your Career: Get Cloud-Trained and Certified
 
Apex for Admins: Beyond the Basics
Apex for Admins: Beyond the BasicsApex for Admins: Beyond the Basics
Apex for Admins: Beyond the Basics
 
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
 
[HCM Scrum Breakfast] How to improve product quality in Scrum Team
[HCM Scrum Breakfast] How to improve product quality in Scrum Team[HCM Scrum Breakfast] How to improve product quality in Scrum Team
[HCM Scrum Breakfast] How to improve product quality in Scrum Team
 
Java Best Practices - Tools, Performance, and Deployment
Java Best Practices - Tools, Performance, and DeploymentJava Best Practices - Tools, Performance, and Deployment
Java Best Practices - Tools, Performance, and Deployment
 
Webinar: From Sandbox to Production: Demystifying Force.com Release Managemen...
Webinar: From Sandbox to Production: Demystifying Force.com Release Managemen...Webinar: From Sandbox to Production: Demystifying Force.com Release Managemen...
Webinar: From Sandbox to Production: Demystifying Force.com Release Managemen...
 
MavensMate: An Open Source Alternative to the Force.com IDE
MavensMate: An Open Source Alternative to the Force.com IDEMavensMate: An Open Source Alternative to the Force.com IDE
MavensMate: An Open Source Alternative to the Force.com IDE
 
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
 
Apex for Admins: Get Started with Apex in 30 Minutes! (part 1)
Apex for Admins: Get Started with Apex in 30 Minutes! (part 1)Apex for Admins: Get Started with Apex in 30 Minutes! (part 1)
Apex for Admins: Get Started with Apex in 30 Minutes! (part 1)
 
Web testing with Selenium
Web testing with SeleniumWeb testing with Selenium
Web testing with Selenium
 
DevOps in Salesforce AppCloud
DevOps in Salesforce AppCloudDevOps in Salesforce AppCloud
DevOps in Salesforce AppCloud
 
SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA Webinar: Process Compression For Mobile App Dev 120612SOASTA Webinar: Process Compression For Mobile App Dev 120612
SOASTA Webinar: Process Compression For Mobile App Dev 120612
 
Apex Trigger Debugging: Solving the Hard Problems
Apex Trigger Debugging: Solving the Hard ProblemsApex Trigger Debugging: Solving the Hard Problems
Apex Trigger Debugging: Solving the Hard Problems
 
Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Apex for Admins: Beyond the Basics (Part 2)
Apex for Admins: Beyond the Basics (Part 2) Apex for Admins: Beyond the Basics (Part 2)
Apex for Admins: Beyond the Basics (Part 2)
 

More from Salesforce Developers

Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSalesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceSalesforce Developers
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base ComponentsSalesforce Developers
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsSalesforce Developers
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaSalesforce Developers
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentSalesforce Developers
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsSalesforce Developers
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsSalesforce Developers
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsSalesforce Developers
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and TestingSalesforce Developers
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilitySalesforce Developers
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce dataSalesforce Developers
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionSalesforce Developers
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPSalesforce Developers
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceSalesforce Developers
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureSalesforce Developers
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DXSalesforce Developers
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectSalesforce Developers
 

More from Salesforce Developers (20)

Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component Performance
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base Components
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer Highlights
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX India
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local Development
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web Components
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer Highlights
 
Live coding with LWC
Live coding with LWCLive coding with LWC
Live coding with LWC
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and Testing
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura Interoperability
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An Introduction
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCP
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in Salesforce
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data Capture
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DX
 
Get Into Lightning Flow Development
Get Into Lightning Flow DevelopmentGet Into Lightning Flow Development
Get Into Lightning Flow Development
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS Connect
 

Advanced Testing and Debugging using the Developer Console webinar

  • 1. Advanced Testing & Debugging Getting the Most from the Developer Console Josh Kaplan, Salesforce.com, Sr. Product Manager @Josh SFDC Tony Tonev, Salesforce.com, Software Engineer
  • 2. Safe harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual property and other litigation, risks associated with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-Q for the most recent fiscal quarter ended July 31, 2012. This documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward- looking statements. Join the conversation: #forcewebinar
  • 3. Speakers Josh Kaplan Tony Tonev Sr. Product Manager, Software Engineer @JoshSFDC Join the conversation: #forcewebinar
  • 4. Follow Developer Force for the latest news @forcedotcom / #forcewebinar Developer Force – Force.com Community +Developer Force – Force.com Community Developer Force Developer Force group Join the conversation: #forcewebinar
  • 5. Have questions? §  We have an expert support team at the ready to answer your questions during the webinar. §  Ask your questions via the GoToWebinar Questions Pane. §  The speaker(s) will choose top questions to answer live at the end of the webinar. §  Please post your questions as we go along! §  Only post your question once; we’ll get to it as we go down the list. Join the conversation: #forcewebinar
  • 6. Agenda §  Testing Apex •  Why test? •  When test? •  How test? §  Code Coverage §  Advanced Debugging •  Log Inspector •  Checkpoints –  Set checkpoints –  View memory contents –  Inject logic Join the conversation: #forcewebinar
  • 7. Assumptions This webinar assumes the following: §  You know… •  …what Apex code is •  …how to launch the Developer Console §  You have… •  …used the Developer Console before •  …done debugging before But don’t worry, you can catch up via these resources: http://wiki.developerforce.com/page/Webinar:_Intro_to_Apex_Code_(2012-July) Join the conversation: #forcewebinar
  • 8. Why test? Join the conversation: #forcewebinar
  • 9. Testing Protects You From Others Join the conversation: #forcewebinar
  • 10. Testing Protects You From Us Join the conversation: #forcewebinar
  • 11. When should I test? Write tests throughout development §  Before development §  After development §  In their own @isTest classes You should test frequently! §  During development §  Before deployment §  During deployment §  During release preview window Join the conversation: #forcewebinar
  • 12. How can I run tests on my code? Salesforce provides several avenues for test execution §  Developer Console §  “Setup” User Interface §  Automatically during deployment §  Through the Tooling API *COMING SOON!* Join the conversation: #forcewebinar
  • 13. Developer Console Join the conversation: #forcewebinar
  • 14. Testing in “Setup” User Interface Join the conversation: #forcewebinar
  • 15. Asynchronous Test Execution Salesforce runs your tests in the background so they can be processed as resources allow. §  Asyncronous testing runs tests in no particular order §  It allows you to see status of tests as they complete §  The process is integrated into developer console Join the conversation: #forcewebinar
  • 16. Code Coverage We store the results of your testing to calculate code coverage, and show you these stored results in the developer console. §  Aggregate coverage for each class and trigger §  Coverage by each test method on each class and trigger §  CAUTION! These results are stale as soon as you change the test or the class Join the conversation: #forcewebinar
  • 17. Let’s See The Demo Already! Join the conversation: #forcewebinar
  • 18. Use Case: UberJet Join the conversation: #forcewebinar
  • 19. Debugging Code Join the conversation: #forcewebinar
  • 20. Debugging with the Log Inspector §  Execution Log •  The entire transaction, line by line and more §  Source / Variables •  Current code location and variable values §  Stack •  How you got where you are •  How long each step took §  Execution Overview •  Limits •  Performance per action, per method Join the conversation: #forcewebinar
  • 21. When the log is not enough…checkpoints! A checkpoint is like a breakpoint, but cloud-approved §  Heap •  Provide a view into the memory at the checkpoint §  SOQL query •  Run a SOQL query at the checkpoint §  Apex Code •  Inject a miniature apex snippet at the checkpoint Join the conversation: #forcewebinar
  • 22. Recap §  Testing Is Important, Testing Is Easy •  Test always •  Use the Developer Console to see results and code coverage statistics §  Debugging Is Hard, Debugging Can Be Easier •  The Log Inspector provides many views into the haystack •  Use Checkpoints to see the state of the world at a critical point Join the conversation: #forcewebinar
  • 23. Resources §  Developer Console topic page: http://wiki.developerforce.com/page/Developer_Console §  Next Steps •  Write More Tests! •  Use Developer Console To Run Your Tests •  Use Developer Console To Debug Your Code Join the conversation: #forcewebinar