Implementing Salesforce testing best practice with Gearset

Jason Mann on March 17th 2016


One of the challenges of managing a Salesforce organization is that undocumented changes can be made in Production which have knock-on effects on your existing unit tests (see our last blog post on why testing is important). These lurking test failures often lie hidden until deployment time, leading to unexpected deployment failures.

In this post, we’ll look at how to use the test runner feature of Gearset to automate testing in your orgs and stop undocumented changes silently breaking your existing unit tests.

Automate your Salesforce unit testing with Gearset

With the new test runner feature in Gearset, you’ll never have to worry about silent unit test failures again. Simply choose an organization and Gearset will automatically run all unit tests every 24 hours, and notify you of the results.

Get an email or text when a test fails, and jump into debugging the fault in seconds. A full test history is saved and you can easily dive in to find exactly which tests failed, and why, with a full stack trace.

The test runner feature is available for all Gearset users from the Schedule tests tab in the app navigation.

Set up a test monitoring job in seconds

Open the Schedule tests tab in Gearset and click Add your first job

Create your first test monitoring job

Choose the organization you want to monitor (from your list of saved connections), choose a time for the job to run, give the job a name, choose your notification options, and click Save.

Create your first test monitoring job

Your new job will automatically run for the first time at the scheduled time, and then at 24 hour intervals. All results will be saved in your test history for easy access. You’ll receive notifications of the overall test status (pass/failed) via your chosen notification settings.

Quickly see all the current test status of all your orgs

Viewing specific test results

From the test overview page, click View history for any saved test job. You'll see a list of the test history for that org, showing you the test status at daily intervals, as well as code coverage stats.

View org test history

Pick a test entry you want to view the detail for, and click View detailed results. All tests run will be displayed, along with their test status. For any failed test, select it to view the full stack trace.

See the detailed test results including stack trace

Set up your first test monitoring job with Gearset today - start your free 30-day trial.

Ready to get started with Gearset?

Sign up now to start your completely free 30 day trial
try it now