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. 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.
Where to go next
Explore GxP Copilot for AI-native validation, TraceDraft for source-traceable clinical documentation, or book a demo to see either on your own data.
