Juno is Uptycs' AI security analyst: you ask a question, and it plans an investigation, runs queries across your telemetry and connected tools, and writes up what it found. We built an end-to-end regression suite for it on Playwright and Node.js, written and maintained largely with Claude Code. It runs from Jenkins against live stacks and covers almost every Juno feature: investigations, playbooks, connectors, calibrations, projects, Discovery AI filters, Hunting AI (natural language to SQL), configuration pages and usage billing.

Measure Value
Period Feb 24 – Nov 20, 2026 (465 commits, 5 contributors)
Classic UI suites 26 (T0–T28)
Standalone UI suites 28 (SA0–SA27)
Test cases in the test base 491 (477 automated, 14 manual)
Automation coverage 97.1%
Results backfilled on launch 51 builds, 14,482 case results

AI plays two roles. During development, Claude Code reads the runners, drives the live UI, and writes or repairs tests. At run time, Claude on AWS Bedrock acts as a generator and judge: it writes connector queries, scores Juno's answers against ground truth, and grades investigations against a rubric. This matters because Juno's output is non-deterministic text, which a fixed string assertion cannot check.

Design

The framework is a set of independent Node scripts, one per suite, sharing a helper library and driven by one master runner from Jenkins. Claude appears twice: Claude Code writes and repairs suites at development time, and Claude on Bedrock judges Juno's answers at run time.

 Jenkins pipeline ──► Master runner Claude Code (dev time) (parallel lanes, codegen, screenshots, traces usage capture) new suites, locator fixes │ │ writes, repairs ▼ │ ┌──────────────────────────────────────────────┐ │ │ Suites: 26 classic (T*) + 28 standalone (SA*) │◄───────┘ │ one runner each: own browser context, │ │ recordTest() per case, cleanup │ └──────────────────────────────────────────────┘ │ ▼ ┌──────────────────────────────────────────────┐ results/ │ lib/ shared helpers │ ──► markdown, JUnit XML, │ login + storageState, page_ready, grid_wait, │ screenshots, traces │ investigation_wait, lifecycle, API, judge │ │ └──────────────────────────────────────────────┘ ▼ │ │ │ Reporting ▼ ▼ ▼ test base (SQLite + JSONL), Juno web UI Uptycs API Claude (Bedrock) ReportPortal, Confluence (Chromium via (ground truth, judge: rubric, Playwright) cross-checks) coherence, 1–5 

Key design choices:

  • One runner per suite. A crash in one suite cannot take down the others, and any suite can be run alone with --headless=false for debugging.
  • Data outside the code. Query pools, connector inputs, playbook pools, calibration pools, injection payloads and the rubric live in JSON files; one suite adds queries by editing a markdown table with no code change.
  • Two UI variants. Classic suites (T*) and standalone forks (SA*) share lib/; a run is refused if it mixes the two, because a run targets one stack.
  • Git-native test base. 491 cases as YAML next to the code, a JSON schema, 35 requirements for traceability, and a validator as a CI gate that fails on drift in either direction.
  • Beta flag handled at startup. Every suite checks that the Juno Beta flag is off and turns it off if not.

How AI helped

AI was used in two separate places: Claude Code as the engineer that builds and repairs the suite, and Claude on Bedrock as a component inside the suite that judges Juno's answers.

Claude Code as the automation engineer

At least 39 commits since Sep 11, 2026 carry a Claude co-author trailer; earlier AI-assisted work was not tagged. The repo documents the working pattern in its README under "Working with Claude Code".

Task How Claude did it
New suite from a page Opens the live URL with the saved session, screenshots it, proposes a test spec, then writes the suite runner modelled on an existing small suite and registers it in the master runner
Fix a broken test Given the test ID and error ("T10.09: thumbs button not found"), it screenshots the current UI, updates the locator, and re-runs that one suite
Selector drift after a deploy Runs the suite, lists failures, compares old and new locators from screenshots and traces, moves to role/label locators, re-runs the suite and then the master runner
Shared helpers Pulled repeated waits into lib/: page_ready (loading splash), grid_wait (AG Grid filter settle), right_panel, breadcrumb menu, fail-fast investigation_wait
Standalone UI port Forked the classic suites into SA0–SA27 for the left-sidebar Juno UI, with a manifest and a gaps plan
Test base Built the git-native case registry: extracted 1,542 recordTest() call sites into 491 deduplicated cases, CI validator, SQLite + JSONL history, dashboard
Triage Separated product bugs from script faults and wrote the reasoning into code comments

