SDET Morning Helper AI ☀️

A regression suite that triages itself.

AI skills on top of a Java · Cucumber · Serenity · Selenium framework. Each nightly report is checked, every failure is classified and sent to the team that has to fix it, test cases are written from specs, and the test data they need is created automatically. It all runs through GitLab CI and Jenkins.

5integrated components
6failure categories, evidence-backed
2routed Slack channels
3data stores: DB · SFTP · repo

The problem

About 25 product modules across several production regions run every night. Someone had to read every failure by hand and decide: is this our script, our data, a flaky run, or a real bug?

Before

  • One engineer reads the Serenity report each morning
  • Flaky vs real decided by gut feeling
  • Defects reach manual QA late, sometimes not at all
  • The same failure gets investigated again every week

After

  • An AI agent triages minutes after the run ends
  • Flakiness confirmed by an automatic rerun
  • Defects arrive in #qa-manual with repro steps and a draft Jira
  • A knowledge base makes each run smarter than the last

End-to-end flow

From a merge request or the nightly schedule to a fixed script or a confirmed defect.

flowchart LR
  A[GitLab MR / nightly] -->|REST trigger| B[Jenkins pipeline]
  B --> C[Serenity reports]
  C --> D[Slack summary]
  D -->|trigger| E[AI report verification]
  E --> F{Classify}
  F -->|Script fix| G[Slack: automation-quickfix]
  F -->|Test data| G
  F -->|Intermittent| G
  F -->|Defect| H[Slack: qa-manual + draft Jira]
  F -->|Low confidence| I[Human review]
  G --> J[fix-and-rerun → MR]
  J --> A
  E -.learns.-> K[(Knowledge base)]
  K -.-> E
    

The components

Each one is an AI skill: a written procedure with rules and helper scripts. The agent follows it the same way every time.

AI report verification & routing

Once the nightly summary is in Slack, a post-build stage starts the agent in headless mode for that build.

  • Fetches Serenity outcomes and screenshots
  • Groups failures by normalised error signature
  • Reruns only the suspected flaky scenarios to confirm them
  • Gives each verdict a confidence level. Low confidence goes to human review.
  • Posts script, data and intermittent issues to #automation-quickfix and defects to #qa-manual
  • A ✅/❌ reaction corrects a verdict, and the correction is saved to the knowledge base
