Skip to content

neozenith/testcafe-sfdc-poc

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

TestCafe POC

Tested with TestCafe

This is a proof of concept to see how well TestCafe can handle UI testing a Salesforce Org.

Getting Started

Create a Salesforce.com (SFDC) Developer Org

  1. https://developer.salesforce.com/signup
    1. Your username does not need to be the same as your email.
    2. Opt for the format firstname.lastname@testobjective.dev
  2. Check your email
  3. Verify your account

Whitelist IPs: Disable the Email Verifcation on Login

Navigate to:

https://<your-sfdc-instance>.lightning.force.com/one/one.app#/setup/SetupOneHome/home

Then in the Quick Find window type Profiles. It should reduce the navbar options to Users > Profiles so click on Profiles.

Navigate through the list view of profile until you find System Administrator. Click on the named link System Administrator (not the Edit link).

Scroll down to the Login IP Ranges Related List and click New.

Enter the IP range that you are connecting from. Worst case scenario, enter the range start: 0.0.0.0 end: 255.255.255.255.

Get your SFDC Org ID

You will need your username, password and orgID.

Navigate to the following link after you login:

https://<your-sfdc-instance>.lightning.force.com/one/one.app#/setup/CompanyProfileInfo/home

And look for the field: Salesforce.com Organization ID. Copy the 15 character ID.

Clone and Run Tests

git clone <this repo>
npm install

# Setup test Org credentials
mv .env.sample .env
vim .env

npm test

Alternative test scripts:

  • npm test Runs both firefox and chrome in a headless mode
  • npm run test-all Runs both firefox and chrome (not headless)
  • npm run test-chrome Runs just chrome (not headless)
  • npm run test-firefox Runs just firefox (not headless)
  • npm run test-chrome-headless Runs just chrome headless
  • npm run test-firefox-headless Runs just firefox headless

About

Salesforce UI testing with TestCafe Proof of Concept

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published