Salesforce testing Archives - AI-Powered End-to-End Testing | Applitools https://app14743.cloudwayssites.com/blog/tag/salesforce-testing/ Applitools delivers full end-to-end test automation with AI infused at every step. Tue, 17 Jun 2025 17:29:44 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.8 Why Visual Testing is Crucial for Salesforce QA Teams https://app14743.cloudwayssites.com/blog/why-visual-testing-is-crucial-for-salesforce-qa-teams/ Wed, 14 May 2025 17:33:51 +0000 https://app14743.cloudwayssites.com/?p=60373 Enhance your Salesforce QA skills. Discover how visual testing can prevent issues and improve the overall user experience.

The post Why Visual Testing is Crucial for Salesforce QA Teams appeared first on AI-Powered End-to-End Testing | Applitools.

]]>
Graphic showing Salesforce logo and user, dashboard, and eye icons

As a Salesforce tester, if you’re unfamiliar with visual testing—don’t worry, you’re in the right place! This blog will walk you through everything from the basics of visual testing to practical Salesforce-specific examples. You’ll learn how to catch visual bugs that can break user trust and impact experience. By the end, you’ll be confident in applying visual testing to your Salesforce QA projects.

Let’s begin.

Real Examples of Visual Bugs in Salesforce

Consider this Scenario

You are working on a team and have just deployed a great feature. The developer is happy with how it turned out, and the project manager is satisfied with the delivery. As a QA, you gave the green signal after testing—everything looked perfect. And the best part? The entire process went smoothly, without any escalations or last-minute issues.

That’s what successful teamwork looks like: the developer built it right the first time, the tester confirmed, and the client exclaimed, ‘This is great!’ It’s rare that things go so smoothly every single time.

Is everything really this easy? In practice, the real world likes to surprise us…

A Real World Scenario

The deployment happened on Friday, and on Monday morning, you and your team received an email. In that email, the surprises begin to unfold. One by one, the bug reports start coming in.

Someone points out a couple of issues:

The first issue: the “Add to Cart” and “Configure” buttons overlap in the Salesforce CPQ cart, making it difficult for users to interact with them properly.

Screenshot of Salesforce visual bug showing 'Add to cart' and 'Configure' buttons overlapping
Screenshot from Salesforce Community

The second issue: a user reports that transparent PNG images do not display correctly on mobile devices when the ‘Optimize Images for Mobile’ setting is enabled in Communities.

Screenshot showing an error message in Salesforce
Screenshot from Salesforce Community

What looked like a smooth and successful deployment is now showing signs of trouble.

Why Salesforce QA Teams Should Prioritize Visual Testing

As a Salesforce tester, visual testing means checking how the UI looks and behaves—not just whether it works.

You’re not just checking if buttons work or forms get submitted. As a Salesforce tester, you’re also making sure:

  • The layout looks good on both desktop and mobile
  • Fields show up correctly based on user roles and permissions
  • Lightning components display well in different browsers
  • Page layouts and themes don’t break the design
  • Third-party apps don’t affect the visual appearance
  • What you saw in UAT looks exactly the same in Production

This is especially crucial in Salesforce, where small changes in configuration or access can lead to big differences in what users see.

We all know that Salesforce is a robust platform where a lot of emphasis is placed on configuration, customization, personalization, and a user-centric approach. Specifically, when we talk about Lightning Components and Experience Cloud, the UI can vary based on several criteria, such as:

  • Profile permissions
  • Screen resolution
  • Browser type
  • And many other factors…

As a Salesforce QA team member, you may write and update many test cases, and everything might seem to be running smoothly in terms of functionality. However, unless you check how it actually renders, you’re missing a huge part of the user experience.

At this point, we can’t afford to ignore visual testing or say we’ll deal with it later. It has become a necessity to ensure usability.

