AI coding agents can now generate application code much faster than traditional development workflows.
That creates a new problem for engineering teams.
If implementation becomes faster, testing cannot remain entirely dependent on manually written end-to-end scenarios.
A modern QA pipeline needs to answer a different question:
Can an AI system plan, execute, analyze, and improve browser-based tests without removing the deterministic controls that make automated testing reliable?
This is where agentic QA becomes useful.
A practical agentic QA system does not replace browser automation with an LLM. Instead, it places an AI reasoning layer around a deterministic browser automation engine.
The architecture looks like this:
Requirement / Code Change
|
v
QA Planning Agent
|
v
Test Scenarios
|
v
Browser Automation Engine
|
v
Application
|
v
Test Results / Trace
|
v
Analysis Agent
|
+----+----+
| |
v v
Bug Test Fix
Report Recommendation
For .NET teams, this approach can be implemented using C#, browser automation, test frameworks, APIs, CI/CD pipelines, and an AI orchestration layer.
The key is to keep reasoning and execution separate.
What Makes QA "Agentic"?
Traditional automated testing follows a predefined path:
Open application
|
Login
|
Open Orders
|
Select order
|
Verify status
The test already knows what to do.
An agentic workflow introduces a planning layer:
Requirement
|
v
Agent determines scenarios
|
v
Agent selects available test actions
|
v
Browser executes actions
|
v
Agent evaluates results
|
v
Next action
The agent can adapt its next action based on what it observes.
However, that does not mean every test should become autonomous.
Stable business-critical workflows are often better represented as deterministic automated tests.
Agentic QA is most useful where exploration, test generation, failure analysis, and adaptive validation provide additional value.
Deterministic Automation vs Agentic QA
| Area | Traditional Automation | Agentic QA |
|---|---|---|
| Test path | Predefined | Dynamically planned |
| Locators | Explicit | Can be discovered or selected |
| Assertions | Predefined | Can be generated and evaluated |
| Exploration | Limited | Stronger |
| Execution | Deterministic | Adaptive |
| Failure analysis | Developer/QA driven | AI-assisted |
| Repeatability | Very high | Depends on agent controls |
| Cost | Predictable | Includes model usage |
| Best use | Critical regression | Exploration and adaptive scenarios |
The two approaches should normally coexist.
A mature pipeline might use:
QA Pipeline
|
+----------+----------+
| |
v v
Deterministic Tests Agentic Tests
| |
v v
Critical Regression Exploration
API Contracts Failure Analysis
Smoke Tests Scenario Generation
Security Regression Change-Based Testing
Use the Browser Engine as the Execution Kernel
An AI model should not directly control every browser operation through unrestricted instructions.
Instead, expose a controlled browser automation layer.
For .NET, a browser automation framework can provide operations such as:
await page.GotoAsync(url);
await page
.GetByRole(AriaRole.Button,
new() { Name = "Sign in" })
.ClickAsync();
await page
.GetByLabel("Email")
.FillAsync(email);
The browser engine handles:
Navigation
Locators
Clicks
Form interaction
Waiting
Screenshots
Network activity
Browser contexts
Assertions
Tracing
Modern browser automation frameworks also provide automatic waiting and web-aware assertions, reducing the need for arbitrary delays in tests.
That is important because an AI agent should not have to reason about every low-level browser timing problem.
The Four Main Agentic QA Components
A practical system can be divided into four components.
1. Planner
Converts a requirement into test scenarios.
Requirement
|
v
Planner
|
+--> Happy Path
+--> Validation
+--> Authorization
+--> Boundary Cases
+--> Error Handling
2. Executor
Translates approved test actions into browser operations.
3. Analyzer
Examines:
Test output
Screenshots
Browser traces
Console errors
Network failures
Application logs
4. Reporter
Produces a structured result:
{
"status": "failed",
"scenario": "Checkout with invalid card",
"failureType": "validation",
"evidence": [
"Validation message missing"
],
"confidence": "high"
}
This separation makes the system easier to test and operate.
Start With a Structured Test Plan
Do not give an agent a vague instruction such as:
Test the checkout page.
Generate a structured plan instead:
{
"feature": "Checkout",
"scenarios": [
{
"name": "Successful checkout",
"priority": "critical"
},
{
"name": "Invalid card",
"priority": "high"
},
{
"name": "Missing billing address",
"priority": "medium"
}
]
}
The planner can create this structure.
The executor should consume the structure.
This creates a boundary between:
AI reasoning
and:
Browser execution
Define an Action Contract
The agent should not be able to execute arbitrary code.
Define an action model:
public sealed record BrowserAction
{
public required string Action { get; init; }
public string? Target { get; init; }
public string? Value { get; init; }
}
Supported actions might include:
goto
click
fill
select
check
uncheck
assertVisible
assertText
screenshot
The executor validates the action before executing it.
For example:
public async Task ExecuteAsync(
BrowserAction action,
IPage page)
{
switch (action.Action)
{
case "goto":
await page.GotoAsync(
action.Target!);
break;
case "click":
await page
.GetByRole(
AriaRole.Button,
new()
{
Name = action.Target
})
.ClickAsync();
break;
default:
throw new InvalidOperationException(
$"Unsupported action: {action.Action}");
}
}
This provides a controlled execution surface.
Why a Restricted Action Set Matters
An unrestricted agent could potentially:
Execute arbitrary JavaScript
Read secrets
Access internal endpoints
Modify production data
Download sensitive files
Navigate outside the test environment
A controlled action layer reduces that risk.
The agent should have access only to operations required for testing.
Think of the executor as a sandbox:
AI Agent
|
v
Allowed Actions
|
v
Browser
not:
AI Agent
|
v
Arbitrary Machine Access
Build a .NET Test Project
A typical structure could be:
tests/
└── AgenticQa/
├── Agents/
│ ├── QaPlanner.cs
│ └── FailureAnalyzer.cs
├── Browser/
│ ├── BrowserExecutor.cs
│ └── BrowserAction.cs
├── Models/
│ ├── TestPlan.cs
│ └── TestResult.cs
├── Tests/
│ └── CheckoutTests.cs
└── Configuration/
└── TestSettings.cs
This keeps AI orchestration separate from browser execution.
The project can still use a standard .NET testing framework.
Example Browser Fixture
A reusable fixture can initialize the browser:
public sealed class BrowserFixture
: IAsyncLifetime
{
private IPlaywright? _playwright;
public IBrowser Browser { get; private set; } = null!;
public async Task InitializeAsync()
{
_playwright =
await Playwright.CreateAsync();
Browser =
await _playwright.Chromium
.LaunchAsync(new()
{
Headless = true
});
}
public async Task DisposeAsync()
{
await Browser.CloseAsync();
_playwright?.Dispose();
}
}
The browser lifecycle should be managed centrally.
This makes parallel execution and resource management easier to control.
Generate Tests From Requirements
Suppose the requirement is:
Users should be able to reset their password
using their registered email address.
The planner could produce:
Scenario 1
-----------
Valid registered email
Scenario 2
-----------
Unregistered email
Scenario 3
-----------
Invalid email format
Scenario 4
-----------
Empty email
Scenario 5
-----------
Expired reset link
This is where AI can add value.
It can expand a high-level requirement into candidate scenarios.
But the resulting scenarios should still be validated before execution.
Do Not Trust AI-Generated Assertions Automatically
An agent might generate:
Verify that checkout works.
That is too vague.
A useful assertion is specific:
await Expect(
page.GetByRole(
AriaRole.Heading,
new() { Name = "Order confirmed" }))
.ToBeVisibleAsync();
The test needs to define what successful behavior means.
A model can suggest assertions.
The test framework should execute explicit assertions.
This prevents a weak test from passing simply because the page loaded successfully.
Use Semantic Locators
Browser tests become fragile when they depend heavily on CSS implementation details.
Avoid:
await page
.Locator(".btn-primary:nth-child(2)")
.ClickAsync();
Prefer semantic locators:
await page
.GetByRole(
AriaRole.Button,
new() { Name = "Submit Order" })
.ClickAsync();
Or:
await page
.GetByTestId("submit-order")
.ClickAsync();
This is useful for agentic systems because the agent can reason about application semantics rather than purely visual coordinates.
Test Generation Should Be Followed by Validation
A safe workflow is:
Requirement
|
v
AI Generates Scenario
|
v
Human / Rule Validation
|
v
Structured Test Plan
|
v
Browser Execution
Do not immediately execute every generated scenario against a production environment.
Generated tests should first run against:
Local
Test
Staging
depending on the application's deployment strategy.
Add API Testing to the Same Pipeline
Browser testing is not always necessary.
If a test can be validated through an API, use the API.
For example:
Create Order
|
v
API
|
v
Database State
Then use browser automation only when UI behavior needs validation.
A combined pipeline can look like:
Agent Plan
|
+--> API Test
|
+--> Browser Test
|
+--> Database Verification
This can make the overall test suite more efficient.
Use API Calls to Prepare Test State
Suppose a browser test needs an existing customer.
Instead of creating the customer through ten UI interactions:
Login
|
Create customer
|
Fill address
|
Save
|
Verify
|
Open checkout
use an API or controlled fixture:
Test Setup
|
v
Create Customer via API
|
v
Browser Test
Browser tests should focus on the behavior they are intended to validate.
Agentic Failure Analysis
One of the strongest use cases is failure analysis.
Suppose a test fails:
Expected:
Order confirmed
Actual:
Payment failed
The analyzer can inspect:
Screenshot
+
DOM
+
Console logs
+
Network responses
+
Application logs
+
Trace
and classify the failure:
{
"category": "application",
"likelyCause": "payment API returned 500",
"testFailure": "expected confirmation page",
"confidence": 0.91
}
The AI should report the diagnosis rather than automatically modifying production code.
Capture Evidence
Every failed test should produce useful evidence.
At minimum:
Screenshot
DOM snapshot where appropriate
Browser console
Network information
Test log
Execution trace
For example:
await page.ScreenshotAsync(new()
{
Path = "artifacts/checkout-failure.png",
FullPage = true
});
Evidence is critical for both humans and AI analysis.
Without evidence, a failure-analysis agent is forced to guess.
Use Traces Instead of Screenshots Alone
A screenshot shows what the browser looked like.
It does not necessarily explain:
Which request failed?
Which action happened first?
What was the DOM state?
How long did the operation take?
A browser trace can provide richer execution information.
The pipeline becomes:
Test
|
v
Trace
|
+--> Screenshot
+--> Network
+--> Actions
+--> Timing
|
v
Failure Analyzer
This gives the agent structured evidence rather than a single image.
Detect Flaky Tests
A failed test does not always mean the application is broken.
A test may be flaky because of:
Timing
Shared state
Test ordering
External dependency
Browser resource constraints
Network instability
Weak selectors
Track repeated outcomes:
Run 1 -> Pass
Run 2 -> Pass
Run 3 -> Fail
Run 4 -> Pass
Run 5 -> Fail
The system can classify this as potentially flaky rather than immediately creating a defect.
But do not let the AI automatically mark a legitimate defect as flaky.
Require evidence.
Define a Flakiness Policy
For example:
Potentially flaky
-----------------
Same test fails intermittently
without a reproducible application
error signature.
The system can then recommend:
Investigate timing
Investigate selector
Investigate test isolation
Investigate external dependency
rather than automatically suppressing the test.
Agentic Self-Healing Requires Guardrails
A self-healing system might detect:
Old selector:
[data-test="submit"]
while the page now exposes:
[data-testid="submit-order"]
The agent may propose a replacement.
The dangerous approach is:
Failure
|
v
AI changes test
|
v
Pipeline passes
This can hide a real regression.
A safer model is:
Failure
|
v
Agent proposes fix
|
v
Validate new locator
|
v
Run original scenario
|
v
Compare evidence
|
v
Create reviewable change
The agent should not silently rewrite the test suite just to achieve a green build.
Protect Against "Building to the Test"
A test can pass while failing to validate the intended behavior.
For example, an AI agent could weaken:
Assert.Equal(
"Order confirmed",
actual);
into:
Assert.NotNull(actual);
The test now becomes easier to pass but less useful.
This is a critical problem with AI-generated tests.
The quality of a test depends on the strength of its assertions, not just whether the test executes successfully.
Use Requirements as the Source of Truth
A better validation flow is:
Requirement
|
+----------------+
| |
v v
Generated Test Expected Behavior
| |
+-------+--------+
|
v
Test Review
|
v
Execute
The agent should not be allowed to redefine the requirement merely because the application currently behaves differently.
Test Authentication Safely
Browser-based QA frequently requires authentication.
Do not give agents unrestricted production credentials.
Use:
Dedicated test users
+
Limited permissions
+
Non-production environment
+
Short-lived credentials
For privileged workflows:
Test Agent
|
v
Restricted Account
|
v
Test Environment
Avoid:
AI Agent
|
v
Production Admin Account
This is both a security and operational requirement.
Test Authorization, Not Just Authentication
A useful agentic QA pipeline should test:
User A
|
X
Tenant B resource
For example:
Scenario:
Customer A attempts to access
Customer B's invoice.
The expected result might be:
403 Forbidden
or another application-defined response.
The important point is that the agent should verify authorization boundaries rather than only checking that login works.
Protect Sensitive Data
Test environments often contain:
Email addresses
Customer records
Tokens
Payment information
Internal identifiers
Agent logs should not automatically contain all of this data.
Create a redaction layer:
public static string RedactEmail(string email)
{
var parts = email.Split('@');
if (parts.Length != 2)
return "***";
return $"{parts[0][0]}***@{parts[1]}";
}
In production systems, use a more comprehensive structured-data redaction strategy.
The goal is:
Browser Evidence
|
v
Redaction
|
v
AI Analysis
not:
Browser Evidence
|
v
Unfiltered Model Input
Control Agent Tool Access
An agentic QA worker might have tools such as:
browser.goto
browser.click
browser.fill
browser.screenshot
browser.readConsole
browser.getNetwork
test.run
test.retry
Avoid exposing unnecessary tools.
For example, a browser-testing agent does not necessarily need:
shell.execute
database.drop
production.deploy
secret.read
Least privilege applies to AI agents as well.
Use a Test Environment Boundary
The safest architecture is:
AI QA Agent
|
v
QA Environment
|
+--> Test Database
+--> Test APIs
+--> Test Browser
The environment itself should restrict access.
This means an agent failure is less likely to become an infrastructure incident.
CI/CD Integration
A practical pipeline can be:
Pull Request
|
v
Build
|
v
Unit Tests
|
v
API Tests
|
v
Browser Smoke Tests
|
v
Agentic Exploration
|
v
Report
Not every pull request needs the full exploratory suite.
A useful split is:
Pull Request
|
+--> Fast deterministic tests
|
+--> Small browser suite
Nightly / Scheduled
|
+--> Broader browser coverage
|
+--> Agentic exploration
This keeps developer feedback fast while allowing deeper validation separately.
Parallel Browser Execution
Browser tests can run in parallel when the test design supports isolation.
For example:
Worker 1 -> Chromium
Worker 2 -> Chromium
Worker 3 -> Firefox
Worker 4 -> WebKit
Parallel execution can reduce wall-clock time, but it also increases:
CPU usage
Memory usage
Browser resource consumption
Test-environment load
Therefore, choose concurrency based on the environment.
Do not maximize parallel workers without measuring the effect.
Browser Matrix
A browser matrix can be represented as:
| Browser | Smoke | Regression | Agentic |
|---|---|---|---|
| Chromium | Yes | Yes | Yes |
| Firefox | Yes | Yes | Optional |
| WebKit | Yes | Yes | Optional |
| Mobile Emulation | Yes | Selected | Selected |
The correct matrix depends on the application's supported platforms.
Keep Agentic Tests Deterministic Where Possible
The agent may make decisions dynamically.
The underlying test environment should remain controlled.
Use:
Fixed test data
Predictable APIs
Controlled clock where appropriate
Stable environment
Isolated database state
Known feature flags
This makes failures easier to reproduce.
Test Agent Decisions Separately
Do not only test the final browser outcome.
Test the planner itself.
For example:
Input:
Password reset requirement
Expected:
- Valid email
- Invalid email
- Empty email
- Expired token
The planner should produce scenarios covering those conditions.
This can become a normal automated test:
Assert.Contains(
plan.Scenarios,
x => x.Name.Contains("expired",
StringComparison.OrdinalIgnoreCase));
The AI planner becomes a testable component.
Test the Executor Separately
Given:
{
"action": "click",
"target": "Submit Order"
}
the executor should reliably perform that action.
This can be tested without involving an LLM.
That gives the architecture:
Planner Tests
+
Executor Tests
+
Integration Tests
+
End-to-End Tests
Instead of treating the entire agent as one opaque component.
Cost Control
AI-based testing introduces model usage.
A careless architecture might call the model for every:
Click
Fill
Wait
Assertion
That is unnecessary.
Prefer:
AI
|
+--> Plan
+--> Analyze
+--> Decide when needed
|
v
Deterministic Browser
The browser engine should perform routine operations without model calls.
This reduces latency, cost, and variability.
A Practical Agentic QA Architecture
A production-oriented design can look like this:
Requirement
|
v
+-------------+
| QA Planner |
+-------------+
|
v
Test Plan
|
v
+-------------+
| QA Executor |
+-------------+
|
v
Browser Engine
|
+--------+--------+
| |
v v
Application APIs
|
v
Test Evidence
|
+------+------+
| |
v v
Failure Analyzer Reporter
|
v
Recommendation
The important architectural boundary is:
AI = Reasoning
Browser Engine = Execution
Test Framework = Verification
CI/CD = Governance
Common Mistakes
Calling the LLM for Every Browser Action
This increases cost and variability without adding much value.
Giving the Agent Unrestricted Machine Access
Use a limited tool interface.
Running Against Production
Agentic exploration can create unpredictable interactions.
Use isolated environments.
Automatically Changing Tests After Failure
A self-healing system can hide genuine regressions if changes are accepted without validation.
Using Weak Assertions
A test that merely checks that a page loaded provides little business value.
Ignoring Test Data Isolation
Parallel browser workers can interfere with each other if they share mutable state.
Treating Every Failure as an Application Bug
Infrastructure, timing, browser, and test-data failures also exist.
Letting AI Decide Whether a Test Should Be Deleted
The system should recommend removal or modification, not silently eliminate coverage.
Logging Sensitive Browser Data
Redact tokens, credentials, personal data, and other sensitive values.
Troubleshooting
Tests Fail Randomly
Check:
Browser resource pressure
Test isolation
Selectors
Network dependency
Application readiness
Parallel execution
Agent Generates Too Many Tests
Introduce:
Risk level
Priority
Coverage requirements
Duplicate detection
Maximum scenarios per requirement
The goal is meaningful coverage, not maximum test count.
Agent Produces Weak Assertions
Require every generated scenario to contain:
Action
Expected state
Assertion
Failure evidence
Reject plans that contain only navigation steps.
Self-Healing Keeps Changing Locators
Require the proposed locator to be validated against the intended element semantics.
Do not accept a locator merely because it makes the test pass.
Browser Workers Consume Too Much Memory
Reduce parallelism and measure worker resource usage.
Browser concurrency should be tuned experimentally.
AI Analysis Gives the Wrong Root Cause
Provide structured evidence:
Trace
+
Screenshot
+
Console
+
Network
+
Application Logs
The more relevant evidence the analyzer receives, the less it has to infer from incomplete information.
Measuring an Agentic QA Pipeline
A useful benchmark should measure more than the number of generated tests.
Track:
| Metric | What It Measures |
|---|---|
| Test generation time | Planning efficiency |
| Execution time | Browser pipeline performance |
| Pass rate | Basic execution reliability |
| Flaky rate | Stability |
| Assertion quality | Test usefulness |
| Defect detection | QA effectiveness |
| False-positive rate | Diagnostic quality |
| Human review time | Operational overhead |
| Model calls | AI usage |
| Cost per run | Economic efficiency |
For example:
Traditional QA
--------------
100 tests
5 min execution
8 min maintenance
Agentic QA
----------
100 generated scenarios
7 min execution
3 min analysis
6 min human review
The numbers above are illustrative only.
A real benchmark must use measured results from the target application.
The Right Success Metric
Do not measure agentic QA by:
"How many tests did the AI generate?"
A better question is:
"How many meaningful defects did the system
identify while maintaining acceptable
false-positive and maintenance rates?"
A system generating 10,000 weak tests is less valuable than one generating 100 reliable scenarios that catch important regressions.
Conclusion
Agentic QA is not simply an LLM clicking buttons in a browser.
A reliable architecture separates reasoning from execution.
The AI agent can:
Understand requirements
|
v
Generate scenarios
|
v
Choose test strategy
|
v
Analyze failures
|
v
Recommend improvements
The browser automation layer should remain responsible for deterministic execution:
Navigate
Click
Fill
Wait
Assert
Capture Evidence
The test framework should verify the result.
CI/CD should decide whether the change can move forward.
This creates a layered system:
AI Agent
|
v
Test Plan
|
v
Controlled Tools
|
v
Browser Automation
|
v
Application
|
v
Evidence
|
v
AI Analysis
|
v
Human / CI Decision
For .NET teams, this approach provides a practical path toward agent-assisted QA without abandoning the reliability of conventional automated testing.
The most important principle is simple:
Use AI where reasoning is valuable, and use deterministic automation where execution must be predictable.
That distinction makes agentic QA much easier to secure, test, operate, and integrate into a production engineering workflow.
Frequently Asked Questions
What is agentic QA?
Agentic QA uses AI agents to perform activities such as test planning, scenario generation, browser exploration, failure analysis, and test recommendations while using controlled automation tools for actual execution.
Does agentic QA replace traditional automated tests?
No. Critical regression tests should generally remain deterministic. Agentic QA is particularly useful for exploration, scenario generation, adaptive validation, and failure analysis.
Can I build an agentic QA pipeline with .NET?
Yes. A .NET implementation can combine a standard test framework, browser automation, C# services, structured test contracts, an AI orchestration layer, and CI/CD.
Should the AI directly control the browser?
It is safer to expose a restricted set of browser operations through a controlled execution layer rather than giving the AI unrestricted browser or operating-system access.
Can AI automatically fix broken tests?
It can propose fixes, such as alternative locators, but automatically accepting changes is risky. The proposed fix should be validated against the original requirement and reviewed when appropriate.
How can I reduce flaky agentic tests?
Use semantic locators, automatic waiting, isolated test data, controlled environments, deterministic APIs, appropriate browser concurrency, and strong assertions.
Should agentic tests run on every pull request?
Not necessarily. A practical strategy is to keep fast deterministic tests and critical browser tests in the pull-request pipeline while running broader agentic exploration on scheduled or dedicated validation runs.
How should AI test failures be analyzed?
Give the analyzer structured evidence such as test output, screenshots, traces, browser console information, network failures, and relevant application logs.
What is the biggest risk with AI-generated tests?
A test can pass while providing weak or incorrect coverage. AI-generated tests therefore need strong assertions, requirement-based validation, and review rather than being judged only by whether they execute successfully.

Jasen FiciPosted Aug 21, 2026, 1:12 PM
We featured this post in DotNetNews here: https://dotnetnews.co/archive/the-net-news-daily-issue-524/