-
-
Notifications
You must be signed in to change notification settings - Fork 5
Testing WebEngine applications
Greg Bowler edited this page May 9, 2026
·
2 revisions
- Explain the difference between testing business logic, page behaviour, and full request flows.
- Explain why WebEngine’s separation of concerns helps testing.
- Test-driven development is the way in the "perfect world", but sometimes isn't practical.
- Application classes in isolation tested with PHPUnit.
- Page logic behaviour tested with Behat.
- Keep unit tests focused on application classes. Try to test all application functionality as it's built.
- Use behavioural tests for page-level integration.
- Avoid over-testing framework or language internals.
- Explain that this is a discipline, but getting into the habbit genuinely transforms development quality.
- With TDD, nothing the application can do can happen without being tested.
- Confidence in user-critical flows, confidence in data handling and business rules, confidence in rendering of important pages.
- Link to todo list TDD tutorial.
When you're ready to deploy to production, have a production checklist to hand.
- File-based routing
- Page views
- Page logic
- Dynamic URIs
- Headers and footers
- Custom HTML components
- Page partials
- Binding data to the DOM
- DOM manipulation
- Hello You tutorial
- Todo list tutorial
- Address book tutorial WIP
- Blueprints
- Application architecture
- Coding styleguide WIP
- PHP environment setup WIP
- Web servers WIP
- Background cron tasks
- Database setup WIP
- Client-side compilation WIP
- Testing WebEngine applications WIP
- Production checklist WIP
- Security WIP