Special offers now — see discounted courses.
day
:
hour
:
min
:
sec
See special offers
Introduction to Test Classes in Salesforce

Introduction to Test Classes in Salesforce

1h 27mBeginner2019-04-24

Authors

Duard Lynn Davis

Duard Lynn Davis

Expert in Salesforce development

Course details

The ability to write test code is a valuable skill for any developer who customizes the Salesforce platform for their organization. In this course, join instructor Duard Lynn Davis as he shows why test classes are needed, how to write them for supportability, and how to achieve maximum code coverage. Learn how to create a basic test class, implement test code using test factory methods, and address common concerns with test classes, including how to use asserts to validate that your code is performing as expected. Plus, explore more advanced testing topics, such as how to test each aspect of batch Apex code.

Learning objectives
The value of writing proper test code
Setting up and customizing a test factory
Using the test factory to create test code
Best practices for writing test code
Adding system asserts into test code
Advantages of custom metadata
Writing test classes for batch Apex and @future

Skills covered

CRM AdministrationSalesforce.comSalesforceSoftware TestingIntroduction toNetwork and System AdministrationSoftware Development

Concepts

0. Introduction

  • 01 - The power of test classes in Salesforce
  • 02 - What you should know

1. The Need for Tests

  • 03 - Test class requirements
  • 04 - Value of test classes
  • 05 - Test-driven development
  • 06 - Miscellaneous tests

2. Write Tests

  • 07 - Basic test class for Apex code
  • 08 - Test data creation and validation
  • 09 - Naming convention - Test classes
  • 10 - Initial test class modifications
  • 11 - Coding example - Test utility
  • 12 - Testing using a test factory
  • 13 - Set global values for the test factory
  • 14 - Set up a test factory
  • 15 - Customize a test factory
  • 16 - Testing with a test factory

3. Common Concerns with Test Classes

  • 17 - Best practices with test class
  • 18 - System asserts
  • 19 - Static resources
  • 20 - Custom settings vs. Custom metadata
  • 21 - Profiles and record types

4. Beyond the Basics

  • 22 - Advanced testing topics
  • 23 - Batch Apex
  • 24 - Mock framework
  • 25 - Testing @future
  • 26 - Testing visual force pages

Conclusion

  • 27 - Next steps

Related courses

About us

LyndaKade is a leading learning platform that helps people learn business, software, technology, and creative skills to achieve personal and professional goals.

Phone numberAparat ChannelTelegram SupportTelegram ChannelInstagram Page

All rights to this site belong to LyndaKade.

Terms of Service|Privacy Policy

نماد الکترونیک enamad در صورت اتصال با آی‌پی داخل کشور، نمایش داده خواهد شد.
logo-samandehi - لوگو ساماندهی
zarinpal
zibal