Salesforce Run Specified Tests Feature
December 7, 2015

Salesforce Run Specified Tests Feature

There is one new very cool feature called “run specified tests”.

Whenever you run your deployment or validation you may now select unit tests you want to run! This can save deployment or validation time tremendously!

This feature has been initially introduced in the Summer’15 Release ( you may refer to related Release notes here or to Salesforce tutorial here ). There was a bug in this feature claimed to be fixed in Winter’16 Release, and that is cool, I guess.

To use this feature in your ANT Migration Tool you will require the latest Force.com Migration Tool jar, which you may download directly from your production org or from any of your sandboxes here.

Also you need to add a new target inside your build.xml file specifying which tests you would like to run:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<target name="1*. Deploy to Production running a few tests?">
<sf:deploy username="${sf.production.username}"
password="${sf.production.password}${sf.production.securityToken}"
serverurl="${sf.production.serverurl}"
deployRoot="../${sf.deploy.dir}/${sf.sandbox.dir}"
rollbackOnError="true"
maxPoll="${sf.maxPoll}"
testLevel="RunSpecifiedTests"
pollWaitMillis="${sf.pollWaitMillis}">
<runTest>TestClass1</runTest>
<runTest>TestClass1</runTest>
<runTest>TestClass1</runTest>
</sf:deploy>
</target>

Click share or like if you also enjoy this new feature!

Tags

ANTdeploymentexecutionForce.commigrationteststoolvalidation

Share


Recent Articles

More Value with Lightning Value Providers

February 15, 2019 | Bohdan Dovhan, Senior Salesforce Engineer

Salesforce cloud platform offers the whole variety of customization options. Those include point-and-click tools like Lightning App Builder, Process Builder, Visual Flow and Workflow alongside development tools like Apex, Visualforce, Lightning Aura Components, Lightning Aura Events, Lightning Aura Tokens, Lightning Aura Standalone application and Lightning Web Components. Lightning Aura Components development involves the development of […]

Hot in Salesforce Marketing Cloud: January 2019 Release Notes

February 8, 2019 | Ihor Shupeniuk, Salesforce Engineer and Marketing Cloud Specialist

In the era of intelligent marketing with the proliferation of technology where modern consumers are offered the widest choice, Marketing Cloud is sometimes named a future-looking service, We continue to closely follow the developments and improvements to  Marketing Cloud and we can safely affirm that this product is becoming better and better. Everyone who has […]