Step-by-Step Tutorials
Learn Donobu through practical tutorials that guide you from basic automation to advanced testing scenarios.
Tutorial Overview 📚
These hands-on tutorials will guide you through common automation scenarios, from simple tasks to complex testing workflows.
Tutorial 1: Your First Automation 🚀
Goal
Create an automation that searches for a product on an e-commerce site and extracts pricing information.
Prerequisites
- Donobu installed and running
- At least one GPT configuration set up
Steps
Launch Donobu Studio
- Open Donobu from your Applications folder
- Verify your GPT configuration is active
Create Your First Flow
# Using the API curl -X POST http://localhost:31000/api/flows \ -H "Content-Type: application/json" \ -d '{ "name": "Product Search Tutorial", "targetWebsite": "https://example-shop.com", "overallObjective": "Search for wireless headphones, find the first result, and extract the price", "initialRunMode": "AUTONOMOUS" }'
Watch the Magic
- Donobu will open a browser window
- FlowPilot will navigate and search automatically
- Screenshots will be captured at each step
Review Results
- Check the flow status and results
- Download screenshots and video recordings
- Analyze the extracted data
Expected Outcome
You'll have a complete automation flow with visual documentation of every step taken.
Tutorial 2: Form Automation with Data Validation 📝
Goal
Automate filling out a contact form and validate the submission process.
Scenario
Fill out a contact form with test data and verify successful submission.
Implementation
Set Up Environment Variables
# Set test data curl -X POST http://localhost:31000/api/env/TEST_NAME \ -H "Content-Type: application/json" \ -d '{"value": "John Doe"}' curl -X POST http://localhost:31000/api/env/TEST_EMAIL \ -H "Content-Type: application/json" \ -d '{"value": "john.doe@example.com"}'
Create Form Automation Flow
{ "name": "Contact Form Automation", "targetWebsite": "https://example.com/contact", "overallObjective": "Fill out the contact form with test data and verify successful submission", "envVars": ["TEST_NAME", "TEST_EMAIL"], "resultJsonSchema": { "type": "object", "properties": { "submissionSuccess": {"type": "boolean"}, "confirmationMessage": {"type": "string"}, "responseTime": {"type": "number"} } }, "initialRunMode": "AUTONOMOUS" }
Add Custom Validation
{ "customTools": [{ "name": "validateFormSubmission", "description": "Validates that form submission was successful", "inputSchema": { "type": "object", "properties": { "successSelector": {"type": "string"}, "expectedMessage": {"type": "string"} } }, "javascript": "const element = await page.locator(successSelector); const text = await element.textContent(); return text.includes(expectedMessage);" }] }
Learning Points
- Environment variable usage
- Data extraction with JSON schemas
- Custom tool development
- Form handling and validation
Tutorial 3: Multi-Page User Journey Testing 🛒
Goal
Simulate a complete user journey: browse → select → add to cart → checkout.
Complex Scenario
Test an e-commerce purchase flow with multiple steps and validations.
Implementation Steps
Define the Journey
{ "name": "E-commerce Journey Test", "targetWebsite": "https://demo-store.com", "overallObjective": "Complete a full purchase journey: search for running shoes, select a product, add to cart, proceed to checkout, and validate each step", "maxToolCalls": 30, "resultJsonSchema": { "type": "object", "properties": { "productName": {"type": "string"}, "price": {"type": "number"}, "cartTotal": {"type": "number"}, "checkoutReached": {"type": "boolean"} } } }
Add Checkpoints Create validation points throughout the journey:
- Product search results loaded
- Product details page accessible
- Add to cart functionality works
- Cart displays correct items
- Checkout process initiates
Handle Dynamic Content
{ "customTools": [{ "name": "waitForProductLoad", "description": "Waits for product images and details to load", "inputSchema": { "type": "object", "properties": { "productSelector": {"type": "string"} } }, "javascript": "await page.locator(productSelector + ' img').waitFor({state: 'visible'}); await page.locator(productSelector + ' .price').waitFor({state: 'visible'});" }] }
Advanced Features Used
- Multi-step validation
- Dynamic content handling
- Performance monitoring
- Error recovery
Tutorial 4: API Testing Integration 🔗
Goal
Combine web automation with API testing for comprehensive validation.
Scenario
Test a web application's frontend while validating backend API responses.
Setup
Create Hybrid Flow
{ "name": "Frontend + API Validation", "targetWebsite": "https://app.example.com/dashboard", "overallObjective": "Login to dashboard, create a new record via UI, then validate the record exists via API", "envVars": ["API_KEY", "TEST_USER_EMAIL", "TEST_USER_PASSWORD"] }
Custom API Validation Tool
{ "customTools": [{ "name": "validateViaAPI", "description": "Validates data via REST API call", "inputSchema": { "type": "object", "properties": { "endpoint": {"type": "string"}, "expectedData": {"type": "object"} } }, "javascript": "const response = await fetch(endpoint, {headers: {'Authorization': `Bearer ${process.env.API_KEY}`}}); const data = await response.json(); return JSON.stringify(data).includes(JSON.stringify(expectedData));" }] }
Learning Points
- API and UI testing combination
- Environment variable security
- Custom HTTP requests
- Data consistency validation
Tutorial 5: CI/CD Pipeline Integration 🚀
Goal
Integrate Donobu flows into your continuous integration pipeline.
Implementation
Create Automated Test Suite
# Generate Playwright project from flows curl -X POST http://localhost:31000/api/flows/project \ -H "Content-Type: application/json" \ -d '{ "flowIds": ["flow-1", "flow-2", "flow-3"], "options": { "runInHeadedMode": false, "disableSelfHealingTests": false } }' \ --output test-suite.zip
CI Configuration Example (GitHub Actions)
name: E2E Tests on: [push, pull_request] jobs: e2e: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 - name: Install Playwright run: npm install @playwright/test - name: Run Donobu Tests run: npx playwright test
Benefits
- Automated regression testing
- Consistent test execution
- Early bug detection
- Team collaboration
Tutorial 6: Performance Testing 📊
Goal
Monitor and validate application performance during automation.
Setup Performance Monitoring
Create Performance-Aware Flow
{ "name": "Performance Validation", "targetWebsite": "https://app.example.com", "overallObjective": "Load dashboard and validate page load time is under 3 seconds", "customTools": [{ "name": "measurePageLoad", "description": "Measures page load performance", "inputSchema": {"type": "object", "properties": {}}, "javascript": "const start = Date.now(); await page.waitForLoadState('networkidle'); const loadTime = Date.now() - start; return {loadTime, success: loadTime < 3000};" }] }
Monitor Key Metrics
- Page load times
- Network request performance
- Resource usage
- Error rates
Best Practices for All Tutorials
- Start Small: Begin with simple flows and add complexity gradually
- Use Environment Variables: Keep sensitive data secure
- Add Validations: Verify expected outcomes at each step
- Handle Errors Gracefully: Plan for common failure scenarios
- Document Your Flows: Use descriptive names and comments
- Test in Different Environments: Validate across dev, staging, and production
- Monitor Performance: Keep track of execution times and resource usage
Next Steps
After completing these tutorials, you'll be ready to:
- Create complex automation workflows
- Integrate Donobu with your existing tools
- Build reliable test suites
- Implement monitoring and alerting
- Scale automation across your organization
Each tutorial builds on the previous one, giving you a comprehensive understanding of Donobu's capabilities and best practices.