Salesforce DevOps Glossary

Apex Test Class

Production deployments require Apex test classes to run and pass; skipping or gaming coverage is one of the most common release-day surprises.

Definition

An Apex test class is a class annotated @isTest containing test methods that exercise other Apex code; Salesforce requires at least 75% org-wide test coverage, with no individual trigger left uncovered, before metadata containing Apex can deploy to production, though sandboxes and scratch orgs don't enforce it the same way. Test methods run against a fresh, isolated copy of the org's data by default, not real records, unless a method is explicitly marked @isTest(SeeAllData=true), which is why tests that silently depend on org data pass locally but fail in a clean CI/CD pipeline. Coverage percentage alone doesn't guarantee a test is meaningful: assertion-free tests that only exist to hit the 75% threshold pass the deploy gate while testing nothing, a common way “green” pipelines still ship broken logic. Apex tests also only cover code, never the click path, which is why connectors for UI test tools such as Provar sit on Serpent's roadmap. Our CI/CD pipeline guide covers running Apex tests as part of a build.

In practice

How it works in Serpent

Serpent runs Apex tests as part of preflight before a deployment ships, not after, so a coverage or assertion failure blocks the release instead of surfacing in production. Test results and logs stay attached to the task that triggered them, so failures are traceable to the change that caused them. See release management in Serpent for how preflight checks work.

Serpent running an Apex test class against a connected Salesforce org from a work item

Start free. No credit card, no install, no commitment.

Set up in under 15 minutes. No DevOps hire needed.

Curious about faster shipping before you dive in? Let's talk

Commitment free!