Enterprise applications are a perfect example of the complexity of modern software — and the difficulty of testing it. Take Salesforce, for example. With a market share of nearly 20%, it is the biggest CRM vendor. Salesforce is highly customizable. There are hundreds of apps and plugins, custom workflows and rules, user roles and permissions, and a variety of platforms and devices to consider. Because of this, no two companies will have the same deployment. Naturally, this presents a challenge for those responsible for keeping everything running smoothly.
Anyone who’s worked with Salesforce knows that there are two versions: Classic and Lightning. It should come as no surprise that they are coded completely differently. When switching between versions, the entire underlying object library changes. Let’s compare the object properties and code of two identical functions in each version:
Figure: Creating a task in Salesforce Classic
Figure: Creating a task in Salesforce Lightning
Because these objects are identified differently, code-based automation tools like Selenium will require different test scripts for each version. And because Salesforce has loading screens which may hide on-screen elements, there is a clear advantage to an approach that uses computer vision and OCR to visually validate the UI. However, there certainly is something to gain from also looking at the code.
Eggplant, which has been doing UI automation for nearly two decades, takes this approach to Salesforce testing. First, Eggplant analyzes the modules in the Salesforce instance, which can be either standard or customized. By extracting the metadata that describes the various fields and customized rules, Eggplant is able to generate an accurate map of the data flows within Salesforce. In turn, this allows the automation software to generate a library of pre-written scripts, or snippets, which are used to drive the testing model. This entire process takes just a few minutes, several orders of magnitude shorter than more traditional methods. This goes beyond standard UI automation, as the tests themselves are being generated by the AI.