AQ
ArgonQA Enterprise Playwright + TypeScript Architecture
Technical Docs →
Section 01 — Architectural Overview

AI-Assisted Speed at Build Time.
Deterministic Reliability in Production CI.

Many testing tools inject LLM calls directly into CI test execution—introducing latency, non-deterministic pass/fail flips, and security compliance risks. ArgonQA separates assisted test authoring (in the engineer's IDE) from strictly typed, deterministic Playwright execution in your CI pipeline.

CI Execution
Zero LLM Calls
100% Deterministic Runtime

Standard Playwright + TypeScript execution in GitHub Actions, GitLab CI, or Jenkins with zero runtime token costs.

Engineering Velocity
10x Faster
Spec Authoring & Maintenance

Structured IDE workflows inspect live DOM accessibility trees via Playwright MCP to scaffold and repair Page Objects.

Data Safety
3-Tier Guard
Environment Isolation

Runtime environment guards prevent state-mutating tests from executing against Staging or Production databases.

Ownership
14 Days
Turnkey Repository Handover

Delivered as a clean, zero-lock-in repository inside your organization with secret brokers and TestOps reporting wired in.

Common Pitfalls in Legacy & Runtime-AI Suites
  • Raw page.locator() calls scattered across hundreds of test files, creating high maintenance overhead when UI changes.
  • Runtime AI wrappers adding 4–8 seconds of network latency per click and masking real application regressions.
  • Mutating E2E tests accidentally altering shared staging or production records.
  • Plaintext credentials exposed in HTML reports and CI step logs.
The ArgonQA Engineering Standard
  • Strict Page Object Encapsulation enforced at compile time via custom ESLint AST rules.
  • 0–100 Selector Stability Scoring prioritizing W3C ARIA roles and explicit test attributes.
  • Self-Cleaning Test Data (EntitySupplyManager) with automatic LIFO teardown queues.
  • Redacted Secret Injection (fillSecure) paired with HashiCorp Vault, Doppler, or CI secrets.
Section 02 — System Design

Clean Four-Layer Separation of Concerns

Product and QA engineers only maintain readable Page Objects and Spec files. The underlying base engine, credential providers, and IDE workflows are standardized across the repository.

Layer 1 — Business-Readable Spec Layer (tests/e2e/)

Zero raw selectors permitted in specs. 1 TestOps step = 1 Playwright test with tmsCase() traceability and isDevRun() mutation guards.

Layer 2 — Typed Page Object & SLA Engine (src/pages/)

Extends BasePage: structured step logging, fillSecure() credential redaction, interceptApiCall() network assertions, and assertInteractionSla() timing checks.

Layer 3 — Resilience & Secret Brokers (src/helpers/)

Includes CredentialProvider (Env/Vault/Doppler), EntitySupplyManager (LIFO cleanup), FileDownloadInspector (PDF/XLSX verification), and SmartLocatorDiagnostics.

Layer 4 — Assisted Engineering Workflows (.agent/skills/)

Standardized IDE workflows (project-setup, local-setup, create-tests, heal-locators) backed by live Playwright DOM inspection.

// tests/e2e/smoke/navigation.spec.ts — Selector-Free Spec
import { test } from '../../../src/fixtures/base.fixture';
import { isDevRun } from '../../../src/helpers/environment.helper';
import { tmsCase } from '../../../src/helpers/tms.helper';

test.describe('Application Shell & Checkout (@smoke @sanity)', () => {
  test('1 — shell loads, authenticates, and sorts catalog @prod-safe', async ({
    navigationPage,
  }) => {
    await tmsCase(100001);

    await navigationPage.navigateTo('https://www.saucedemo.com');
    await navigationPage.authenticateDemoPortal('standard_user', 'secret_sauce');
    await navigationPage.sortCatalogBy('hilo');
  });

  test('2 — state-mutating checkout runs on verified dev only', async ({
    navigationPage,
  }) => {
    test.skip(!isDevRun(), 'Mutating test: runs on dev environment only');
    await tmsCase(100002);

    await navigationPage.navigateTo('https://www.saucedemo.com');
    await navigationPage.authenticateDemoPortal('standard_user', 'secret_sauce');
    await navigationPage.addCoreItemsToCart();
    await navigationPage.completeCheckoutFlow('Denis', 'Zilai', '400001');
  });
});
Section 03 — Environment Governance

Three-Tier Environment Isolation

Select an environment tier below to inspect how resolveContext(), URL hostname inspection, and PROTECTED_ENTITY_IDS prevent accidental state mutations in Staging and Production.

DEV Environment: Full CRUD + Automatic LIFO Teardown

On ENV=dev, regression suites provision test records on demand via EntitySupplyManager.findOrProvision() and automatically clean them up in reverse (LIFO) order after the test finishes—while protecting baseline records listed in PROTECTED_ENTITY_IDS.

$ ENV=dev npx playwright test --project=chromium
test.skip(!isDevRun(), 'Mutating test: runs on dev only');

const order = await entitySupply.findOrProvision({
  entityType: 'SubscriptionOrder',
  findExistingFn: () => api.findDraftOrder(),
  provisionNewFn: () => api.createDraftOrder(),
  cleanupFn: (id) => api.deleteDraftOrder(id), // LIFO auto-cleanup
});
Section 04 — Authoring & Maintenance

Structured Test Authoring & Selector Stability Scoring

Engineers use repeatable workflows to turn product requirements into typed specs (create-tests) and repair broken selectors (heal-locators) using a transparent 0–100 stability scoring hierarchy.

create-tests — From Requirement to Verified Spec

1. Requirement & Diff Review: Analyzes ticket acceptance criteria and frontend PR diffs to identify affected routes and edge cases.

2. Live DOM Inspection: Opens the target application route in Chromium and maps accessible roles, labels, and test attributes.

3. Step-by-Step Test Plan: Proposes happy-path, validation, and @prod-safe test steps for engineer review before generating code.

4. Page Object & Spec Generation: Writes the typed Page Object and Spec file, links TestRail/Xray IDs, and verifies with npm run lint and npx playwright test.

heal-locators — 0–100 Selector Stability Hierarchy
98 / 100
Dedicated Test Attribute (this.getByTestId('submit-order'))

Decoupled from UI copy changes, localization, and CSS styling refactors.

92 / 100
W3C Accessible Role (this.page.getByRole('button', { name }))

Verifies accessibility tree compliance while matching how users interact with the page.

85 / 100
Explicit Form Label (this.page.getByLabel('Invoice Date'))

Validates semantic <label for="..."> bindings across form inputs.

Section 05 — Production Utilities

Built-In Helpers for Complex Web Applications

Pre-built utilities for common enterprise testing challenges: external secret managers, virtualized data tables, binary file exports, and API/SLA assertions.

1. Multi-Cloud Secret Broker (CredentialProvider)

Resolves credentials from .env, HashiCorp Vault, or Doppler—paired with fillSecure() so sensitive inputs are always logged as ***REDACTED*** in test reports.

const creds = await CredentialProvider.getCredentials(tenant, env);
await this.fillSecure(this.passwordInput, creds.password, 'SSO Password');
2. Virtualized Data Grid Reader (readAllVirtualizedRows)

Scrolls AG Grid, TanStack Virtual, or MUI DataGrid tables incrementally, indexing rows by data-index so recycled DOM rows are captured without duplicates.

const rows = await this.readAllVirtualizedRows({
  scrollContainer: this.gridViewport,
  rowLocator: this.gridRow,
  totalCountLocator: this.paginationSummary,
});
3. File Export Verifier (FileDownloadInspector)

Validates exported reports in memory by checking binary file signatures (%PDF- header, PK\x03\x04 XLSX zip container) and parsed CSV row counts.

const pdfMeta = await FileDownloadInspector.verifyPdfSignature(download);
expect(pdfMeta.byteLength).toBeGreaterThan(1024);
4. Atomic API Interception & SLA Checks (BasePage)

Combines UI triggers with backend HTTP response verification and client-side interaction timing budgets in a single method call.

await this.interceptApiCall('/api/v1/checkout', 200, async () => {
  await this.clickElement(this.confirmOrderBtn, 'Confirm Order');
});
Section 06 — CI/CD & Traceability

Trigger-Aware CI Sharding & TestOps Reporting

The included GitHub Actions pipeline scales parallel worker shards based on the build trigger and publishes JUnit, HTML, and TestRail/Xray/Qase traceability reports.

Pull Request Gate
@smoke • 2 Shards

Runs fast verification against staging or ephemeral PR preview deployments (CUSTOM_URL) in ~90 seconds.

Scheduled Nightly Run
@regression • 4 Shards

Executes the full regression suite across Chromium, Firefox, and WebKit with trace, video, and DOM snapshot retention on failure.

On-Demand Release Gate
1–8 Configurable Shards

Parameterized workflow_dispatch allowing engineers to select target tenant, environment, and tag filter.

# Automated TestOps Run Naming (TmsApiClient.formatCiRunName)
ArgonQA #8849201 • [stage] • @smoke • 2x Shards      → 100% Passed (38s)
ArgonQA #8851044 • [dev]   • @regression • 4x Shards → 142/142 Passed (2m 14s)
Section 07 — Engineering Impact & Rollout

Engineering Time-Savings Estimator & 14-Day Rollout

Use the estimator below to model the engineering hours reclaimed by replacing manual pre-release regression cycles and brittle selector maintenance with a deterministic Playwright suite.

Engineering Capacity Estimator
Estimated Annual Engineering Value Reclaimed
$116,736 / yr
Engineering Time Saved
1,228 hrs / yr
Standard 14-Day Implementation Schedule
Days 1–3
Phase 1: Repository & Authentication Setup

Configure environment targets (dev/stage/prod), SSO/session storage caching (auth.setup.ts), and secret resolution.

Days 4–10
Phase 2: Core Critical-Path Automation

Implement Page Objects and step-numbered specs for the top business-critical workflows (@smoke, @sanity, @prod-safe).

Days 11–14
Phase 3: CI/CD Sharding & Team Handover

Enable parallel GitHub Actions sharding, TestOps reporting, and walkthrough sessions for internal developers.

01 / 07