SlideShare una empresa de Scribd logo
1 de 22
ApexUnit:
Open Source Test
Framework for Apex
@CDATSFDC_COM
Vamshidhar Gandham, LMTS, Software Engineering
Scott Glaser, Senior Manager, Software Engineering
Increasing Productivity of Apex Development
Forward-Looking Statements
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 any litigation, risks associated with completed and any 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-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most
recent fiscal quarter. These 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.
1. Introduction
- Challenges with Apex Development
2. ApexUnit
- What is ApexUnit
- Features
3. Demo
- Getting started
- Road map
Agenda
• How many of you code/work in Apex?
Questions for You
• How many of you encounter challenges in
testing Apex code?
Challenges Managing Apex Code Quality
1. Code Coverage
2. Grouping and Filtering Classes
3. Automated Execution and Detailed Reporting
Vamshidhar Gandham
LMTS Software Engineering,
Salesforce.com
What Is ApexUnit?
GOAL: Evolved from xUnit frameworks like JUnit and TestNG
to simplify apex code quality management. Open source it
- CLI based tool
- Run tests asynchronously
- Extensive code coverage reports
- Seamless integration with CI engines
- Auto validate quality gates
Code Coverage Metrics
Consolidated code coverage metrics - Actionable items for developers
- Sorted by code coverage %
- Uncovered vs Covered lines
- Org-wide code coverage
- Team code coverage
- API version of source class
- Modularity: Length of the class
Challenges
1. Code Coverage
2. Grouping and Filtering Classes
3. Automated Execution and Detailed
Reporting
• Segregating ownership in a shared sfdc org
- Ability to group test suites (xUnit)
- Custom test suites to modularize suites
- Applies to src code
• How to filter
- Static : Manifest files
- Dynamic : Regular expressions
• Multiple manifest files and regular exp.
Grouping and Filtering
Challenges
1. Code Coverage
2. Grouping and Filtering Classes
3. Automated Execution and Detailed
Reporting
• Resultant DS = (manifest) UNION (reg. exp)
• Application:
- Static : Legacy classes
- Dynamic : Brand new classes
• Recommended Naming convention
- ProjectA_ScrumTeamB_ModuleC_YourClassName
Grouping and Filtering (Contd…)
STATIC DYNAMIC
ApexUnit in CI/CD Pipeline
• Customizable code coverage threshold
• Incremental progression from 1- 100% (75-100 for customer orgs)
• Auto abort ? PS -9 | Kill for long running tests (customizable)
• Deep dive test reports with drill-down interface
• Seamless integration with CI engines
Challenges
1. Code Coverage
2. Grouping and Filtering Classes
3. Automated Execution and Detailed
Reporting
Kumonium UI Tests
Checkmarx Scan (async)
Results
Results
Results
Dynamic Scan
(async)
Results
Grinder Performance Tests
Next Step
Results
Deploy &
Build
Check-in
VCS
Jenkins
(dashboard)
iPromote
Continuous Delivery Pipeline – Force.com
1. Challenges with Apex Development
2. ApexUnit
- What is ApexUnit
- Features
3. Demo
- Getting started
- Road Map
Recap
Demo
• https://github.com/forcedotcom/ApexUnit
• Modify/Add manifest files for test/source classes
• Identify the regex for your test/source classes
• Check-in the project to SCM
• Clone and configure the jenkins job
ApexUnit wiki page
Getting Started with ApexUnit 2.x
● Contribution guide for ApexUnit
● More OSS projects:
○ https://salesforce.github.io/
○ https://github.com/forcedotcom
○ https://github.com/salesforce
We want you to contribute!
Road Map
• Code coverage at method level for each test class
• Leverage “Wave” for analytics on report
• Integration with cloud CI systems
• Templatizing CI step on CI systems (on-premise
and/or cloud)
Thank Y u
Sample Report Using ApexUnit 2.x
Sample Report Using ApexUnit 2.x
Continued..
Jenkins Runtime Parameters
Sample ApexUnit Test Report

