QAWatch
agentic AI quality assurance
Technical Specification

The Test Definition Standard (TDS) v1.0

Flaky automation scripts are a symptom of bad design patterns. Every suite delivered by QA Watch complies with the strict Softknack TDS v1.0 architecture—guaranteeing deterministic, parallel execution, and isolated mock transactions.

The Principles

TDS v1.0 Automation Requirements

Traditional scripts share database states, hardcode tokens, and leak data. TDS mandates strict isolation and dynamic verification.

01

Database State Isolation (Atomic)

Tests must never assume existing data. Every test creates its own entities (e.g. creating a test product in setup) and processes them in isolation. This allows 1,000+ tests to run concurrently without colliding or generating duplicate primary keys.

02

Dynamic Parameter Chaining

No hardcoded values. If Test B requires an ID generated by Test A, the system chains them dynamically. The output of POST /orders is captured, parsed, and injected as the path parameter in GET /orders/{id} in real time.

03

Automatic State Teardown (Cleanups)

Every write operation registers a corresponding cleanup transaction. Even if assertions fail mid-test, the runner executes teardown callbacks (e.g. deleting seeded users, charges, or product rows), keeping sandbox DBs entirely clean.

04

Contract Schema Validations

We assert more than just 200 OK. Every response undergoes strict schema verification. We validate performance latency budgets (e.g. response < 200ms), headers (e.g. correct content-types), and match body payloads against OpenAPI models.

What counts as one test

Six criteria. Every test passes all of them, or it doesn't count.

TDS v1.0 is also our pricing honesty mechanism: because "one test" is publicly defined and auditable, coverage can't be padded and invoices can't be gamed.

Atomic

Verifies exactly one behaviour of one endpoint. When it fails, you know precisely what broke — no forensic debugging sessions.

Independent

Creates its own data and cleans up after itself. Any test can run alone, in any order, on any of 1,000 parallel workers.

Deterministic

Same input, same result, every run. No random waits, no shared tokens, no "re-run it and see" — the root causes of flakiness are designed out.

Assertive

Asserts a meaningful outcome — schema compliance, state change, latency budget — not just a 200 status code that hides real failures.

Surface-mapped

Traceable to a specific endpoint and scenario in your API surface — so coverage is a checklist you can audit, not a vibe.

Maintained

Kept green as your API evolves — in-scope changes and self-healing are part of the service, not a change-request invoice.

Each endpoint typically carries 3–5 outcome tests: happy path, auth/permission, validation/error, and boundary — counted per the TDS conventions.

Why this rigour exists

Flaky tests don't just waste time. They train your team to ignore red.

~16%
of tests at Google showed some level of flakiness — in one of the most sophisticated engineering orgs on earth. Flakiness is the default outcome of undisciplined test design.
5%
of API changes suffer failure rates above 25% in production — stability under change is the hardest part of API quality, and exactly what chained regression suites catch.
100%
of QA Watch suites are delivered to TDS v1.0 — database isolation, dynamic chaining, registered teardowns, and schema assertions — then senior-reviewed before go-live.
Softknack TDS v1.0
Code Comparison

The Flaky Way vs. The TDS Way

Toggle below to compare traditional, fragile Java test scripts with our isolation-hardened, schema-validated RestAssured code. By choosing Java & RestAssured, we guarantee a single unified test suite that can scale and grow across the web, mobile, and API layers (Playwright is still available on request).

FlakyApiTest.java
// ❌ Flaky: relies on static database state & shared auth tokens
import org.testng.annotations.Test;
import static io.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;

public class FlakyApiTest {
  // Hardcoded global authentication token
  private static final String AUTH_TOKEN = "Bearer token_xyz_98765";

  @Test
  public void testGetOrder() {
    given()
      .header("Authorization", AUTH_TOKEN)
    .when()
      .get("https://api.staging.example.com/v1/orders/1205")
    .then()
      // ❌ Fragile: order 1205 can be deleted by other runs, causing random CI failures
      .statusCode(200)
      // ❌ Brittle: matches only static value, no schema contract check
      .body("status", equalTo("pending"));
  }
}
//  TDS v1.0 Compliant: Isolated setup, Dynamic chaining & Cleanup
import org.testng.annotations.Test;
import static io.restassured.RestAssured.*;
import static io.restassured.module.jsv.JsonSchemaValidator.matchesJsonSchemaInClasspath;
import static org.hamcrest.Matchers.*;
import java.util.UUID;

public class TdsApiTest {
  @Test
  public void testIsolatedOrderWorkflow() {
    // 1. Setup: Seed isolated customer authentication credentials
    String uniqueId = UUID.randomUUID().toString();
    String token = AuthUtils.generateTempToken("user_" + uniqueId);

    // 2. Setup: Seed isolated product context to isolate order inventory
    String productId = ProductUtils.createProduct("Widget_" + uniqueId, 49.99);

    // 3. Chaining: Pass runtime product_id & Auth header into POST /orders
    Response orderRes = given()
      .header("Authorization", "Bearer " + token)
      .contentType("application/json")
      .body(Map.of("product_id", productId, "quantity", 1))
    .when()
      .post("/v1/orders");

    // 4. Contract validation: check latency, response code, and schema compliance
    orderRes.then()
      .statusCode(201)
      .time(lessThan(250L)) // SLA latency check
      .body("id", notNullValue())
      .body(matchesJsonSchemaInClasspath("order-schema.json")); // Schema check

    String orderId = orderRes.path("id");

    // 5. Teardown: Register cleanups so DB state remains untouched on failure
    TearDownManager.registerCleanup(() -> {
      given().header("Authorization", "Bearer " + token).delete("/v1/orders/" + orderId);
      ProductUtils.deleteProduct(productId);
    });
  }
}

Make flakiness a thing of the past.

Book a demo session. We will show you TDS-compliant code running on sandbox infrastructure in real-time.