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) 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.
In previous article, I have explained that how to use Jenkins to setup Continuous integration for Salesforce.
Now, once Jenkins is up and its doing its job to build Salesforce changes. Next task is to monitor build result. We already setup post deployment task by creating chatter message to notify everyone about build result, however there is one more excellent way to be aware about result and its small desktop client named “CCTray”.
You can download CCTray from here. Once installed, follow below steps to setup.
As your Salesforce Organization undergoes heavy customization and frequent builds, moving changes from one Sandbox to other sandboxes starts taking longer time and effort. Also, in normal Salesforce project, there are chances that you will have minimum three sandboxes likely Developer Sandbox, QA Sandbox and UAT Sandbox. After some time you will be in need of some solution which can reduce your effort.
This time its Salesforce using Jenkins. In this article I will walk through solution of above problem using Jenkins. Don’t forget to watch Video at end of this article, where I provided demo of everything explained in this article.