Más contenido relacionado

La actualidad más candente

Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsSOASTA
 
Achieve Performance Testing Excellence for Your SAP Apps
Achieve Performance Testing Excellence for Your SAP AppsAchieve Performance Testing Excellence for Your SAP Apps
Achieve Performance Testing Excellence for Your SAP AppsNeotys
 
Testing a Microservices Architecture
Testing a Microservices ArchitectureTesting a Microservices Architecture
Testing a Microservices ArchitectureParasoft
 
Continuous Testing and New Tools for Automation - Presentation from StarWest ...
Continuous Testing and New Tools for Automation - Presentation from StarWest ...Continuous Testing and New Tools for Automation - Presentation from StarWest ...
Continuous Testing and New Tools for Automation - Presentation from StarWest ...Sauce Labs
 
Drive Faster Quality Insights through Customized Test Automation
Drive Faster Quality Insights through Customized Test AutomationDrive Faster Quality Insights through Customized Test Automation
Drive Faster Quality Insights through Customized Test AutomationPerfecto by Perforce
 
Appium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous IntegrationAppium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous IntegrationTechWell
 
Virtual Dreamin Salesforce DevOps Top 10
Virtual Dreamin Salesforce DevOps Top 10Virtual Dreamin Salesforce DevOps Top 10
Virtual Dreamin Salesforce DevOps Top 10Richard Clark
 
Drive Faster Quality Insights through Customized Test Automation - Part 2
Drive Faster Quality Insights through Customized Test Automation - Part 2Drive Faster Quality Insights through Customized Test Automation - Part 2
Drive Faster Quality Insights through Customized Test Automation - Part 2Perfecto by Perforce
 
Release Management for Large Enterprises
Release Management for Large EnterprisesRelease Management for Large Enterprises
Release Management for Large EnterprisesSalesforce Developers
 
Agile Load Testing In The Real World
Agile Load Testing In The Real WorldAgile Load Testing In The Real World
Agile Load Testing In The Real WorldSOASTA
 
Continuous Testing of Cloud Applications
Continuous Testing of Cloud ApplicationsContinuous Testing of Cloud Applications
Continuous Testing of Cloud ApplicationsTechWell
 
An Agile Testing Dashboard: Metrics that Matter
An Agile Testing Dashboard: Metrics that MatterAn Agile Testing Dashboard: Metrics that Matter
An Agile Testing Dashboard: Metrics that MatterTechWell
 
Automate More with Selenium for your RWD
Automate More with Selenium for your RWDAutomate More with Selenium for your RWD
Automate More with Selenium for your RWDPerfecto by Perforce
 

La actualidad más candente (20)

Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and Jenkins
 
Four Keys to Efficient DevOps
Four Keys to Efficient DevOpsFour Keys to Efficient DevOps
Four Keys to Efficient DevOps
 
Achieve Performance Testing Excellence for Your SAP Apps
Achieve Performance Testing Excellence for Your SAP AppsAchieve Performance Testing Excellence for Your SAP Apps
Achieve Performance Testing Excellence for Your SAP Apps
 
Testing a Microservices Architecture
Testing a Microservices ArchitectureTesting a Microservices Architecture
Testing a Microservices Architecture
 
Continuous testing
Continuous testing Continuous testing
Continuous testing
 
Selenium at Salesforce Scale
Selenium at Salesforce ScaleSelenium at Salesforce Scale
Selenium at Salesforce Scale
 
Continuous Testing and New Tools for Automation - Presentation from StarWest ...
Continuous Testing and New Tools for Automation - Presentation from StarWest ...Continuous Testing and New Tools for Automation - Presentation from StarWest ...
Continuous Testing and New Tools for Automation - Presentation from StarWest ...
 
Drive Faster Quality Insights through Customized Test Automation
Drive Faster Quality Insights through Customized Test AutomationDrive Faster Quality Insights through Customized Test Automation
Drive Faster Quality Insights through Customized Test Automation
 
