Apex code coverage measures the percentage of your org's Apex code that is executed by test methods. This article explains why intentionally inflating that percentage with meaningless statements is discouraged, and what Salesforce may require if it's found in your org.
In Apex code development, we don't recommend increasing your org's code coverage ratio by intentionally creating Apex classes or methods containing meaningless, redundant statements — for example, unnecessary variable assignments or repeated calculations that aren't actually used by your application.
If code deployed to production skips a test that should have been run, these meaningless statements can cause unintended behavior or issues. They also skew the true upper limit of Apex characters used in your org, since the code technically counts toward your character limit without providing real test value.
When Salesforce reviews your org's Apex character upper limit, we look at the details behind that number. If meaningless statements are found inflating your code coverage, Salesforce may ask you to modify the Apex code to remove them.
000382195

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.