2

I can't find any documentation for the ant command "sf:compileAndTest", yet I see references to it in several places. Example.

When I try to run it in a ant target I get doodly squat:

[sf:compileAndTest] compileAndTest on https://test.salesforce.com, compiling 0 classes and 0 triggers, deleting 0 classes and 0 triggers

(This is after a successful deploy, I know there are classes and triggers in the target Org)

Is this ant command supported? Or are we forced to bundle test running with deployment, eg

<sf:deploy ------------ runAllTests="true"/>
1

I don't know much about sf:compileAndTest but:

sf:deploy can be used to do a compile and test by using the checkOnly attribute. Setting this attribute to true will mean that nothing will get saved to the server.

<sf:deploy 
       username="username@username.com" 
       password="password"
       serverurl="https://test.salesforce.com" 
       runAllTests="true" 
       checkOnly="true"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.