Performing Load Testing in Salesforce using Selenium and TestNG

Parallel execution of browsers in Selenium with the help of TestNG and determining maximum operating capacity of custom code in Salesforce

When we build any custom solution in Salesforce, key is to write an efficient and meaningful Apex test classes for sure. However sometime we may need to test how custom application would behave in maximum operating capacity. Here, I am talking about Load Testing of custom applications built on top of Force.com platform. Recently I needed to push my code to its limit to know how many concurrent users can use it before hitting any governor limits. Quickly I realize that its time to call my friends Selenium and TestNG.

Before doing any extensive stress or load testing on Salesforce, we must need to contact Salesforce support and explain them what we are trying to achieve. More detail available in this official Salesforce blog post.

I have published some blog posts about Selenium in past as well however whats different this time ? I need to determine after how many simultaneous user interactions, I would hit Concurrent Apex Limit error as shown in below image.

Salesforce Governor Limit error - Concurrent Apex Limit
Salesforce Governor Limit error – Concurrent Apex Limit

Continue reading “Performing Load Testing in Salesforce using Selenium and TestNG”

Using Selenium to test workflow field update action – Salesforce automated testing – Video tutorial – Part 2

We have already discussed basics of selenium and how we can use this tool for automated testing. Here we will see how we can take advantage of Selenium to test workflow field update. in this article we will create a simple workflow rule on Lead object and update “Description” field by adding fields “Number of Employees” and “Number of Locations”. We can use selenium to test if workflow is working or not ?

Salesforce Workflow rule - field update on Lead
Salesforce Workflow rule – field update on Lead

Continue reading “Using Selenium to test workflow field update action – Salesforce automated testing – Video tutorial – Part 2”

Selenium and Salesforce – Salesforce automation testing – Video tutorial – Part 1

This is first post of multi-series article on using Selenium with Salesforce for Automation testing. Testing has always been integral part of any software development life cycle and Salesforce has already taken it to next level by making mandatory to have 75% of code coverage before any code deployment. These apex test classes, however has its limitations where we can only test Apex code written. I have seen most of Salesforce project ending with manual testing. Audience for this series is not only developer but Salesforce admin and of course manual testers as well and please feel free to drop comment throughout this series if I left any area or topic uncleared.

What is Selenium 

Selenium is a portable software testing framework for web applications. Selenium provides a record/playback tool for authoring tests without learning a test scripting language (Selenium IDE). It also provides a test domain-specific language (Selenese)[1] to write tests in a number of popular programming languages, including Java, C#, Groovy, Perl, PHP, Python and Ruby. The tests can then be run against most modern web browsers like firefox, Chrome, Internet explorer. Selenium deploys on Windows, Linux and Macintosh platforms.

Selenium and Salesforce
Selenium and Salesforce

Continue reading “Selenium and Salesforce – Salesforce automation testing – Video tutorial – Part 1”