force-coverage

0.1.2 • Public • Published

Force.com test coverage tooling

npm version Coverage Status Build Status

Installation

npm install -g force-coverage

Coverage Auto-Inflation

Disclaimer: Inflated coverage goes against Salesforce development best practices and should be avoided 99% of the time.

force-inflate -u <username> -p <password><security token> -l <login url>

Run org tests and calculates the remaining lines that must otherwise be covered to reach target % overall coverage. CoverageInflation is generated to contain the calculated amount of inflation, which is then deployed. The class is compiled against API v27.0 so that it may contain its own test method.

Inflation formula:

(linesCovered - totalLines * targetPercentage) / (targetPercentage - 1) = inflatedLines

Re-run as needed (i.e. when actual coverage increases) to decrease/eliminate the inflation.

When overall coverage exceeds the target % without inflation, CoverageInflation is removed from the org.

Target coverage %

force-inflate ... --target 0.8

Default: 0.76

Dependents (0)

Package Sidebar

Install

npm i force-coverage

Weekly Downloads

12

Version

0.1.2

License

MIT

Last publish

Collaborators

  • jdcrensh