Testing Philosophy
AgenticPal involves complex interactions between:- LLM calls with variable outputs
- External API integrations (Google services)
- Stateful graph execution
- User confirmation flows
- Integration testing with real services
- Manual testing with diverse user inputs
- Service isolation for independent testing
Testing Layers
Service Layer Testing
The service layer is the most testable component since it has clear inputs/outputs.Tool Layer Testing
Test tool wrappers independently:test_tools.py
Graph Node Testing
Test individual nodes with mock states:test_nodes.py
Manual Testing Checklist
Use this checklist when testing changes:Calendar Operations
- Create event with relative dates (“tomorrow”, “next Tuesday”)
- Create event with absolute dates (“2026-03-15”)
- Create all-day event
- Create event with attendees
- List upcoming events
- Search events by keyword
- Update event details
- Delete event (with confirmation)
- Handle invalid date formats gracefully
Gmail Operations
- List recent emails
- Search emails with query syntax
- Get full email details
- List unread emails
- Generate weekly email summary
- Handle empty search results
- Handle invalid message IDs
Tasks Operations
- Create task with title only
- Create task with due date
- Create task with notes
- List tasks from default list
- List tasks from specific list
- Mark task complete
- Mark task incomplete
- Update task details
- Delete task (with confirmation)
- Get all task lists
Agent Behavior
- Simple requests execute correctly
- Multi-step requests work
- Clarifying questions are asked when needed
- Confirmation prompts appear for destructive operations
- Error messages are helpful and actionable
- Responses are natural and informative
Testing Patterns
Fixture Pattern
Create reusable test data:Cleanup Pattern
Always clean up test data:Assertion Pattern
Use descriptive assertions:Testing Best Practices
Test in Isolation
Test each layer independently before integration testing.
Use Test Accounts
Never test with production data. Use dedicated test accounts.
Clean Up
Always delete test data after tests complete.
Test Errors
Verify error handling is as important as testing success cases.
Debugging Tips
Enable Verbose Logging
Inspect State
Add state inspection in graph nodes:Test Individual Components
Test components in isolation:Performance Testing
Monitor execution time for expensive operations:Future Testing Plans
Planned improvements to the testing infrastructure:- Pytest Suite - Migrate to pytest for better organization
- Mock Services - Add mock implementations for faster tests
- CI/CD Integration - Run tests automatically on commits
- Coverage Reports - Track code coverage metrics
- LLM Testing - Strategies for testing LLM interactions
See Also
Contributing
Contribution guidelines and workflow
Custom Tools
How to add and test new tools