The Salesforce extension pack for Visual Studio Code includes tools for
developing on the Salesforce platform in the lightweight, extensible VS Code editor. These tools
provide features for working with development orgs (scratch orgs, sandboxes, and DE orgs), Apex,
Aura components, and Visualforce.
If you deploy to a production organization:
- Unit tests must cover at least 75% of your Apex code, and all of those tests
must complete successfully.
- Every trigger must have some test coverage.
- All classes and triggers must compile successfully.
Note the following.
- When deploying Apex to a production organization, each unit test in
your organization namespace is executed by default.
- Calls to System.debug are not counted
as part of Apex code coverage.
- Test methods and test classes are not counted as part of Apex code
coverage.
- While only 75% of your Apex code must be covered by tests, don’t
focus on the percentage of code that is covered. Instead, make sure
that every use case of your application is covered, including
positive and negative cases, as well as bulk and single records.
This approach ensures that 75% or more of your code is covered by
unit tests.
For more information on how to deploy to a Salesforce org with Visual Studio Code, see Org Development Model with VS Code.