How to Implement Visual Testing in Salesforce Projects

  1. It all starts with awareness and education—helping your engineering team build the mindset to treat visual diffs just like code diffs, reviewing and approving them with the same seriousness.
  2. Start small by choosing high-impact pages like the CPQ cart, lead detail, and dashboards. These are user-critical areas where even minor visual issues can hurt usability and trust.
  3. Focus on consistently monitoring visual test results with every release and pull request. This helps catch unexpected UI changes early and maintain visual consistency.
  4. Make visual testing part of your testing culture—ensure your team treats visual bugs with the same importance as functional bugs. It might be a bit challenging initially, but once this habit is established, it will bring strong results in the long run.
  5. Take clear screenshots of important pages to set a visual starting point. Later, these baseline screenshots are used to spot any unexpected UI changes during testing.

How Visual Testing Improves UI Consistency in Salesforce

Here are some hard-learned reasons why Salesforce QA teams must take visual testing seriously:

  • Brand Image and Customer Confidence: In Experience Cloud or partner portals, maintaining visual consistency is key to your brand’s identity. A broken UI leads to a broken reputation—what users see is what they’ll believe.
  • Totally Unpredictable UI: You’re not just testing code. You’re testing flows, field visibility, and permission-based rendering, all of which affect the layout. With three releases every year, each bringing new updates and sometimes removing existing features, the UI can become unpredictable.
  • High Deployment Frequency: With frequent changes in CI/CD pipelines, even small style updates can lead to visual mismatches. In real life, you might notice that something looks one way in UAT but appears differently in Production after deployment.
  • Functional Tests Don’t Catch UI Issues: All your test scripts have passed—congratulations! But the point is, a poor layout can still disrupt the user experience. That’s exactly when visual testing comes into the picture.
  • UI Changes Based on User Roles: Different users may see different screens or fields—visual testing helps make sure everything looks right for everyone.

Valuable Takeaways for Salesforce QA Teams

Whether you’re testing Sales Cloud, Service Cloud, or an extensively customized Experience Cloud portal, these key principles apply:

  • Start Small with High-Impact Pages
    Begin with pages that matter most—such as CPQ carts, lead detail views, or dashboards. These are user-critical zones where even minor UI issues can impact adoption.
  • Create Visual Baselines
    Take clear screenshots of important pages during UAT. Use them as reference points for future deployments to catch unexpected changes.
  • Automate Screenshot Comparisons
    Don’t rely on manual ‘look and feel’ reviews. Use tools like Applitools to automate visual checks, test across browsers and devices, and ensure UI integrity on every release.
  • Involve the Whole Team
    Encourage developers, testers, and product owners to review visual diffs during pull requests. It reinforces a culture where UI quality is everyone’s responsibility.

Don’t underestimate visual appeal as part of user experience—in Salesforce, a flawless UI through visual testing can be the difference between closing or losing a deal.

Wrapping Up: The Business Case for Visual Testing in Salesforce

Visual testing is super helpful when it comes to making sure your Salesforce app not only works well but also looks right on different browsers, devices, and for different users. 

In Salesforce, things like profile permissions, Lightning page setups, and screen sizes can change how components appear. That’s why visual testing is important—it helps you catch UI issues early.

It might seem tricky at first, but Salesforce testing with Applitools makes it easier. This blog gave you a basic idea of why visual testing matters to Salesforce QA teams and how you can get started. Now you’re ready to explore more and improve your testing process.

Quick Answers

How can Salesforce QA teams get started with visual testing?

Salesforce QA teams can begin with visual testing by:

– Focusing on high-impact pages like CPQ carts or dashboards.
– Creating visual baselines by taking screenshots of key pages during UAT (User Acceptance Testing).
– Automating screenshot comparisons using tools like Applitools to detect UI discrepancies with each release.
– Involving the whole team in reviewing visual differences during pull requests.
– Educating the team on the importance of treating visual bugs with the same seriousness as functional bugs.

What types of visual bugs are common in Salesforce deployments?

Common visual bugs in Salesforce deployments include:

– Overlapping buttons or elements.
– Incorrect display of images, especially on mobile devices.
– Layout issues due to variations in screen resolution or browser type.
– Incorrect field visibility based on user roles and permissions.
– Differences in UI between UAT and Production environments.
– Inconsistencies caused by third-party app integrations or Lightning component customizations.

Why are functional tests not enough to guarantee a good user experience in Salesforce?

While functional tests ensure that features work as expected, they don’t verify the visual presentation of the application. In Salesforce, UI can be highly dynamic and personalized, with elements appearing or disappearing based on configurations.

Functional tests alone might pass even if the layout is broken or if elements are not displayed correctly. Visual testing complements functional testing by ensuring the UI is both functional and visually appealing, leading to a better user experience.

How does Salesforce’s frequent release schedule impact the need for visual testing?

Salesforce has a regular release schedule with three major updates per year. These updates often include UI changes, new features that can impact existing layouts, and sometimes the removal of older features, all of which can lead to unpredictable UI behavior.

This high frequency of updates makes visual testing essential. Without it, issues like layout shifts, unexpected field visibility, and broken components can easily slip into the production environment. Visual testing ensures that these changes are reviewed and verified, helping maintain UI consistency despite the ongoing updates.

How does Applitools address the challenge of unpredictable UI changes in Salesforce releases?

Salesforce has three major releases per year, each potentially introducing UI changes, new features that impact layout, and sometimes the removal of existing features. This makes the UI unpredictable.

Applitools helps by automatically detecting visual differences between releases, ensuring that any unintended changes are caught before reaching production. This is especially useful because functional tests might pass even if the UI layout is broken or if elements are not displayed correctly. Applitools provides a safety net, validating that the UI looks right and functions correctly, regardless of Salesforce’s frequent updates.

The post Why Visual Testing is Crucial for Salesforce QA Teams appeared first on AI-Powered End-to-End Testing | Applitools.

]]>
Lightning Fast Testing for Salesforce with Applitools and TestZeus https://app14743.cloudwayssites.com/blog/lightning-fast-testing-for-salesforce-with-applitools-and-testzeus/ Thu, 23 Feb 2023 17:58:27 +0000 https://app14743.cloudwayssites.com/?p=46717 Salesforce is not just one of the most popular CRM platforms; it’s an ecosystem that combines almost anything that a business needs under one roof. Gone are the days when...

The post Lightning Fast Testing for Salesforce with Applitools and TestZeus appeared first on AI-Powered End-to-End Testing | Applitools.

]]>
Salesforce testing with Applitools and TestZeus

Salesforce is not just one of the most popular CRM platforms; it’s an ecosystem that combines almost anything that a business needs under one roof. Gone are the days when entrepreneurs were willing to use hundreds of different tools through separate services. Nowadays, companies want everything they need in one product, under one domain – think messenger, documentation, product site, analytics, and more. That’s what Salesforce provides to its customers – a single place where businesses can conduct their work.

Since its founding in 1999, Salesforce has undergone many changes. While it’s natural for a product to evolve to meet its customers’ demands, in 2018, Salesforce introduced its Lightning Platform, which was a complete overhaul of the entire user experience at Salesforce.

With a highly dynamic platform like Salesforce, developers who create apps and integrations on Salesforce need a reliable way to test their applications. Test automation and, more specifically, visual testing ensures a scalable way of validating core functionality that your customers rely on.

Why Testing Matters

As with any product, we want to be confident that our application doesn’t break overnight. We need to ensure that the behavior that our customers are used to stays the same unless we intentionally want to introduce a change. This reason is why end-to-end testing is vital since it covers the core user workflows like logging in, creating an account, buying an item, and many other use cases.

While other levels of testing, like unit or integration tests, are fantastic for ensuring a short feedback loop for our developers, end-to-end tests give us the highest level of confidence that the overall product continues to work well for our customers.

Suppose we are working within the Salesforce ecosystem. In that case, we need a reliable way to test our Salesforce product to ensure that our Salesforce integration or a custom app is fully functional. 

