|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/zero-to-hero-in-jest-unit-and-integration-testing-with-react/
课程评论:没有评论
**课程名称:Jest 实战:从零到精通 React 单元和集成测试** **课程概述:** 本课程将带您深入了解 Jest 测试库,学习如何为任何 React.js 应用程序编写单元测试和集成测试。我们将从软件开发和测试在真实项目中的流程入手,探讨自动化测试、单元测试和集成测试的重要性。课程还将介绍行为驱动开发 (BDD) 和测试驱动开发 (TDD) 的概念及其区别。 您将学会创建 React 应用和函数组件,并为它们编写测试。我们还将重点讲解如何为集成测试模拟真实的 API 调用。所有内容都将以动手实践、循序渐进的方式呈现。 **课程内容概要:** 1. **引言与课程概览** 2. **为何需要测试与软件开发生命周期 (SDLC)** 3. **BDD vs. TDD 测试方法论** 4. **测试类型:单元测试 (UT)、集成测试 (IT)、端到端测试 (E2E)** 5. **创建 React 应用并集成测试能力** 6. **创建 DOM 元素以进行基础测试** 7. **编写并运行您的第一个测试** 8. **理解元素的获取方式 (getBy, queryBy, findBy)** 9. **getBy, queryBy 的代码实践** 10. **单元测试用例需求** 11. **项目结构搭建与 React 扩展配置** 12. **Feedback Form 的初始状态测试** 13. **使用 describe 块组织相似测试** 14. **通过 fireEvent 实现用户交互测试** 15. **React 项目流程与结构解析** 16. **状态变量与 useState Hook** 17. **React 函数组件与 JSX** 18. **开发 Feedback Form 组件** 19. **手动测试与单元测试** 20. **使用 userEvent 进行用户交互测试** 21. **Feedback Overview 组件的单元测试需求** 22. **Feedback Overview 组件的“无反馈”用例测试** 23. **Feedback Overview 组件的“两条反馈”用例测试** 24. **开发 Feedback Overview 组件并传递数据** 25. **执行测试用例** 26. **如何优化您的测试用例** 27. **集成测试场景需求** 28. **集成测试场景 1 实现** 29. **集成测试场景 2 实现** 30. **开发添加新反馈的功能** 31. **Mock API 调用需求概述** 32. **安装 MSW (Mock Service Worker) 库** 33. **创建用于创建反馈的 MSW handler** 34. **设置 Mock Server** 35. **更新基于 API 调用的集成测试** 36. **使用 fetch 方法调用 API 保存反馈** 37. **如何调试测试用例** 38. **深入理解集成测试与 Mock Server 工作流程** 39. **后端 Node API 与使用真实后端进行前端测试**
In this course you will learn about jest testing library and how to use it to write Unit and Integration test for any react Js application.We will start by learning how does software development and testing takes place in a real live project in any company.Then we will learn about the importance of automation tests and importance of writing unit and integration tests.We will then learn about Behavior driven development (BDD) and Test driven development(TDD) and the difference between the two techniques.We will also learn to create react app and functional components. Then write tests for these components.We will also see how to Mock real API calls for our integrating test.All these and much more we will learn in handson based approach in a step by step manner.Following is the sequence we will cover the various topics:0-Introduction video - Course Overview1-Why we need Testing and SDLC2-BDD vs TDD Testing Approach3-Types of Testing - UT, IT, E2E4-Creating React App and Adding Testing Capability5-Creating Some DOM elements for Basic Testing6-Writting and Running our First Test7-How to get the Role of an Element8-Understanding difference between getBy queryBy and findBy9-Code Hands-on for getBy queryBy10-Requirements for Unit Test Cases11-Setup project structure and install react extention12-Test case for Feedback Form Onload Scenario13-Grouping similar Tests in one Describe block14-Adding user interaction to our Test with the help of fireEvent15-Understanding React Project Flow and Structure16-State variable and useState hook17-React Functional component and JSX18-Developing the Feedback Form19-Testing the Application manually and with Unit test20-Using userEvent to test user interaction21-Unit test Requirement for Feedback Overview component22-Feedback Overview Test for No Feedback Found23-Feedback Overview Test for 2 Feedback Found24-Developing the Feedback Overview Component and Passing data25-Executing the test cases26-How to Improve your test cases27-Requirements for Integration test scenarios28-Implementing Integration test Scenario 129-Implementing Integration test Scenario 230-Developing the functionality of adding new feedback31-Requirements overview for Mocking API calls32-Installing MSW library33-Creating MSW handler for create feedback34-Setting up the mock server35-Update the Integration test based on API call36-Make API call for saving feedback via fetch method37-How to Debug the Test case38-Deep dive into understanding the Integration test and Mock server flow39-Backend Node API and testing Frontend with Real backend