SOP: Test Script Preparation & Execution

Status: Approved

Expert Advice: Good test scripts are clear, step-by-step, and free from subjective wording. Every tester—regardless of experience—should be able to execute the script and get the same result.

1. Purpose

To define a standardized procedure for preparing, reviewing, executing, and documenting validation test scripts (IQ/OQ/PQ) to ensure consistent and compliant Computer System Validation (CSV) activities.

Important Fact: Over 60% of CSV deviations arise from unclear or incomplete test scripts. Well-structured scripts reduce errors and improve inspection readiness.

2. Scope

This SOP applies to all GxP computer systems, applications, equipment software, and automated solutions requiring test scripts as part of their qualification lifecycle.

3. Responsibilities

RoleResponsibility
Validation AnalystPrepare test scripts, execute them, document results.
System OwnerProvide functional inputs and approve test scenarios.
QAReview, approve, and ensure compliance with data integrity principles.
Project ManagerEnsure timely execution and documentation.
Expert Tip: Never modify a test script during execution. If changes are needed, stop testing, revise the script, reapprove, and then resume execution.
FieldDescription
Test Script IDUnique identifier
Test ObjectivePurpose of the test
PrerequisitesSystem conditions
Test Step No.Sequential step number
ActionTester activity
Expected ResultSystem response
Actual ResultObserved outcome
StatusPass/Fail
VersionDateDescriptionPrepared By
0114-Nov-2025Initial Release for Test Script Preparation & ExecutionQA Department

Practical application & learning guide

Template status: site-specific review and controlled approval required before use.

Why this procedure matters: A useful SOP makes the approved task repeatable, clarifies who may perform and review it, and leaves enough reliable evidence to reconstruct what happened and support a sound quality decision. Read the task-specific scope, prerequisites, steps, and acceptance criteria in the SOP above; this guide explains how to apply them in a controlled way.

Practical workflow

  1. Prepare: confirm the current approved document and training; verify authorization, materials, equipment and status, environmental/safety prerequisites, applicable specification or method, and required forms. Resolve missing or conflicting prerequisites before starting.
  2. Perform: follow the approved sequence without undocumented shortcuts. Record actual observations and results as the work occurs, using required units, identifiers, date/time, initials/signatures, and controlled record references. Explain entries so a trained independent reviewer can understand the work without relying on memory.
  3. Evaluate: compare actual results with the approved acceptance criteria and defined decision rules. Verify calculations, transcriptions, checks, and required second-person reviews. If data conflict, criteria are unclear, or the result is unexpected, pause the affected decision and seek QA/owner direction.
  4. Close: reconcile all pages, attachments, labels, samples/materials, electronic records, calculations, and handoffs. Complete required review and disposition, file evidence in the approved repository, and record open actions with an owner and due date.

Task-specific learning points

For computerized-system work, first confirm the system boundary, intended use, GxP impact, approved change or lifecycle record, and the correct environment. Link each requirement/risk to objective test or review evidence; record expected and actual results, tester, date, system/version/configuration, anomalies, and independent review. A system category is not a risk rating. Keep unresolved critical defects, data-integrity concerns, or unapproved changes out of release decisions; QA/system owner documents acceptance, restrictions, or remediation.

Decision, exception & escalation

If a prerequisite is not met, a result is outside the approved criteria, an error or unexpected condition occurs, a record is incomplete, or product/sample/data may be affected, contain or stop the affected work when safe; protect materials, records, and evidence; promptly inform the responsible supervisor and QA; and use the linked deviation, OOS/OOT, incident, safety, change-control, or investigation procedure. Assess impact and document the facts, immediate controls, affected scope, decision authority, disposition, and closure evidence. Resume only when the authorized decision-maker has documented that conditions for restart are met. Do not silently repeat, overwrite, discard, backdate, or average results.

Records and evidence to confirm locally

Identify the controlled form/logbook or electronic record, source data and attachments, required independent review, linked deviation/change/training records, repository, retention period, and retrieval method. The exact record set and retention period must come from approved site procedures and applicable requirements.

Site adoption fields

Document ID: [site ID]   Version: [approved version]   Effective date: [date]   Process owner: [role]   QA approver: [role]   Forms/specifications: [controlled IDs]   Training: [assignment]   Related procedures: [IDs]. Replace placeholders, resolve conflicts, obtain controlled approval, and train affected personnel before implementation.

Template boundary: This guide supplements the task-specific method; it does not establish a test limit, processing parameter, frequency, sample size, retention period, or regulatory applicability. Use approved specifications, validated methods, product commitments, safety controls, and local requirements. QA and a qualified subject matter expert must approve technical changes.