This post looks at how TestZeus, a test automation library for Salesforce apps, and Applitools Visual AI can provide us with an optimized, efficient, and deterministic way to automate our customer scenarios by writing less code yet increasing test coverage.

Introducing TestZeus for More Effective Test Automation for Salesforce

TestZeus is an open-source UI automation framework that provides an efficient way to find elements on Salesforce apps. It relies on what’s called AutoLocators strategy that uses the Salesforce Developer API to find UI elements on the webpage. 

In order for us to properly demonstrate how TestZeus works, we first need to set up our Salesforce environment.

Setting up Salesforce Environment

Salesforce is an entire ecosystem created around its Customer Relationship Management (CRM) system. And as fun as testing in production could be, we should make a development environment with Salesforce.

Luckily, Salesforce has a highly engaging community of developers and many learning resources. One of the community members has covered in great detail how to setup what’s called a Salesforce Developer Edition instance. In this article, we will only focus on the core parts of the process (for more information, you can read the community forum).

After you navigate to the signup page, you will need to fill out some basic information about your account:

Signup Page for Salesforce Developer Edition

Immediately after you sign up, you will receive a confirmation email that will look something like this:

Confirmation Email Post Instance Creation

Apart from pressing “Verify Account” button, you will need to make sure to capture your instance’s URL (HOME_URL as we will call it in the test properties) and username (USERNAME in the test properties):

Instance URL and Username Properties

When you first attempt to log into the Salesforce instance, it will prompt you to create a password which we will later use as the PASSWORD property in the tests.

New Password Creation Flow

Using Salesforce Developer API

TestZeus requires us to use the Salesforce Developers API. For this article, we will need a security token for your account and a consumer key/secret combination.

Without diving into too many details, a security token is another way to authenticate the Salesforce Developer API. At the same time, a consumer key/secret combination lets Salesforce control the scope of your API calls.

Getting a security token

The security token is one of the components required for API authentication. To get it for the first time, you need to “Reset Security Token” through the Salesforce UI. This video goes through details on how to do it step-by-step. Ultimately, you will receive an email containing a security token that we will use as SECURITY_TOKEN properties in our tests.

Security Token for Salesforce Developer API

Acquiring a consumer key/secret combination

The last piece of information we need to authenticate your tests successfully is what’s called a Consumer Key and Secret. We will need to create a Connected app that will, in turn, provide the authentication details. You can think of this step as a way to control the permission scope of the API usage.
This video walks through the steps to create the Connected app and retrieve its authentication details. In short, we need first need to create a New Connected App:

Salesforce App Manager

Then fill in all the required fields, enable OAuth settings and choose the necessary scope (as shown in the video):

Creating a Connected App

Following the app’s creation, you must click “Manage Consumer Details” to retrieve the authentication information:

Connected App Details

This new window will show us the exact data we need: a Consumer Key and a Consumer Secret:

Consumer Details

In our test, we will later use this information as CONSUMER_KEY and CONSUMER_SECRET properties.

Functional Testing with TestZeus

Now with all the necessary information and demo environment set up, we can proceed with writing our tests. For this article, we put together a small project that you can see here. We will first walk through this code to show how to use a TestZeus framework for testing a Salesforce application and, later, add a visual testing component using Applitools.

Preparing Test Scenario

For our article, we will do a primary case of validating UI for a test account we create beforehand.

In your Salesforce instance, navigate to Accounts and click “New account”:

Accounts Tab

Then we will create an Account named “Test Account,” and our test scenario is ready to be used.

Creating New Account

Setting Up TestZeus

First, we need to clone our demo project:

git clone git@github.com:dmitryvinn/applitools-testzeus-demo.git

Our demo project uses Java programming language and Maven as its build system. Hence, we encourage you to use an IDE like Intellij IDEA to simplify the development experience.

After you open the project with your IDE of choice, you must use Maven to build the project and download all necessary dependencies. One of the critical dependencies we are relying on for this part of the article is TestZeus dependency:

<dependency>
            <groupId>com.testzeus</groupId>
            <artifactId>Test_Zeus</artifactId>
            <version>1.0.2</version>
        </dependency>

The next step is to fill out all the required properties we will use in our tests in the config.properties file. So far, we have covered all but the APPLITOOL_KEY property, which we will discuss later.

Writing Our First TestZeus Test

In this article, we explore a simple use case of validating an account we created beforehand.

For brevity purposes, we will skip going into the general Selenium Webdriver code and focus only on specific details around TestZeus.

First, we need to authenticate our test, so we can use the Salesforce Developer API to work with data objects, retrieve specific selectors, and more.

In BaseTest.java, we have the following method we invoke in our setup() to handle authentication:

private void authenticateUser() {
    HTTPClientWrapper.SFLogin_API(HOME_URL, TOKEN_GRANT_URL, CONSUMER_KEY, CONSUMER_SECRET, USERNAME, PASSWORD + SECURITY_TOKEN);
}

Then, we need to create a new test named AccountsTest.java where we will have our #findTestAccount() test case.

We will begin our test scenario by Arranging it, or in other words, by setting up our test case.

We will first initiate an SFPageBase with the current webdriver instance and then navigate to the home URL:

final SFPageBase salesforcePage = new SFPageBase(driver);

salesforcePage.openHomepage(HOME_URL);
salesforcePage.maximize();

Now, we will proceed to log into our demo environment:

driver.findElement(By.id("username")).sendKeys(USERNAME);
driver.findElement(By.id("password")).sendKeys(PASSWORD);

final WebElement loginButton = driver.findElement(By.id("Login"));
salesforcePage.safeClick(loginButton);

In the next step, we will transition into the Act portion of the test case, starting with test-specific actions.

We will use TestZeus’ SFBasePage to navigate to the Accounts tab and open our “Test Account”:

  salesforcePage.appLauncher("Account");

final WebElement testAccountItem = driver.findElement(By.xpath(String.format("//a[@title='%s']", TEST_ACCOUNT_NAME)));
 salesforcePage.safeClick(testAccountItem);

Lastly, in the Assert stage of the test case, we will validate one of the fields shown on the UI:

driver.findElement(By.xpath("//p[text()='Account Owner']"));

As we can see, TestZeus helps simplify waiting for UI elements, navigation, and working with Salesforce Objects.

Now with this highly efficient way of locating UI elements using TestZeus, we can take our test automation to the next level with Applitools and visual testing.

Taking Next Steps: Functional Testing for Salesforce apps with Applitools and TestZeus

Functional testing is a type of testing that focuses on the core functionalities of an application while following predetermined steps. In other words, it’s a way to evaluate a scenario with two potential outcomes, failure or success, using the same input.

While there are many functional testing levels like unit or integration testing, end-to-end tests give us the highest confidence level in customer use cases. It’s also one of the most expensive types of testing since it takes a lot of effort to write assertions for every single element of the app and then keep maintaining this workflow. But not with Applitools and Visual AI analysis.

With the Visual AI in Applitools Eyes, rather than writing assertions focused on just one object, Applitools lets us capture the entire web page or mobile app screen, then send it to the Applitools Visual AI for analysis.

Simplifying Functional Testing with Applitools

This visual testing allows us to see our app from our customers’ points of view. And that’s where the Applitools Visual AI comes in! This AI-based visual testing tool can enhance the existing end-to-end test coverage to ensure our app’s user experience conforms to the expected design.

Using AI algorithms, Applitools allows developers, testers, and product/business teams to effectively compare visual elements, with corresponding baselines, across various screens to find visible defects in your test environments. This way, you can prevent functional and visual defects from escaping to production and affecting your customers negatively.

Applitools has integrations with numerous testing platforms like Cypress, WebdriverIO, Selenium, and many others. This article will showcase Applitools with TestZeus to add visual test coverage to our Salesforce app.