Appium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous IntegrationAppium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous Integration
 
A Story of Continuous Integration
A Story of Continuous IntegrationA Story of Continuous Integration
A Story of Continuous Integration
 
Test Automation in Agile
Test Automation in AgileTest Automation in Agile
Test Automation in Agile
 
Virtual Dreamin Salesforce DevOps Top 10
Virtual Dreamin Salesforce DevOps Top 10Virtual Dreamin Salesforce DevOps Top 10
Virtual Dreamin Salesforce DevOps Top 10
 
Drive Faster Quality Insights through Customized Test Automation - Part 2
Drive Faster Quality Insights through Customized Test Automation - Part 2Drive Faster Quality Insights through Customized Test Automation - Part 2
Drive Faster Quality Insights through Customized Test Automation - Part 2
 
Release Management for Large Enterprises
Release Management for Large EnterprisesRelease Management for Large Enterprises
Release Management for Large Enterprises
 
Agile Load Testing In The Real World
Agile Load Testing In The Real WorldAgile Load Testing In The Real World
Agile Load Testing In The Real World
 
Continuous Testing of Cloud Applications
Continuous Testing of Cloud ApplicationsContinuous Testing of Cloud Applications
Continuous Testing of Cloud Applications
 
Dev ops
Dev opsDev ops
Dev ops
 
An Agile Testing Dashboard: Metrics that Matter
An Agile Testing Dashboard: Metrics that MatterAn Agile Testing Dashboard: Metrics that Matter
An Agile Testing Dashboard: Metrics that Matter
 
Continuous Delivery Maturity Model
Continuous Delivery Maturity ModelContinuous Delivery Maturity Model
Continuous Delivery Maturity Model
 
Automate More with Selenium for your RWD
Automate More with Selenium for your RWDAutomate More with Selenium for your RWD
Automate More with Selenium for your RWD
 

Similar a ApexUnit: Open source test framework for apex

Scaling to Millions of Devices and Billions of Events
Scaling to Millions of Devices and Billions of EventsScaling to Millions of Devices and Billions of Events
Scaling to Millions of Devices and Billions of EventsSalesforce Developers
 
Building einstein analytics apps uk-compressed
Building einstein analytics apps   uk-compressedBuilding einstein analytics apps   uk-compressed
Building einstein analytics apps uk-compressedrikkehovgaard
 
Environment & Release Management
Environment & Release ManagementEnvironment & Release Management
Environment & Release Managementelliando dias
 
Dreamforce 2008 : Behind-the-Scenes @ Salesforce.com R&D: How We Deliver 3 Ma...
Dreamforce 2008 : Behind-the-Scenes @ Salesforce.com R&D: How We Deliver 3 Ma...Dreamforce 2008 : Behind-the-Scenes @ Salesforce.com R&D: How We Deliver 3 Ma...
Dreamforce 2008 : Behind-the-Scenes @ Salesforce.com R&D: How We Deliver 3 Ma...Steve Greene
 
Manage Development in Your Org with Salesforce Governance Framework
Manage Development in Your Org with Salesforce Governance FrameworkManage Development in Your Org with Salesforce Governance Framework
Manage Development in Your Org with Salesforce Governance FrameworkSalesforce Developers
 
Utilizing SVN Jenkins to Manage Multi-line Development to Deployments
Utilizing SVN  Jenkins to Manage Multi-line Development to DeploymentsUtilizing SVN  Jenkins to Manage Multi-line Development to Deployments
Utilizing SVN Jenkins to Manage Multi-line Development to DeploymentsTeresa Garcia-Bovenmyer ☁
 
Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Mark Adcock
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Salesforce Developers
 
Decluttering your Salesfroce org
Decluttering your Salesfroce orgDecluttering your Salesfroce org
Decluttering your Salesfroce orgRoy Gilad
 
Elevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance TrackElevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance TrackCarolEnLaNube
 
I F H005 Dushyant Pandya91807
I F H005 Dushyant  Pandya91807I F H005 Dushyant  Pandya91807
I F H005 Dushyant Pandya91807Dreamforce07
 
