Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 1.04 KB

README.md

File metadata and controls

21 lines (11 loc) · 1.04 KB

ApexTestCoverage

This is a simple Python3 Script to get Apex Test Coverage from Salesforce deployment ID.

Just got the inspiration from How to get accurate code coverage from Metadata API.

The code will get the deployment ID(also known as asyncId) from the log file. So you need to generage a log file named "log.txt" during your salesforce running test task through ant and Salesforce Force.com Migration Tool.

An easy way is to add a record in the ant task.

And once you have the log.txt, you can just get the code coverage by this script. The script need three parameters:

  1. Salesforce username
  2. Salesforce password
  3. Salesforce security token

Thanks for:

sfdclib:Package Index