Giter VIP home page Giter VIP logo

df18's Introduction

df18

Testing Lightning Flow Automations

Dreamforce Video

Code from our Dreamforce Session: Testing Lightning Flow Automations

  • Package.xml: Zip file containing all of the directories and files needed to deploy via SFDX or Developer Workbench.
  • Classes
    • TestAddressUpdates: Test class sets up Account and Contact data for testing Process Builder Automation that fills missing Contact addresses from the Account address data.
    • TestFlow: Test class sets up input variable for autolaunch Flow and tests the the Flow works as expected to double a number.
    • TestSetUpData: Reuseable methods to create specific combinations of test data for two different business processes, all contained in a single test class.
    • TestUpdates: Test class sets up basic test data from a Salesforce Developer Edition org and tests that the Contact data all has related Account data as expected.
  • Flows
    • Contact Address Update: Simply copies Account address data into Contact records that are missing addresses.
    • Doubler: Simply doubles any number it is given and returns the doubled number. If you divide by 10, you have calculated a decent tip.
  • Static Resources:
    • Account: Numbered 88-99 just to demonstrate that indexes must be sequential, but can start with any number; Account data from Developer Edition org.
    • Contact: Numbered beginning with 1, related to parent Account via the Account indexes described above; Contact data from Developer Edition org.
    • Case: Just another example of how data is set up for the Test.loadData method of test data creation; Case data from Developer Edition org.
    • Contact Address Process: Replaces the previous Contact data file to demonstrate data input with missing addresses and the related business process, which inserts Account address data into Contact address fields automatically.
  • Docs: Reserved for future uses such as slide and video links.

Other resources:

Useful SOQL: SELECT Id, ApexTestClass.Name, TestMethodName, FlowVersion.MasterLabel, NumElementsCovered, NumElementsNotCovered FROM FlowTestCoverage

Essential Testing Techniques

Dreamforce Slides

df18's People

Contributors

snugsfbay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.