Testing Modern Web Apps with Jest & Playwright
Jason Nguyen
Instructor
Course preview
Khóa học về kiểm thử ứng dụng web hiện đại sử dụng Jest cho unit/integration và Playwright cho end-to-end. Bạn sẽ xây dựng suite tests toàn diện và tích hợp vào CI.
Course description
Khóa học về kiểm thử ứng dụng web hiện đại sử dụng Jest cho unit/integration và Playwright cho end-to-end. Bạn sẽ xây dựng suite tests toàn diện và tích hợp vào CI.
What you will learn
- Unit testing React components with Jest.
- API testing with supertest.
- End-to-end tests with Playwright.
- Mocking and fixtures.
- Running tests in CI environments.
Course content
6 chapter • 42 lesson • 0 minutes
Cơ bản về Jest.
Jest setup
Học về jest setup
Writing first test
Học về writing first test
Matchers và assertions
Học về matchers và assertions
Mock functions
Học về mock functions
Snapshot testing
Học về snapshot testing
Testing async code
Học về testing async code
Bài tập: test a utility library
Học về bài tập: test a utility library
Using Testing Library.
react-testing-library basics
Học về react-testing-library basics
Rendering components
Học về rendering components
Firing events
Học về firing events
Testing hooks
Học về testing hooks
Custom render utilities
Học về custom render utilities
Code coverage
Học về code coverage
Bài tập: test a form component
Học về bài tập: test a form component
Supertest and mocking.
Testing endpoints
Học về testing endpoints
Setting up test database
Học về setting up test database
Seeding fixtures
Học về seeding fixtures
Mocking external APIs
Học về mocking external apis
Coverage for backend
Học về coverage for backend
Parallel tests
Học về parallel tests
Bài tập: integration test user API
Học về bài tập: integration test user api
Browser automation and E2E.
Introduction to Playwright
Học về introduction to playwright
Writing first E2E test
Học về writing first e2e test
Selectors and actions
Học về selectors and actions
Handling authentication
Học về handling authentication
Parallel and CI runs
Học về parallel and ci runs
Visual regression testing
Học về visual regression testing
Bài tập: automate purchase flow
Học về bài tập: automate purchase flow
Keep tests deterministic.
Using jest.mock()
Học về using jest.mock()
Mocking modules vs functions
Học về mocking modules vs functions
Static fixtures
Học về static fixtures
Dynamic data factories
Học về dynamic data factories
Resetting state between tests
Học về resetting state between tests
Share fixtures between unit and E2E
Học về share fixtures between unit and e2e
Bài tập: create fixture library
Học về bài tập: create fixture library
Run tests automatically.
Configure GitHub Actions
Học về configure github actions
Caching node_modules
Học về caching node_modules
Collecting artifacts
Học về collecting artifacts
Failing fast and parallelism
Học về failing fast and parallelism
Recording videos/screenshots
Học về recording videos/screenshots
Slack/email notifications
Học về slack/email notifications
Final project: setup full test pipeline
Học về final project: setup full test pipeline
Course preview
Khóa học về kiểm thử ứng dụng web hiện đại sử dụng Jest cho unit/integration và Playwright cho end-to-end. Bạn sẽ xây dựng suite tests toàn diện và tích hợp vào CI.