AI GxP validation for regulated life sciences
Test Automation

Automating IQ/OQ/PQ Protocols: What Works, What Fails, and What Inspectors Expect

Where test automation adds genuine value in IQ/OQ/PQ execution, where it introduces new compliance risk, and how to build an audit-ready automated protocol record.

Cybroscape Technologies5 min read

Key takeaway

Where test automation adds genuine value in IQ/OQ/PQ execution, where it introduces new compliance risk, and how to build an audit-ready automated protocol record.

IQ, OQ, and PQ protocol execution is the most inspection-visible part of a validation programme — it is the evidence that an inspector reviews when they want to understand how a system was validated. Automating that execution is technically straightforward. Doing it in a way that produces a defensible, inspection-ready record — one that a QA reviewer and an inspector can navigate with confidence — requires deliberate design choices that most automation frameworks do not make by default.

What IQ, OQ, and PQ automation actually means

IQ (Installation Qualification) automation verifies the installation: software version, configuration settings, dependency versions, infrastructure parameters. This is almost always automatable and produces a clean, reproducible evidence record. OQ (Operational Qualification) automation executes test cases that verify the system functions according to its specification under normal and boundary conditions. High automation suitability — these are deterministic, repeatable, specification-driven tests. PQ (Performance Qualification) tests the system in the actual operational context with real or representative data and users. Lower automation suitability — PQ often involves judgment-based assessments that resist full automation. Most GxP operations automate IQ fully, automate OQ for scripted test cases, and use a hybrid approach for PQ.

What inspectors look for in automated execution records

  • A clear mapping between the automated test and the protocol step it covers — not just a test script name but an explicit reference to the protocol step number and the requirement it tests.
  • A timestamp from a controlled, synchronised time source — not the local machine clock of the automation agent.
  • The identity of who initiated the automated run — a named individual or a fully auditable service account, not a shared credential.
  • Expected vs actual results for every assertion in every step — inspectors do not accept "pass" without the evidence that demonstrates why it passed.
  • Deviation handling for every failed step — a failed automated test that was simply re-run until it passed without a deviation record is a finding.
  • The version of the test script and the version of the system under test at the time of execution — both must be frozen before the formal execution begins.

Wet vs dry execution: the staging environment requirement

Formal IQ/OQ/PQ execution must occur in a controlled environment — typically a validated staging or qualification environment that mirrors production in configuration and data. Executing OQ tests against a development environment and using those results as validation evidence is a finding: development environments are not under the same change control as validated environments, and a test that passes in development may fail in production due to configuration differences. The staging environment itself must be qualified (its own IQ) before OQ tests can generate valid evidence. This requirement is often underestimated in automation programmes that run tests continuously against development environments.

Automating the deviation workflow

When an automated test fails, the deviation workflow must fire before any re-execution. This means: the automation tool must surface the failure clearly with the full execution context; the failure must be logged in the deviation management system (or the validation platform's deviation log); a root cause investigation must be documented; and a disposition (accept the deviation with justification, reject and fix, or re-test under changed conditions) must be approved before the test is re-run. Automating the first three steps — surfacing, logging, and routing — is feasible and reduces the cycle time significantly. The disposition itself requires a human approver with the appropriate role. Cybroscape GxP Copilot handles deviation logging and routing natively.

The validation record for automated execution: structure

A complete automated IQ/OQ/PQ execution record includes: the executed protocol version (signed and frozen before execution begins), the execution summary (overall pass/fail, number of steps executed, number of deviations), the individual step execution records (one per automated test case, with all required fields), the deviation log (one entry per failed step, with root cause and disposition), and the final sign-off (QA reviewer signature with re-authentication, conforming to 21 CFR Part 11). The entire record must be created by the validated test execution system — not assembled manually from tool outputs after the fact. IQ/OQ/PQ management in GxP Copilot captures this record for each run.

Where to go next

Explore Cybroscape GxP Copilot for AI-native validation, Cybroscape TraceDraft for source-traceable clinical documentation, or book a demo to see either on your own data.

Validation planReported inValidation summary report
User requirements (URS)verified byPerformance qualification (PQ)
Functional specification (FS)verified byOperational qualification (OQ)
Design specification (DS)verified byInstallation qualification (IQ)
Build and configure the system
Risk assessment at every stageTraceability matrix links each row
The V-model under GAMP 5: each specification on the left is verified by the qualification on the right, and the traceability matrix links every row. Risk assessment runs through all of it.
See it on your own systemBring a URS or a system. We run GxP Copilot against it live on the call.
iq oq pq automationgxp protocol test automationautomated iq oq pq executionvalidated test automation iq oq pq

Keep reading

All articles
Test AutomationAutomating IQ: Verifying an Installation When There Is No User InterfaceOQ and PQ automation gets all the attention because there is a screen to click. IQ is mostly files, versions, services and permissions, which is why it is still done by hand. It does not have to be. · 4 min readTest AutomationRisk-Based Test Automation in GxP: How to Build a Defensible Automation StrategyHow to apply per-requirement risk scores to drive test automation decisions: what gets scripted automation, what gets exploratory execution, and what borrows vendor evidence. · 4 min readTest AutomationWhen an Automated Test Fails: From Red Result to DeviationA failing automated test is the moment automation either proves itself or embarrasses you. What the run has to capture, when a failure becomes a deviation, and why a re-run that passes is not an explanation. · 4 min readTest AutomationOff by Default: Controlling the Blast Radius of Validation AutomationAutomation that can reach anything is automation you have to validate against everything. Shipping it switched off, and behind an explicit flag, is a scope decision more than a security one. · 4 min readTest AutomationWhy a GxP Test Engine Should Not Be Able to Run Arbitrary CommandsThe fastest way to automate a protocol is to let the engine run a shell command. It is also the fastest way to lose the argument with an inspector. Why a closed vocabulary of test steps is the safer design, and what you give up for it. · 5 min readTest AutomationWhat an Automated Execution Has to Capture to Count as EvidenceA green tick is not evidence. The specific record an automated run needs to leave behind so that someone reading it in three years can tell what was tested, against what, and by whose authority. · 4 min readTest AutomationGxP Test Automation: The Complete Technical Guide Under CSA in 2026How to build a GxP test automation strategy under Computer Software Assurance: what to automate, what not to, how to document it, and how to keep it defensible under inspection. · 6 min readTest AutomationGxP Test Automation and 21 CFR Part 11: The Audit Trail Requirements That Most Teams MissThe Part 11 requirements that apply specifically to automated test execution (audit trail, e-signature, result attribution, and data integrity) with a defensible record structure. · 5 min read

Bring a system. We'll show you the package.

Book a demo, or ask a validation lead a quick question on WhatsApp.

  • We reply within one business day
  • We run your URS live on the call
  • You get a clear plan for your system
Chat on WhatsApp

Book a demo

Four fields. The right specialist replies within one business day.

Your details stay private. We never share them.