Beginner Level
Cơ bản về Playwright:
- Playwright là gì? So sánh với Selenium?
- Playwright hỗ trợ những browser nào?
- Cài đặt và setup project Playwright như thế nào?
- Cấu trúc cơ bản của một test case Playwright?
Selectors và Locators:
- Các loại locator trong Playwright? Ưu nhược điểm từng loại?
- Viết selector cho element có text “Submit”
- Làm sao để locate element trong shadow DOM?
page.locator()
vspage.$()
khác nhau gì?
Basic Actions:
- Click, fill text, select dropdown trong Playwright
- Chờ element xuất hiện như thế nào?
- Làm sao để verify text/attribute của element?
- Upload file và handle dialog boxes
Intermediate Level
Test Organization:
- Page Object Model trong Playwright implement như thế nào?
- Test fixtures và hooks trong Playwright
- Parallel testing và cách configure
- Data-driven testing với Playwright
Advanced Interactions:
- Drag and drop implementation
- Handle multiple tabs/windows
- iframes và nested frames
- Mouse hover và keyboard shortcuts
Configuration & Setup:
- playwright.config.js cấu hình những gì?
- Headless vs headed mode
- Browser contexts vs pages
- Retry mechanisms và timeout settings
Assertions & Waits:
- Soft assertions vs hard assertions
- Auto-waiting mechanism hoạt động ra sao?
- Custom wait conditions
- Visual comparisons và screenshot testing
Advanced Level
Network & API:
- Intercept và modify network requests
- Mock API responses
- Test API endpoints với Playwright
- Handle authentication cookies/tokens
Performance & Monitoring:
- Performance testing với Playwright
- Memory leaks detection
- Coverage reports
- Tracing và debugging
CI/CD Integration:
- Setup Playwright trong CI pipeline
- Docker containers cho testing
- Parallel execution strategies
- Report generation và artifact handling
Advanced Patterns:
- Custom fixtures và dependency injection
- Test data management strategies
- Cross-browser testing approaches
- Mobile testing simulation
Expert Level Questions
Architecture & Design:
- Thiết kế framework testing scalable
- Micro-frontends testing strategies
- Component testing vs E2E testing
- Test maintenance và refactoring
Troubleshooting:
- Debug flaky tests
- Performance bottlenecks identification
- Browser compatibility issues
- Memory optimization
Code Examples họ có thể hỏi:
// Viết test case cho login flow
// Implement custom matcher
// Handle dynamic content loading
// Create reusable components
Câu hỏi tình huống thực tế:
- “Làm sao test một trang web có lazy loading?”
- “Handle authentication trong E2E tests”
- “Test file download/upload”
- “Dealing với third-party integrations”
- “Testing PWA applications”
- “Cross-origin iframe testing”
Tips chuẩn bị:
- Ôn lại documentation chính thức
- Thực hành viết code trực tiếp
- Chuẩn bị examples về projects đã làm
- Hiểu rõ best practices và anti-patterns
- Nắm solid về async/await trong JavaScript
Trả lời