Salesforce Functional Testing Part 2: Tips & Tricks
While my first Blog was more about the process and team dynamics, this blog will feature some more practical tips & tricks on how to test. All of these come from my personal experience as a tester in a Salesforce implementation.
Individual Test Users
During the first months of our development, every now and then we encountered issues that weren’t reproducible. Clicking on a button or link on the screen might open a completely different page then expected or give a nasty error without any clue what could’ve caused that. Given the non-reproducible nature and the fact that it wasn’t occurring all the time, investigating this was a challenge. It was only over time that we got an idea of what might have caused this: user accounts.
At the beginning of the project test users were created in all our environments and since I was the only tester, I would be the only one who would use those accounts. After a while, we decided that our configurators and developers should unit test their new features before releasing it to test, to improve the quality throughout our whole development process. What we didn’t consider during that decision is which users they’d use for those intakes. Of course, they ended up using the test user accounts, which is no problem for as long as you are not logged in at the same time, but it is a problem if that user account is used by multiple logins at the same time. Salesforce gets confused and as a result all your test results are corrupted.
From that point onwards, everyone had to create his or her own individual test user. This will save you a lot of time investigating false positives!
A nice trick that can help you identifying issues in browsers is that IE (11) has the tendency of not showing an error, if something goes wrong in your code. It just shows a blank screen, whereas if you do the same thing in Firefox, there’s a nice error message that will probably help you with debugging the issue. More on that can be found here.
Another top tip is to not forget the development tools/extensions/options that are in the modern-day browsers. Firebug, Chrome apps & extensions, developer tools, etc. They can really help you in the debugging process.
In those browsers, there’s another cool feature for testing: private browsing. Sometimes you want to make changes to your test data or Salesforce configuration while testing. Usually this can only be done with an Administrator account, while your test execution is done with an end user (test) account. To prevent you from the hassle of logging off, change settings and logging in again, you can use private browsing. Just open 2 separate browser windows (not tabs!): in 1 you log in with the Administrator and in the other one with your test user. A Great time saver this is!
I hope this will bring you some extra convenience when it comes to functional testing your Salesforce implementation. More to come in a Nekst Blog! Stay tuned.