sequenceDiagram
  participant J as Jenkins
  participant S as Slack
  participant A as AI agent
  participant Q as automation-quickfix
  participant M as qa-manual
  J->>S: Summary block
  J->>A: post-build trigger (build #)
  A->>J: Fetch reports
  A->>A: Group + classify
  A->>J: Rerun suspected flaky
  J-->>A: Rerun result
  A->>Q: Script / data / intermittent
  A->>M: Defects + repro + Jira draft
  A->>S: Thread summary
      

Regression triage skill

Turns a build number into two reports, one for each audience. It's the engine behind component 1, and you can also run it yourself with /regression-triage <build>.

  • Traces each failure: Gherkin step → step definition → page method → locator
  • Flags any commit from the last 3 days that touched the failing page
  • Applies ordered classification rules, and every verdict cites its evidence
  • Starts a parallel sub-agent per group when a build has many groups
  • Hands script-fix groups to fix-and-rerun and a locator-fixer sub-agent
flowchart TD
  A[Build #] --> B[Fetch report]
  B --> C[Group by signature]
  C --> D[Read knowledge base]
  D --> E[Trace code path]
  E --> F[Check recent commits]
  F --> G[Classify + confidence]
  G --> H[Automation report]
  G --> I[Manual QA report]
  H --> J[fix-and-rerun]
      

Test case generation skill

Takes a Confluence/PRD page, plus manual cases if you have them, and produces a traceable case set. Approved cases are then automated.

  • Builds a requirement model first: fields, limits, states, rules and open questions
  • Orders cases Positive → Edge → Negative → State → Non-functional
  • Gives every case an ID and a Req ref, so nothing is invented
  • Merges cases that share setup into fewer scenarios
  • Reuses existing steps, with zero duplicate patterns and a compile check
  • Passes prerequisite data needs to the test data skill
flowchart TD
  A[Spec + cases] --> B[Requirement model]
  B --> C[Positive]
  B --> D[Edge]
  B --> E[Negative]
  B --> F[State]
  B --> G[Non-functional]
  C & D & E & F & G --> H[Traceable xlsx]
  H --> I{Automate?}
  I -->|yes| J[Scenarios reuse steps]
  J --> K[Test data skill]
      

Test data creation skill

Triggered by test case generation (a new prerequisite), by triage (a test-data verdict), or by an engineer.

  • Copies the exact shape of an existing sample and never invents a structure
  • Adds an idempotent scenario to the Test Data Creation suite that only creates what's missing
  • Picks DB, SFTP or repo using clear rules
  • Uses only synthetic identities and naming conventions
  • Needs human approval for every remote write
flowchart LR
  G[Generation] --> T[Test data skill]
  R[Triage] --> T
  T --> S[Data suite
idempotent] T --> Q{Store} Q --> DB[(MySQL)] Q --> SF[(SFTP)] Q --> RP[(Repo)]

GitLab CI test stage → Jenkins

A test stage maps changed files to product pods and calls Jenkins over REST, so only those pods' suites run.

  • Maps changed files → module → pod. Framework changes run Smoke on all pods.
  • buildWithParameters call, then polls the queue and the build
  • Blocks MRs that change automation code. Nightly runs don't block.
  • Keeps the token in masked CI variables, never in YAML
sequenceDiagram
  participant G as GitLab CI
  participant J as Jenkins
  participant S as Slack
  G->>G: changed files → pods
  G->>J: POST buildWithParameters
  J-->>G: queue URL
  G->>J: poll build
  J->>S: report + AI triage
  J-->>G: SUCCESS / FAILURE
      

Failure categories & routing

Rules are applied in order and the first strong match wins. Every verdict cites evidence: the error line, expected vs actual, and a screenshot.

Script fix #automation-quickfix

Locator or timeout failure while the screenshot shows the feature working, or the wrong dropdown, or a recent commit to that page.

Test data #automation-quickfix

A missing prerequisite, a name collision or a stale template. Sent to the test data skill.

Intermittent #automation-quickfix

Passed on the automatic rerun. A flake counter turns it into a script fix once it crosses a threshold.

Environment #automation-quickfix

Login or session errors, network errors, or many unrelated modules failing with the same signature.

Product defect #qa-manual

Correct input but a business mismatch, an error toast or a 4xx/5xx, and it fails again on rerun.

Needs review both

Low confidence or conflicting evidence. The report says what evidence would settle it.

Where test data lives

At runtime the framework looks in the DB first, then the repo, then SFTP. The skill always says which store it used and why.

MySQL · JDBC

Structured JSON that varies by scenario or environment, changes often, or is large. Keyed by scenario name.

journey templates payloads

SFTP

Files every Jenkins agent reads, binaries and bulk uploads, and data that pipelines refresh.

testData.xlsx upload CSVs

Repo

Small, static fixtures that get reviewed along with the code that uses them.

CSV headers XML fixtures

Design principles

What keeps an AI-driven pipeline trustworthy.

Evidence before verdict

Nothing is called a defect without expected vs actual, a screenshot or an API response.

Signatures, not scenarios

40 failures usually come from 5–8 root causes. Analyse those.

Confirm, don't guess

A failure is only labelled intermittent after the automatic rerun passes.

Humans approve outward actions

Jira tickets, pushes and remote data writes need a person to approve them.

Self-learning

Confirmed patterns and corrections go into a knowledge base that's read first on the next run.

Secrets stay secret

Credentials are referenced by key name and read through permission prompts.

Tech stack

Java 17Cucumber 7Serenity BDDSelenium 4Rest AssuredMavenJenkinsGitLab CIMySQL / JDBCSFTPAWS SSMSlack APIClaude Code skills & sub-agentsPythonBash