testRigor & Salesforce
  • NO-CODE UI TESTING: Guide for testRigor & Salesforce
  • Getting Started
    • Get a Salesforce Hands-On Playground Org (free)
    • Get testRigor (free) and create a Test Suite
    • Create Test Case (T00001)
    • Navigation in Salesforce
    • Navigation in testRigor
  • BASIC TEST CASES
    • Record, edit and play a Test Case (T00002)
    • Create and convert a Lead (T00003)
    • Create more records (T00004)
    • Check Account Validation Rule (T00005)
  • ADVANCED TEST CASES
    • Account Action and List View Button (T00006)
    • Validate Field Value Using REST API (T00007)
    • E2E: Lead entry (Titan) ➔ Salesforce ➔ Email
  • OTHER TEST SCENARIOS
    • Submit a Test Lead
    • TH: Opportunity Won THEN Create Contract
    • Monitor data in your website
    • Monitoring in Production
  • FLOW TEST CASES
    • Screen Flow: Update Email Address
  • E-BIKES SAMPLE APP
    • E-Bikes sample app description
    • testRigor version of the UTAM TEST (EBIKES-00001)
    • Product Explorer - Electra X3 (EBIKES-00002)
    • Reseller Order - Create (EBIKES-00003)
    • Case - Create (EBIKES-00004)
  • LWC RECIPES SAMPLE APP
    • LWC Recipes sample app description
    • Test Case for LWC Recipes (LWC-00001)
  • CORAL CLOUDS SAMPLE APP
    • Coral Clouds sample app description
    • Experience - Generate Description using AI (CC-00001)
    • Experience - Generate Reviews Summary using AI (CC-00002)
  • MORE INFORMATION
    • About testing
    • About testing in Salesforce 🤔
    • About test automation
    • About Test-Driven Development (TDD)
    • About testRigor
    • About using testRigor
    • About other solutions
  • FEEDBACK
    • Questions? - Comments!
Powered by GitBook
On this page
  • Detect exceptions using Salesforce Reports + testRigor
  • Ensure that latest foreign currency exchange rates are fetched
  1. OTHER TEST SCENARIOS

Monitoring in Production

  • Testing in development phase should be "complete" from the user's perspective

    • records are created/read/updated/deleted in the system

  • Creating/updating/deleting records in production is not a good idea

    • therefore in production it's more about monitoring and observing

      • positive tests: processes work smoothly

      • negative tests: anomalies are detected


Detect exceptions using Salesforce Reports + testRigor

1. In Salesforce, create a report that catches an exception.

  • a rather simple (and silly) example :

    • normally: Accounts are created every day

    • exception: There are no Accounts created today

    • detection: Report doesn't return records

In Salesforce Enterprise Edition orgs each user can subscribe up to 7 Reports and Dashboards. Probably this is not enough for the purpose of Production Monitoring.

2. In testRigor, create Test Case

  • Description: Production Monitoring: Accounts - # created TODAY

login
click "Home" 
click "Reports" 
click "All Folders" 
click "PRODUCTION MONITORING" 
click "Monitor Accounts" 
click "Accounts - # created TODAY" 

wait 3 sec up to 20 times until page does not contain "loadingSpinner"

check that page doesn't contain "No records returned"

Ensure that latest foreign currency exchange rates are fetched

Scenario

  • We want to check that the latest USD rate and date in Salesforce and in Frankfurter are in sync

Test Case

// IN SALESFORCE
API-0001 - SALESFORCE REST API - Authorize :: API_access_token
save string "SELECT+Id,+StartDate,+IsoCode,+ConversionRate+FROM+DatedConversionRate+WHERE+IsoCode=\'USD\'+ORDER+BY+StartDate+DESC+LIMIT+1" as "SOQL"
call api get from string with parameters "${API_SALESFORCE_DOMAIN}/services/data/v62.0/query/?q=${SOQL}" with headers from the string with parameters "Authorization:Bearer ${API_access_token}" and then get "$.records[0].StartDate" and save it as "date_Salesforce_Latest" and then get "$.records[0].ConversionRate" and save it as "rateUSD_Salesforce_Latest"

check that stored value "date_Salesforce_Latest" itself is not equal to ""
check that stored value "date_Salesforce_Latest" itself is not equal to "NaN"

check that stored value "rateUSD_Salesforce_Latest" itself is not equal to ""
check that stored value "rateUSD_Salesforce_Latest" itself is not equal to "0"

// IN FRANKFURTER.DEV
call api get "https://api.frankfurter.dev/v1/latest" and then get "date" and save it as "date_Frankfurter_Latest" and then get "rates.USD" and save it as "rateUSD_Frankfurter_Latest"

check that stored value "date_Frankfurter_Latest" itself is not equal to ""
check that stored value "date_Frankfurter_Latest" itself is not equal to "NaN"

check that stored value "rateUSD_Frankfurter_Latest" itself is not equal to ""
check that stored value "rateUSD_Frankfurter_Latest" itself is not equal to "0"

// USD RATES AND DATES ARE THE SAME IN SALESFORCE AND IN FRANKFURTER.DEV
check that stored value "date_Salesforce_Latest"    itself is equal to stored value "date_Frankfurter_Latest"    itself
check that stored value "rateUSD_Salesforce_Latest" itself is equal to stored value "rateUSD_Frankfurter_Latest" itself

PreviousMonitor data in your websiteNextScreen Flow: Update Email Address

Last updated 4 months ago

Foreign currency exchange rates are fetched daily form

Frankfurter.dev
NO-CODE UI TESTING: Guide for testRigor & Salesforce