Salesforce - Automated Testing and Test Data creation

Could someone provide guidance with regards to the following two Salesforce questions?

  1. Has anyone utilized an open-source solution like selenium or playwright to automate Salesforce testing? If yes, what were the challenges? If you are using a commercial application, which did you choose and why?
  2. Has anyone utilized a tool to create fake data for Salesforce testing? For example, snowfakery?

In regards to your first question, at a previous workplace we were moving one of thier main applications to Salesforce. For GUI Automation Testing we used SpecFlow + Webdriver + nUnit (using C#). We also had API & Integration Automation for this (and other applications) using ReadyAPI too.

@ubbamiller : In my past project I automated salesforce using selenium java.
Few things to note:

  1. Salesforce are using multiple frames , handle them so that you don’t have flaky test case
  2. In salesforce, generally you have lots of drop down, radio buttons etc which lead to multiple combinations of test case, so look for data-driven approach
  3. Salesforse using SOQL DB to capture all data , which is populating on UI, so in case if you have multiple validations or need some data from Salesforce UI then use SOQL DB to get information directly that will save execution time.
  1. My current workplace is using Playwright to automate Salesforce and thse are the few challenges we faced.
  • Our automation is mostly based on scratch orgs so connecting to the orgs might be a challenge. But if you implement sfdx commands you should be able to get over this challenge.
  • We configure the org based on few conditions. So specific setups are hard to be configured (ie. ConnectedApp). But you can utilize jsforce NPM package on this.
  • Having said the previous bullet point, we heavily depend on Salesforce’s REST API collections to create test data/sobjects/etc
  1. I would recommened creating test data on the fly and that can be done by REST API by Salesforce. But that would still depend how generic/custom the test data is.