Skip to main content
1 of 2

Running test via Ant does not seem to store coverage

I've been banging my head on this issue for a while now and I'm throwing my hands up and asking for help.

When I run all tests in my org (either via the Run All Tests button or running them all in the dev console) my estimated code coverage is 100% as well as the expected data comes back via the ToolingAPI ApexCodeCoverage call.

However, when I make a runAllTests call (API 33.0) or a testLevel="RunLocalTests" the code coverage show 0% and ToolingAPI data is empty.

Is there some sort of flag I need to set to be able to have this stored and to be able to get the ApexCodeCoverage data? I've also tried doing the deploy via the MetadataAPI instead of via Ant with the same results.