A typical prompt:

Fix T10.09: the thumbs buttons moved. Open the page, screenshot the current UI, update the locator in the T10 runner, and run the suite. 

Claude on Bedrock as the judge inside the suite

Juno answers in free text that changes between releases, so string matching cannot tell a good investigation from a bad one. The suite calls Claude through AWS Bedrock at run time for five jobs:

  1. Query generation: writes a connector-specific question for Juno.
  2. Coherence and denial checks: decides whether Juno used the connector and answered, or refused for a valid reason.
  3. Ground-truth scoring: compares Juno's answer with data fetched from the Uptycs API and scores it 1–5; 4 or higher passes.
  4. Rubric grading: scores each investigation 0–5 on five weighted dimensions (hypotheses, evidence requests, interpretation, resolution, handoff); the pass bar is 60%.
  5. Prompt-injection compliance: decides whether Juno acted on an injected instruction.

The judge was built with guardrails so an LLM failure never turns into a false pass:

  • Opt-in and off by default. Calls fire only with CLAUDE_API_CALLS=true.
  • Structured output. The judge must answer through a forced submit_grade tool call whose input schema is the grading schema.
  • Arithmetic in code, not in the model. Weights, renormalisation and pass/fail are computed in code.
  • Graceful fallback. Every helper returns null on failure, and the suite falls back to a static query pool with keyword matching.
  • A skip is never a pass. Disabled, failed or over-budget calls are recorded as skipped with a reason.
  • Cost caps. $0.10 per rubric call and $0.05 per ground-truth run, checked before the call against a worst case and after it against real usage.
  • Auditability. Every judge call appends the prompt, raw reply, parsed score and token cost to a JSONL file.
  • Pluggable provider. Bedrock or OpenAI behind the same interface.

Playwright approach

The suite uses the Playwright library directly (Chromium) from plain Node scripts, not the Playwright Test runner. Each suite owns its browser context, records its own results, and cleans up what it created.

Authentication. Sessions are saved as Playwright storageState files, so runs skip Google sign-in. A helper creates them once in a headed browser and can deploy them to the Jenkins node. Restricted features use a separate support-role session, and the standalone UI uses a two-stage Keycloak-then-IdP login. A secureFill helper keeps secrets out of traces.

From recording to test. Flows start with npx playwright codegen --load-storage=..., which records clicks against the logged-in app. Claude Code then hardens the draft:

  • Role, label and test-id locators (getByRole, getByLabel, getByTestId) instead of generated CSS paths.
  • Text matches scoped to a row or container (locator.filter({ hasText })), so repeated labels such as "High" don't trigger strict-mode violations.
  • State asserted before acting on expand/collapse UI (aria-expanded, toBeVisible()), not click-and-hope.

Waiting on an AI product. Juno investigations run for minutes and the UI is heavy, so the waits are explicit and shared in lib/:

Helper Waits for
page_ready.js Loading splash gone and search bar ready
grid_wait.js AG Grid filter results to settle
investigation_wait.js Investigation done, failing fast on API status or "Investigation Failed" instead of a long timeout
dropdown_wait.js, right_panel.js Dropdown options loaded; right panel expanded before navigation

UI plus API checks. UI checks (element present, navigation works) are kept separate from logic checks (filter results correct, counts add up). Where possible a UI result is cross-checked against the Uptycs API: created exceptions in Alert Rules, calibrations, usage units, and LLM token cost when bring-your-own-key is configured.

Evidence. Screenshots before and after each action and on failure, plus a Playwright trace that is kept only when a test fails (npx playwright show-trace). Every investigation a run creates goes into a ledger with how it was cleaned up.

CI. Each Jenkins build validates the test base, runs suites (optionally in parallel lanes), builds the HTML report, ingests JUnit into the test base, and publishes to ReportPortal and optionally Confluence. The Juno version is recorded on every result.

Feature coverage

Every major Juno feature has a suite; the biggest are the configuration page (50 cases), ground-truth accuracy (42) and the sidebar (38). "AI judge" marks the suites that call Claude on Bedrock at run time.

