Contents
Sentinel: When AI Generates Test Scenarios for You
How many hours have you spent writing test scenarios? How often have you walked through an application manually, writing down “click here, fill this in, check that”?
Sentinel approaches this problem differently: let AI do it for you.
The problem: why are test scenarios critical?
Every QA engineer knows this situation:
Developer: "Done, can you test it?"
QA: "What are the test cases?"
Developer: "Um... does it work?"Without defined test scenarios:
- ❌ Testing is random and things are missed
- ❌ Different testers test different things
- ❌ Regression bugs reach production
- ❌ Nobody knows what was actually tested
- ❌ Automation engineers have no starting point
With defined scenarios:
- ✅ Consistent functional coverage
- ✅ Reproducible tests
- ✅ Clear documentation of application behavior
- ✅ A foundation for automation
- ✅ Easier onboarding for new team members
The reality in practice
Writing scenarios is time-consuming:
1 application page = 30–60 minutes of analysis and writing
50 pages = 25–50 hours of work
+ each change = scenario updates
+ new features = new scenarios
= never-ending workNow imagine AI doing all of that in five minutes.
The solution: Sentinel, an automated test-scenario generator
Sentinel is a Python tool that:
Explores
Identifies
Generates
Web application → Sentinel → JSON scenarios → Playwright/SeleniumHow does it work?
# Running it is simple
uv run python main.py --url https://your-app.com --username admin --password secret
# Output: results/all_generated_scenarios.jsonPipeline:
1. WebNavigator (Playwright)
└── Log in to the application
└── Navigate between pages
2. DeepExplorer
├── Discover navigation elements
├── Extract dropdown menus
├── Identify CRUD buttons
├── Analyze forms
└── Detect tables and modals
3. CrewAI Agent (Ollama LLM)
└── Generate test scenarios for each pageWhat does Sentinel discover?
Sentinel uses 50+ CSS selectors to detect:
Navigation:
- Menu items, submenus and dropdowns
- SPA router links (Angular
routerLink, Vueto, Reacthref) - Tabs and profile/user menus
Action buttons:
# Sentinel recognizes 11 types of action:
- create, edit, delete, save, cancel # CRUD
- filter, search, clear # Search
- export, import, refresh # Data operationsForms:
- Input fields with types and validation
- Select boxes and date pickers
- Checkboxes and radio buttons
- Submit buttons
Tables:
- Column structure
- Pagination
- Row selection
- Sorting
Example generated scenario
{
"page_url": "https://app.example.com/users",
"scenarios": [
{
"name": "Test Happy Path - Create New User",
"description": "Verify admin can create new user account",
"steps": [
{
"action": "click",
"selector": "button[data-testid='btn-create']",
"value": "",
"description": "Click Create User button"
},
{
"action": "fill",
"selector": "input[name='email']",
"value": "newuser@test.com",
"description": "Fill email field"
},
{
"action": "fill",
"selector": "input[name='name']",
"value": "Test User",
"description": "Fill name field"
},
{
"action": "click",
"selector": "button[type='submit']",
"value": "",
"description": "Submit form"
},
{
"action": "verify_text",
"selector": ".toast-success",
"value": "User created successfully",
"description": "Verify success message"
}
]
}
]
}You can use this JSON directly in a Playwright or Selenium test runner.
Key Sentinel benefits
1. Local LLM = no data sent to the cloud
# Sentinel uses Ollama, running locally
LLM_API_URL="http://localhost:11434"
LLM_MODEL="llama3.1"Why it matters:
- ✅ Company data remains on your network
- ✅ No per-token API fees
- ✅ Works offline
- ✅ GDPR/compliance friendly
2. SPA support out of the box
Modern Angular, React and Vue applications have complex navigation:
// Angular
<a routerLink="/users">Users</a>
// React
<Link to="/users">Users</Link>
// Vue
<router-link to="/users">Users</router-link>Sentinel recognizes these and navigates correctly between pages.
3. Multi-user testing
Testing different roles is no problem:
USERS='[
{"username": "admin", "password": "admin123", "role": "admin"},
{"username": "user", "password": "user123", "role": "user"},
{"username": "viewer", "password": "view123", "role": "viewer"}
]'Sentinel tests with each user and generates scenarios according to what that role can see.
4. Three integration methods
# 1. CLI - simple execution
uv run python main.py
# 2. MCP Server - Claude integration
# tools: analyze_web_application, explore_web_application
# 3. gRPC Service - remote calls
# port 50051, language-agnosticPractical use case: a QA team without an automation engineer
Situation:
- A small team: three developers and one QA engineer
- QA tests manually and has no time for automation
- Management wants “more tests, faster”
The Sentinel approach:
# 1. Run Sentinel in the staging environment
uv run python main.py \
--url https://staging.app.com \
--login-url https://staging.app.com/login \
--username qa@company.com \
--password secret \
--max-pages 100
# 2. Receive JSON containing all scenarios
# 3. A QA engineer reviews and adjusts the scenarios
# 4. You can use the scenarios as:
# - A manual test checklist
# - A basis for Playwright tests
# - Functional documentationResult:
- ⏱️ 50 hours of manual work → 30 minutes
- 📋 Comprehensive application coverage
- 🤖 A foundation for automation
Why are test scenarios important even with automation?
1. Documentation of behavior
Test scenarios are living documentation:
{
"name": "User cannot delete own account",
"description": "Verify delete button is disabled for current user"
}That tells you more about the application than a code comment.
2. A foundation for automation
Without scenarios, the automation engineer guesses:
// ❌ Without scenarios
test('test login', async () => {
// what are we actually testing?
// what are the expected results?
// edge cases?
});
// ✅ With scenarios
test('Login with valid credentials shows dashboard', async () => {
// A clear objective from the JSON scenario
await page.fill('[data-testid="input-email"]', 'user@test.com');
await page.fill('[data-testid="input-password"]', 'password');
await page.click('[data-testid="btn-login"]');
await expect(page.locator('h1')).toContainText('Dashboard');
});3. Onboarding new members
A new QA engineer asks: “What does this application do?”
Answer: “Look at all_generated_scenarios.json.”
4. Regression testing
After each release:
- Run Sentinel
- Compare scenarios with previous ones
- See what changed
diff results/v1.0_scenarios.json results/v1.1_scenarios.jsonSentinel architecture
┌─────────────────────────────────────────────────┐
│ User Interface │
│ CLI │ MCP Server │ gRPC Service │
└────────────────────┬────────────────────────────┘
↓
┌─────────────────────────────────────────────────┐
│ Main Orchestrator │
│ - Multi-user workflow │
│ - Results aggregation │
└────────────────────┬────────────────────────────┘
↓
┌────────────┬───────────────┬────────────────────┐
│WebNavigator│ DeepExplorer │ CrewAI Agent │
│ Playwright │ Discovery │ Ollama LLM │
│ Auth │ Elements │ Test Generation │
└────────────┴───────────────┴────────────────────┘
↓
┌─────────────────────────────────────────────────┐
│ JSON Test Scenarios │
│ results/all_generated_scenarios.json │
└─────────────────────────────────────────────────┘Main components:
- WebNavigator (693 lines): Playwright wrapper, authentication and navigation
- DeepExplorer (600+ lines): intelligent UI exploration
- CrewAI Agent (106 lines): LLM integration through Ollama
Quick start
# 1. Install dependencies
pip install playwright crewai langchain-ollama
# 2. Install Playwright browsers
playwright install chromium
# 3. Run Ollama with a model
ollama run llama3.1
# 4. Configure .env
cat > .env << EOF
TARGET_URL="https://your-app.com"
LOGIN_URL="https://your-app.com/login"
USERS='[{"username":"admin","password":"secret","role":"admin"}]'
LLM_API_URL="http://localhost:11434"
LLM_MODEL="llama3.1"
HEADLESS="false"
MAX_PAGES="50"
EOF
# 5. Run Sentinel
uv run python main.pyConclusion
Sentinel changes the rules of QA:
| Traditional approach | With Sentinel |
|---|---|
| Manual UI exploration | Automatic exploration |
| Hours writing scenarios | Minutes generating them |
| Incomplete coverage | Systematic overview |
| Static documentation | Live scenarios from the UI |
When to use Sentinel:
- ✅ A new project needs test coverage
- ✅ A legacy application lacks documentation
- ✅ A QA team needs an automation foundation
- ✅ Auditing functionality before a refactor
Test scenarios are not a luxury; they are essential. Sentinel generates them automatically.
Sentinel is an open-source project for teams that want to streamline QA without depending on cloud AI services.