Salesforce Developer User Group Munich - October 2016
Salesforce Developer User Group Munich - October 2016Salesforce Developer User Group Munich - October 2016
Salesforce Developer User Group Munich - October 2016René Winkelmeyer
 
Inside the Enterprise Case Studies of Customer Apps
Inside the Enterprise Case Studies of Customer AppsInside the Enterprise Case Studies of Customer Apps
Inside the Enterprise Case Studies of Customer Appsdreamforce2006
 
CCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to ApexCCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to ApexPeter Chittum
 
Apex Nuances: Transitioning to Force.com Development
Apex Nuances: Transitioning to Force.com DevelopmentApex Nuances: Transitioning to Force.com Development
Apex Nuances: Transitioning to Force.com DevelopmentSalesforce Developers
 

Similar a ApexUnit: Open source test framework for apex (20)

Scaling to Millions of Devices and Billions of Events
Scaling to Millions of Devices and Billions of EventsScaling to Millions of Devices and Billions of Events
Scaling to Millions of Devices and Billions of Events
 
Coding in the App Cloud
Coding in the App CloudCoding in the App Cloud
Coding in the App Cloud
 
Building einstein analytics apps uk-compressed
Building einstein analytics apps   uk-compressedBuilding einstein analytics apps   uk-compressed
Building einstein analytics apps uk-compressed
 
Development Best Practices
Development Best PracticesDevelopment Best Practices
Development Best Practices
 
Environment & Release Management
Environment & Release ManagementEnvironment & Release Management
Environment & Release Management
 
Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
 
Dreamforce 2008 : Behind-the-Scenes @ Salesforce.com R&D: How We Deliver 3 Ma...
Dreamforce 2008 : Behind-the-Scenes @ Salesforce.com R&D: How We Deliver 3 Ma...Dreamforce 2008 : Behind-the-Scenes @ Salesforce.com R&D: How We Deliver 3 Ma...
Dreamforce 2008 : Behind-the-Scenes @ Salesforce.com R&D: How We Deliver 3 Ma...
 
Manage Development in Your Org with Salesforce Governance Framework
Manage Development in Your Org with Salesforce Governance FrameworkManage Development in Your Org with Salesforce Governance Framework
Manage Development in Your Org with Salesforce Governance Framework
 
Introduction to Force.com
Introduction to Force.comIntroduction to Force.com
Introduction to Force.com
 
Utilizing SVN Jenkins to Manage Multi-line Development to Deployments
Utilizing SVN  Jenkins to Manage Multi-line Development to DeploymentsUtilizing SVN  Jenkins to Manage Multi-line Development to Deployments
Utilizing SVN Jenkins to Manage Multi-line Development to Deployments
 
Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17
 
Decluttering your Salesfroce org
Decluttering your Salesfroce orgDecluttering your Salesfroce org
Decluttering your Salesfroce org
 
Elevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance TrackElevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance Track
 
I F H005 Dushyant Pandya91807
I F H005 Dushyant  Pandya91807I F H005 Dushyant  Pandya91807
I F H005 Dushyant Pandya91807
 
Einstein Analytics for Developers
Einstein Analytics for DevelopersEinstein Analytics for Developers
Einstein Analytics for Developers
 
Salesforce Developer User Group Munich - October 2016
Salesforce Developer User Group Munich - October 2016Salesforce Developer User Group Munich - October 2016
Salesforce Developer User Group Munich - October 2016
 
Inside the Enterprise Case Studies of Customer Apps
Inside the Enterprise Case Studies of Customer AppsInside the Enterprise Case Studies of Customer Apps
Inside the Enterprise Case Studies of Customer Apps
 
CCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to ApexCCT London 2013 Theatre Intro to Apex
CCT London 2013 Theatre Intro to Apex
 
Apex Nuances: Transitioning to Force.com Development
Apex Nuances: Transitioning to Force.com DevelopmentApex Nuances: Transitioning to Force.com Development
Apex Nuances: Transitioning to Force.com Development
 

