Blog

Salesforce Run Specified Tests Feature

December 7, 2015

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


0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Articles

Part 2: Optimizing and scaling microservices. Organic growth of eco-systems.

October 11, 2017 | Nikola Krastev

A microservices approach is not a silver bullet for all software architecture problems. It introduces tradeoffs and challenges of its own. However, process gains and improvements in human performance have been considered to be worth the overhead in technology. Here are some general arguments against using sophisticated SOA. Server performance and overhead in communication By […]

CoreValue President at IT Arena 2017

September 27, 2017

We are pleased to announce that CoreValue president Igor Kruglyak will participate in IT Arena 2017, to be held in Lviv, Ukraine, September 29 – October 1, 2017.