Suite Feature Cases What is checked AI judge
T0 Investigation query workflow 13 Start, query, steps, results, follow-up; API validation Rubric
T1 Landing page and right panel 12 Suggested questions; Investigations, Reports, Projects panels
T2 Deep investigation 32 Sub-step toolbar, full screen, copy query, PDF, publish, rename
T3 Playbook CRUD 10 Create, launch from UI and API, webhooks, cleanup Rubric
T5 Connector lifecycle 28 Create connector, investigate, verify, delete; 14 connectors and combos Query + coherence
T6 Projects CRUD 5 Create, update, delete
T7 Discovery AI filters 29 AI filters on Cloud, Workloads, Applications, Vulnerabilities, Detections
T8 Hunting AI (NL to SQL) 13 Natural language to SQL generation
T9 Project workflow 10 Investigate inside a project, then delete it
T10 Investigation review 11 Reopen, show/hide query, thumbs feedback, PDF, publish
T11 Negative tests 10 Gibberish to Hunting AI; off-topic refusal Denial check
T12 API vulnerability investigation 14 Step expand/collapse; date range Rubric
T13 Suggested questions and settings 33 Connectors, calibrations, security zones, personas
T14 Sidebar and right panel 38 Open/close, collapsed icons, navigation
T15 Multi-persona queries 4+ Data-driven queries across personas and zones Rubric
T16 Juno Configurations page 50 Connectors and Calibrations tabs: filters, menus, forms
T17 Multi-connector investigation 29 Per connector: investigate, badges, steps, coherence Query + coherence
T18 Ground-truth accuracy 42 Juno's answer vs Uptycs API data, scored 1–5 Ground truth + rubric
T19 Search and navigation pages 16 Investigations, Reports, Projects search and detail
T20 Exception approval 31 Propose exception, approve, verify in Alert Rules, cleanup
T21 Custom calibration 19 Admin creates calibration, user applies it, step context Rubric
T23 Playbooks page 30 Templates, search, launch, edit, delete, schedule dialog
T24 Playbook schedule 12 Schedule fires and produces an investigation
T25 Markdown editor 22 Toolbar, preview, Enter-key safety, rendering
T27 Prompt injection — OWASP LLM01-style payloads in chat and playbook prompts; secret leaks Compliance
T28 Calibration state + launch 10 API only: running, deleted and stuck calibrations

The standalone Juno UI has its own 28 suites, SA0–SA27, forked from the classic ones. Usage is captured before and after every run and reconciled across the license dashboard, the API and the audit log.

Issues found

The suite surfaced Juno product defects (one reported first by a customer), cases that failed repeatedly across builds, bugs in our own reporting pipeline, and weaknesses in the automation itself. When the test base launched on Sep 10, 2026, 24 cases were failing at the latest run and 45 were flaky (result flips in 20% or more of runs).

Product issues

Area What we found Caught by
Calibrations (customer-reported) A calibration that failed or never finished could still be attached to a playbook, and the launch then failed with a confusing error. T28 pins the API behaviour for running, attached and deleted calibrations so a regression or the fix shows up as an assertion T28
Calibrations Calibrations stuck in "running" for more than 24 hours; a real product state, not a suite fault T28.09
Playbooks A CloudWatch log-review playbook cannot run without the inventory connector, and its step states contradict each other: the first step shows failed while every later step shows completed with no output. Rubric score 53–59% against a 60% bar, kept as a known failure T3.20 rubric
Investigation steps Sub-step full-screen views come back with "No results" and no download; now recorded as an app failure with a screenshot instead of passing Step checker (T2, T18)
Investigation steps Step status icons in the UI checked against the API task list, so a step shown as done when it errored is caught T18 step-icon checks
Date range (standalone UI) End Date earlier than Start Date is accepted; the test now asserts an error dialog on submit SA13.22d
Investigation quality Rubric grading flags weak evidence and interpretation scores where Juno declines without showing its checks Rubric (T0–T21)

One apparent defect turned out not to be one. Usage never moved on the test account because it is support-flagged, and license consumption is a no-op for support requests. The check was changed to report the before and after numbers instead of failing every run.

Across the team's channel, 73 product issues were logged between March and November 2026 from automation runs and manual checks. Most were in connector setup (OAuth flows, forms, deletes), connector use during investigations, audit-log filters, role permissions and UI polish, with a smaller group of investigation failures such as missed inventory tables or a follow-up that ignored a region filter.

Most-failed cases

Once ReportPortal grouped results under one stable launch name, it ranked the worst cases across 51 builds. Each is a candidate product issue in its area and is tracked build over build in the test base.

Case Check Failures in 51 builds
T10.08 Verify query results of a reopened investigation 19
T7.27 Detections AI query (Discovery AI filters) 19
T17 (Nuclei).08 Wait for a Nuclei connector investigation to finish 15
T15.04 Security alerts scoped to a security zone 14

