Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Salesforce QA / Tester
easy

What's the difference between a test case and a test script?

Test case: human-readable description of what to test.

` Test Case: TC-101 — Lead Conversion Pre-condition: User logged in as Sales Rep; Lead exists with Status = Working. Steps:

  1. Open the Lead record.
  2. Click Convert Lead button.
  3. Confirm Account, Contact, Opportunity created.
  4. Confirm Lead Status = Converted.

Expected: Lead converted; new Account, Contact, Opportunity records visible. `

Used for: manual testing, planning, sign-off, audit.

Test script: code that executes the test case.

javascript // Cypress / Provar / Selenium pseudocode test('Lead conversion creates Account, Contact, Opportunity', async () => { await loginAs('Sales Rep'); await navigateTo(/leads/${leadId}); await click('Convert Lead'); await fillForm(...); await click('Save'); expect(await accountExists()).toBe(true); expect(await contactExists()).toBe(true); expect(await opportunityExists()).toBe(true); });

Used for: automated execution.

Relationship:

  • Test case is the design.
  • Test script is the implementation.
  • One test case can have one or more scripts (different tools).
  • Manual tests have only test cases; no scripts.

Test case lifecycle:

  • Author -> Review -> Approve -> Execute (manually or automated) -> Update as system changes.

Test script lifecycle:

  • Implement -> Test -> Run in CI/CD -> Maintain as features change.

Tools that manage them:

  • Test management: qTest, Zephyr, TestRail, Xray (Jira plugin).
  • Test automation: Provar, Tosca, Cypress, Selenium.

Senior QA insight: good test cases survive automation tool changes. Tools come and go; well-written test cases endure.

Why this answer works

Foundational. The case-vs-script and "tools come and go" insights are mature.

Follow-ups to expect

Related dictionary terms