TINAA Quick Start Guide¶
Get Testing in 5 Minutes¶
Skip the learning curve. Start generating intelligent Playwright tests immediately.
🚀 Instant Setup¶
Option 1: Pre-built Docker Image (Fastest - 30 seconds)¶
# Get TINAA running with pre-built image
curl -O https://raw.githubusercontent.com/aj-geddes/tinaa-playwright-msp/main/docker-compose.prod.yml
docker-compose -f docker-compose.prod.yml up -d
# Verify it's working
curl http://localhost:8765/health
# ✅ {"status":"healthy","timestamp":"2024-01-01T00:00:00Z"}
Option 2: Build from Source with Docker¶
# Build and run from source code
git clone https://github.com/aj-geddes/tinaa-playwright-msp.git
cd tinaa-playwright-msp
docker-compose up -d
# Verify it's working
curl http://localhost:8765/health
# ✅ {"status":"healthy","timestamp":"2024-01-01T00:00:00Z"}
Option 3: Local Python¶
# Manual setup with Python
git clone https://github.com/aj-geddes/tinaa-playwright-msp.git
cd tinaa-playwright-msp
pip install -r requirements.txt
python app/http_server.py
# ✅ Server running on http://localhost:8765
💡 Your First Test in 60 Seconds¶
Generate Tests for Any Website¶
# Replace YOUR_WEBSITE with any URL
curl -X POST http://localhost:8765/test/exploratory \
-H "Content-Type: application/json" \
-d '{
"action": "exploratory",
"parameters": {
"url": "YOUR_WEBSITE",
"focus_area": "general"
}
}'
Result: TINAA automatically: - ✅ Analyzes your entire website - ✅ Generates Playwright test code - ✅ Creates stable selectors - ✅ Identifies test scenarios - ✅ Provides actionable insights
Example for GitHub¶
curl -X POST http://localhost:8765/test/exploratory \
-H "Content-Type: application/json" \
-d '{
"action": "exploratory",
"parameters": {
"url": "https://github.com",
"focus_area": "navigation"
}
}'
🎯 Common Use Cases¶
1. Test Your Login Form¶
curl -X POST http://localhost:8765/test/exploratory \
-d '{
"action": "exploratory",
"parameters": {
"url": "https://your-app.com/login",
"focus_area": "login"
}
}'
2. Check Accessibility Compliance¶
curl -X POST http://localhost:8765/test/accessibility \
-H "Content-Type: application/json" \
-d '{"action": "accessibility", "parameters": {}}'
3. Test Connectivity¶
curl -X POST http://localhost:8765/test/connectivity \
-H "Content-Type: application/json" \
-d '{"action": "connectivity"}'
Note: For security, responsive, visual, and performance testing, use the playbook execution endpoint with appropriate actions. These test types are not available as direct HTTP endpoints.
🛠️ Generate Production-Ready Code¶
TINAA outputs real Playwright test code you can use immediately:
// Generated by TINAA
import { test, expect } from '@playwright/test';
test('Login functionality test', async ({ page }) => {
// Navigate to login page
await page.goto('https://your-app.com/login');
// Fill login form
await page.locator('[data-testid="username"]').fill('testuser');
await page.locator('[data-testid="password"]').fill('password123');
// Submit form
await page.locator('[data-testid="login-button"]').click();
// Verify successful login
await expect(page).toHaveURL(/dashboard/);
await expect(page.locator('[data-testid="welcome"]')).toBeVisible();
});
📊 Understanding Results¶
TINAA returns comprehensive JSON with:
{
"success": true,
"result": {
"url": "https://your-app.com",
"test_scenarios": [
{
"name": "Login Flow Test",
"description": "Tests user authentication",
"generated_code": "// Playwright test code here",
"selectors": {
"username": "[data-testid='username']",
"password": "[data-testid='password']"
}
}
],
"accessibility_findings": [...],
"security_insights": [...],
"screenshots": ["base64-screenshot-data"]
}
}
🔧 Advanced Workflows¶
Multi-Step Test Playbooks¶
# Create a test sequence
curl -X POST http://localhost:8765/playbook/execute \
-H "Content-Type: application/json" \
-d '{
"name": "Complete User Journey",
"steps": [
{
"id": "navigate",
"action": "navigate",
"parameters": {"url": "https://your-app.com"}
},
{
"id": "test",
"action": "test_exploratory",
"parameters": {"url": "https://your-app.com"}
},
{
"id": "screenshot",
"action": "screenshot",
"parameters": {"full_page": true}
}
]
}'
Real-Time Progress Tracking¶
// WebSocket for live updates
const ws = new WebSocket('ws://localhost:8765/ws/client-123');
ws.onmessage = (event) => {
const update = JSON.parse(event.data);
console.log(`Progress: ${update.data?.progress || 0}%`);
};
// Start test with real-time feedback
ws.send(JSON.stringify({
type: 'execute',
action: 'test_exploratory',
parameters: { url: 'https://your-app.com' }
}));
🎯 Focus Areas for Targeted Testing¶
Use these focus areas to get specific test types:
Focus Area | What It Tests |
---|---|
"general" |
Overall functionality and UI |
"login" |
Authentication flows |
"forms" |
Form validation and submission |
"navigation" |
Menu and link navigation |
"search" |
Search functionality |
"checkout" |
E-commerce purchase flow |
"dashboard" |
Data displays and controls |
# Example: Focus on forms
curl -X POST http://localhost:8765/test/exploratory \
-d '{
"parameters": {
"url": "https://your-app.com",
"focus_area": "forms"
}
}'
📱 IDE Integration¶
VS Code Task¶
Add to .vscode/tasks.json
:
{
"label": "TINAA: Generate Tests",
"type": "shell",
"command": "curl",
"args": [
"-X", "POST",
"http://localhost:8765/test/exploratory",
"-H", "Content-Type: application/json",
"-d", "{\"action\": \"exploratory\", \"parameters\": {\"url\": \"${input:targetUrl}\"}}"
]
}
Command Line Shortcut¶
# Add to your .bashrc or .zshrc
alias tinaa-test='curl -X POST http://localhost:8765/test/exploratory -H "Content-Type: application/json" -d'
# Usage
tinaa-test '{"action": "exploratory", "parameters": {"url": "https://example.com"}}'
🚨 Troubleshooting¶
Quick Health Check¶
# Is TINAA running?
curl http://localhost:8765/health
# Expected: {"status":"healthy","timestamp":"..."}
Container Issues¶
# Check Docker status
docker ps | grep tinaa
# View logs (pre-built image)
docker logs tinaa-playwright-msp-http
# View logs (build from source)
docker logs tinaa-container
# Restart if needed (pre-built)
docker-compose -f docker-compose.prod.yml restart
# Restart if needed (build from source)
docker-compose restart
Browser Problems¶
# Test browser connectivity
curl -X POST http://localhost:8765/test/connectivity \
-H "Content-Type: application/json" \
-d '{"action": "connectivity"}'
# Expected: {"success": true, "result": "Browser started successfully."}
🎯 Common Workflows¶
Daily Development Workflow¶
# 1. Test your feature branch
tinaa-test '{"parameters": {"url": "http://localhost:3000", "focus_area": "general"}}'
# 2. Check accessibility
curl -X POST http://localhost:8765/test/accessibility -d '{}'
# 3. Test browser connectivity
curl -X POST http://localhost:8765/test/connectivity -d '{"action": "connectivity"}'
CI/CD Integration¶
# .github/workflows/tinaa-tests.yml
- name: Run TINAA Tests
run: |
curl -X POST http://localhost:8765/test/exploratory \
-d '{"parameters": {"url": "${{ env.STAGING_URL }}"}}' \
> tinaa-results.json
Pre-Production Checklist¶
# Complete pre-production test suite
for test_type in exploratory accessibility connectivity; do
curl -X POST http://localhost:8765/test/$test_type \
-d '{"parameters": {"url": "https://staging.your-app.com"}}' \
> results-$test_type.json
done
# For security, responsive, visual, and performance testing, use playbooks:
curl -X POST http://localhost:8765/playbook/execute \
-H "Content-Type: application/json" \
-d '{
"name": "Pre-Production Security & Performance Tests",
"steps": [
{"action": "test_security", "parameters": {"url": "https://staging.your-app.com"}},
{"action": "test_responsive", "parameters": {"url": "https://staging.your-app.com"}},
{"action": "test_performance", "parameters": {"url": "https://staging.your-app.com"}}
]
}' > results-advanced-tests.json
🎓 Learning Path¶
Beginner (Day 1)¶
- ✅ Run health check
- ✅ Generate first exploratory test
- ✅ Review generated code
- ✅ Run accessibility test
Intermediate (Week 1)¶
- ✅ Create custom playbooks
- ✅ Integrate with CI/CD
- ✅ Use focus areas effectively
- ✅ Set up IDE integration
Advanced (Month 1)¶
- ✅ Custom resource development
- ✅ Performance optimization
- ✅ Team workflow setup
- ✅ Enterprise deployment
🤝 Getting Help¶
Quick Commands Reference¶
# Health check
curl http://localhost:8765/health
# Basic test generation
curl -X POST http://localhost:8765/test/exploratory -d '{"parameters": {"url": "URL"}}'
# Accessibility audit
curl -X POST http://localhost:8765/test/accessibility -d '{}'
# Screenshot capture
curl -X POST http://localhost:8765/screenshot -d '{"parameters": {"full_page": true}}'
Resources¶
- Full Documentation: USER_GUIDE.md
- Developer Guide: DEVELOPER_GUIDE.md
- API Reference: API.md
- GitHub Issues: Report bugs
🎉 You're Ready!¶
In just 5 minutes, you now have: - ✅ TINAA running locally - ✅ Generated your first test - ✅ Understanding of core workflows - ✅ Ready-to-use test code
Next Steps: 1. Test your actual application 2. Integrate generated code into your test suite 3. Set up CI/CD automation 4. Explore advanced features
Ready to supercharge your Playwright testing? Start generating tests now and experience the power of AI-driven test automation!