Setting up Applitools

Applitools has fantastic documentation on how to get started with the project. For this article, we will first need to register with Applitools and retrieve an APPLITOOLS_API_KEY for our config.properties.

We will also add the following dependency to our Maven build:

      <dependency>
            <groupId>com.applitools</groupId>
            <artifactId>eyes-selenium-java5</artifactId>
            <version>5.39.0</version>
        </dependency>

Now, we are all set to write our test cases with Applitools.

Visual Testing with Applitools and TestZeus

By using this great starter project, we can quickly enhance our existing test suite with visual test automation using Applitools.

First, we will create a new test class named AccountsApplitoolsTest.java. Then, we will need to add some additional setup code to enable Applitools and its Ultrafast Grid, so we can scale our tests in the future.

    @BeforeAll
    public static void setUpConfigAndRunner() {
        runner = new VisualGridRunner(new RunnerOptions().testConcurrency(1));

        config = new Configuration();
        config.setApiKey(APPLITOOLS_API_KEY);

        final BatchInfo batch = new BatchInfo("Salesforce Accounts Page Tests with TestZeus");
        config.setBatch(batch);

        config.addBrowser(1024, 768, BrowserType.CHROME);
    }

In the above code snippet, we set our tests to be run one at a time (the limit for free Applitools accounts), specified the Applitools API Key, and chose Chrome as our test browser.

The next step is to “open the eyes” which is an API terminology for starting visual testing for our test suite:

    @BeforeEach
    public void openBrowserAndEyes(TestInfo testInfo) {
        eyes = new Eyes(runner);
        eyes.setConfiguration(config);

        eyes.open(
                driver,
                "TestZeus Demo",
                testInfo.getDisplayName());
    }

Now, similarly to the previous example with TestZeus, we will have a new test named findTestAccount(). One of the best things about using Applitools is that we don’t have to make any additional changes to our test scenario! So everything from Arrange to Act steps will remain the same:

    @Test
    public void findTestAccount() throws Exception {

        // Arrange
        final SFPageBase salesforcePage = new SFPageBase(driver);

        salesforcePage.openHomepage(HOME_URL);
        salesforcePage.maximize();

        driver.findElement(By.id("username")).sendKeys(USERNAME);
        driver.findElement(By.id("password")).sendKeys(PASSWORD);

        final WebElement loginButton = driver.findElement(By.id("Login"));
        salesforcePage.safeClick(loginButton);

        // Act
        salesforcePage.appLauncher("Account");

        final WebElement testAccountItem = driver.findElement(By.xpath(String.format("//a[@title='%s']", TEST_ACCOUNT_NAME)));
        salesforcePage.safeClick(testAccountItem);

The only change we will need to make is in the Assert part of the test case. Here, we will have code to validate that the page loaded correctly and that its layout matches between test runs. We could also validate a snapshot of the entire page with Applitools, but Salesforce apps are known to have varying load times. So the layout match level helps to avoid false positives:

        eyes.check(Target.window().fully().withName("Test Account").layout());

We are almost done! To make sure that our Applitools tests are closed correctly after their run, we will need to add this @AfterEach method:

    public void cleanUpTest() {
        eyes.closeAsync();
    }

With this, our first test with Applitools and TestZeus for the Salesforce app is complete. Let’s visit our Applitools Dashboard to review the results:

Visual Test Results on Applitools

Wrapping Up

Salesforce is an ever changing ecosystem of apps and products under one platform. That’s why tools like TestZeus are beneficial in simplifying both the creation and, more critically, maintenance of our tests.

Combined with testing automation platforms like Applitools, we can take our testing infrastructure to the next level by focusing on scale, cross-platform support, and a short feedback loop.

ICYMI: Check out Robin Gupta’s Test Automation University course, Automating Salesforce Tests with TestZeus.

The post Lightning Fast Testing for Salesforce with Applitools and TestZeus appeared first on AI-Powered End-to-End Testing | Applitools.

]]>