Último

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Último (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

ApexUnit: Open source test framework for apex

  • 1. ApexUnit: Open Source Test Framework for Apex @CDATSFDC_COM Vamshidhar Gandham, LMTS, Software Engineering Scott Glaser, Senior Manager, Software Engineering Increasing Productivity of Apex Development
  • 2. Forward-Looking Statements 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 any litigation, risks associated with completed and any 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-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These 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.
  • 3. 1. Introduction - Challenges with Apex Development 2. ApexUnit - What is ApexUnit - Features 3. Demo - Getting started - Road map Agenda
  • 4. • How many of you code/work in Apex? Questions for You • How many of you encounter challenges in testing Apex code?
  • 5. Challenges Managing Apex Code Quality 1. Code Coverage 2. Grouping and Filtering Classes 3. Automated Execution and Detailed Reporting
  • 6. Vamshidhar Gandham LMTS Software Engineering, Salesforce.com
  • 7. What Is ApexUnit? GOAL: Evolved from xUnit frameworks like JUnit and TestNG to simplify apex code quality management. Open source it - CLI based tool - Run tests asynchronously - Extensive code coverage reports - Seamless integration with CI engines - Auto validate quality gates
  • 8. Code Coverage Metrics Consolidated code coverage metrics - Actionable items for developers - Sorted by code coverage % - Uncovered vs Covered lines - Org-wide code coverage - Team code coverage - API version of source class - Modularity: Length of the class Challenges 1. Code Coverage 2. Grouping and Filtering Classes 3. Automated Execution and Detailed Reporting
  • 9. • Segregating ownership in a shared sfdc org - Ability to group test suites (xUnit) - Custom test suites to modularize suites - Applies to src code • How to filter - Static : Manifest files - Dynamic : Regular expressions • Multiple manifest files and regular exp. Grouping and Filtering Challenges 1. Code Coverage 2. Grouping and Filtering Classes 3. Automated Execution and Detailed Reporting
  • 10. • Resultant DS = (manifest) UNION (reg. exp) • Application: - Static : Legacy classes - Dynamic : Brand new classes • Recommended Naming convention - ProjectA_ScrumTeamB_ModuleC_YourClassName Grouping and Filtering (Contd…) STATIC DYNAMIC
  • 11. ApexUnit in CI/CD Pipeline • Customizable code coverage threshold • Incremental progression from 1- 100% (75-100 for customer orgs) • Auto abort ? PS -9 | Kill for long running tests (customizable) • Deep dive test reports with drill-down interface • Seamless integration with CI engines Challenges 1. Code Coverage 2. Grouping and Filtering Classes 3. Automated Execution and Detailed Reporting
  • 12. Kumonium UI Tests Checkmarx Scan (async) Results Results Results Dynamic Scan (async) Results Grinder Performance Tests Next Step Results Deploy & Build Check-in VCS Jenkins (dashboard) iPromote Continuous Delivery Pipeline – Force.com
  • 13. 1. Challenges with Apex Development 2. ApexUnit - What is ApexUnit - Features 3. Demo - Getting started - Road Map Recap
  • 14. Demo
  • 15. • https://github.com/forcedotcom/ApexUnit • Modify/Add manifest files for test/source classes • Identify the regex for your test/source classes • Check-in the project to SCM • Clone and configure the jenkins job ApexUnit wiki page Getting Started with ApexUnit 2.x
  • 16. ● Contribution guide for ApexUnit ● More OSS projects: ○ https://salesforce.github.io/ ○ https://github.com/forcedotcom ○ https://github.com/salesforce We want you to contribute!
  • 17. Road Map • Code coverage at method level for each test class • Leverage “Wave” for analytics on report • Integration with cloud CI systems • Templatizing CI step on CI systems (on-premise and/or cloud)
  • 19. Sample Report Using ApexUnit 2.x
  • 20. Sample Report Using ApexUnit 2.x Continued..