+ Start a Discussion
philbophilbo 

Debug output when running tests via ANT sf:deploy

Hey,

 

Where does the debug log go when you run tests via <sf:deploy> within an ANT script?

 

e.g. I have the following target

 

 

<target name="runTests"> <sf:deploy checkOnly="true" username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" deployRoot="codeDir" logType="Detail"> <runTest>MyTestClass</runTest> </sf:deploy> </target>

 

 ...and I would like to see the output of all the System.debug()'s in the testmethods within MyTestClass.

 

Is there a way to do this?

 

Thanks!

 

 

akhilesh_sfdcakhilesh_sfdc
All the logs get thrown on the console on which the ant command is run. Let us know if you don't see it.
philbophilbo

That's not what I see, unfortunately.  Running Ant against the above XML in both Cygwin and a DOS shell does not show any System.debug() output.  It does tell me about all my code coverage issues, which I don't care about (as I'm only running one of my zillion test classes).  

 

Is there something additional I should be including in my build.xml ?

 

Thanks!

akhilesh_sfdcakhilesh_sfdc
Since the output is logged by ant with Info priority, the reason could be that you are running your target in lower priority. Try running your ant target in verbose mode "ant -v". Also make sure your ant is not using any other log listeners.