Reporting and pipeline bugs

Checking reported numbers against the source also found bugs in our own tooling. Several had been reporting wrong data silently.

Bug Effect Fix
Duration unit dropped One suite writes ms, others write s; the runner stripped the unit, so a 281 s test showed as 78 hours and one build claimed 573,620 s against an 11,056 s wall clock Parser honours ms; 51 stored builds flagged as suspect
Audit-log pagination links is an array, so links.next was always undefined and only the newest 500 rows were read; one build recorded about half the usage it spent Pagination fixed; partial fetches marked as a floor
Usage attribution Spend an hour after a run was billed to that run Attribution bounded to the run window
ReportPortal logs discarded RP 5.15 returns 200 for a log posted with only a launch ID, then drops it; console logs were reported as attached but never stored Evidence attached to a test item and read back to verify
ReportPortal widgets empty Three dashboard widgets failed silently on config details Fixed; 9 of 11 widgets verified via API
ReportPortal import endpoint The documented JUnit import returns 405 on 5.15.4 Moved to the plugin API
CI VM CPU The virtual CPU lacks SSE4, so modern container images abort and Playwright runs slower ReportPortal hosted elsewhere; hypervisor fix recommended

Automation issues

Issue Effect Fix
Selector drift Deploys land several times a day, so locators break between runs Role/label locators; Claude repairs from screenshots and traces
Pixel-position heuristics A banner shifted the header about 50 px, so the breadcrumb click hit the notification bell: UI deletes never opened, about 25 tests silently fell back to the API, and one cleanup leaked an investigation Semantic locator for the breadcrumb menu
Right panel not re-expanded 13 search-page failures "link not found in right panel"; 11 sidebar tests failed in one build right_panel helpers; 16/16 and 31/31 pass
Substring matches The name "more" matched the banner's "Show More" and opened the wrong modal Scoped to grid rows with exact: true
Races on async UI Grid column filter typed into an empty grid; date-filter popup race; loading splash and multi-minute investigations caused timeouts grid_wait, page_ready, fail-fast investigation_wait
Duplicate labels Text locators hit several elements (e.g. many "High" rows); main-step rows leaked in as false sub-steps Scope matches to a row or container
Auth expiry and Google sign-in Runs stopped at login; Google sometimes shows account tiles instead of an email box Saved storageState, manual refresh, deploy to Jenkins
Passes alone, fails in a batch Stale sessions and leftover browser processes Fresh auth before batches; parallel lanes
Leftover test data Connectors and investigations piled up across runs Lifecycle helpers, stale-connector cleanup, investigation ledger
Non-deterministic answers Keyword checks passed bad answers and failed good ones Claude judge with rubric, ground truth and fallbacks
Weak assertions Some checks asserted nothing, or counted prompts by keyword Listed in the gaps plan
Inflated case count 1,542 recordTest() call sites looked like 3× the real coverage Deduplicated to 491 cases in the test base
Unstable test IDs One suite built IDs from a runtime counter, so inserting a case re-pointed 20 cases' history Flagged by the validator; pin to literals
Misleading suite names Three suite folders are named for something other than what they test True module recorded in the test base

Coverage gaps found during the test-base migration: date-range validation and RBAC have no automated coverage, and a set of query edge cases (empty submit, long query, special characters, rapid submit, no results) were specified but never automated.

Lessons learned and next steps

AI made it practical for a small team to keep 54 suites green against a UI that changes daily, but only with screenshots, traces and hard rules around the judge.

  1. Give Claude the real UI. Fixes are right when Claude sees a screenshot or trace of the failing state; guessed locators break again on the next deploy.
  2. One test at a time. Name the suite, test ID and error, fix that test, re-run that suite, then run the master runner.
  3. Keep the LLM out of the arithmetic. The model scores dimensions; code computes weights and pass/fail, so results are reproducible and auditable.
  4. A skipped judge is not a pass. Opt-in flags, cost caps and static fallbacks keep a Bedrock outage from hiding a regression.
  5. Separate product bugs from test faults in writing. A comment explaining a known real failure stops the next person from "fixing" it.
  6. Make drift fail the build. The test-base validator fails when a test ID has no case or a case points at a deleted script. The same goes for reporting: read back what was actually stored, because an HTTP 200 and a success line hid discarded logs and undercounted usage.

Next: port the fail-fast investigation wait to every suite, add a playbook-schedule suite for the standalone UI, cover the new standalone Settings pages (Users, Roles, API Keys), and add RBAC and date-range coverage.