Angular Testing Masterclass (Angular 20)

所在平台: Udemy

课程主页: https://www.udemy.com/course/angular-testing-course/

课程评论:没有评论

第一个写评论        关注课程

课程简介

课程名称:Angular 测试大师班(Angular 20) 课程概述: 本视频课程包含一个运行中的 GitHub 仓库,提供了一个完整的逐步指导,讲解 Angular 测试的整体流程。我们将使用一个已经完成但没有测试的小型示例应用程序,讨论测试应用程序各个部分的最佳方法,并逐步编写测试,解释每个决策的原因。课程开始时将编写多个部分的单元测试,后期将学习如何执行端到端(E2E)测试。课程不仅讲述如何进行测试,还涵盖了何时测试和为什么测试,以及各种测试最佳实践。 课程内容: 从零开始,我们将介绍行为驱动测试的概念,快速讲解 Jasmine 测试框架的主要概念和工具。接下来,我们将介绍测试最佳实践,讨论模拟和 Jasmine spy 的使用。课程将介绍一些 Angular 测试工具,如 Angular TestBed,用于测试简单的 Angular 服务。然后,我们将测试一个更复杂的 Angular 服务,同时讨论 Angular HTTP 请求的模拟,接着将涵盖 Angular 组件的测试。 我们将学习如何测试带有和不带 DOM 的 Angular 组件,测试组件的哪些部分,以及详细讲解使用 fakeAsync 和 async 进行异步测试。课程还将涵盖多种典型的 Angular 组件测试,如展示性组件及智能/容器组件,并学习如何模拟基于 Observable 的 Angular 服务。在对应用程序的多个组件进行单元测试后,我们将创建一个端到端测试的测试套件,使用 Cypress 进行测试。 在编写完应用程序的测试后,我们将将测试部署到 Travis CI,并确保每次提交都能触发测试。课程结束时,我们将生成测试覆盖率报告,并讨论一些指标。 课程目标: 通过本课程,您将能够自如编写多种服务和组件的 Angular 测试,熟悉 Jasmine 和 Angular 测试工具的多种用法及其应用时机。您将了解 Angular 测试的最佳实践,学习如何编写有用的测试,这些测试既节省时间又能长期维护项目的健康。欢迎查看课程的免费课程内容,祝您学习愉快!

课程评论(0条)

课程详情

This Course in a NutshellThis video course, complete with a running Github repository is a complete step-by-step guide to Angular Testing in general. We are going to take a small sample application that is already completed, but that has no tests yet.We are then going to discuss the best approach to test each part of the application, and we are going to write the tests step-by-step, explaining every decision along the way.We are going to start by writing Unit Tests for the multiple parts of the application, and then on a later stage, we are going to learn how to perform End to End (E2E) tests.More than talking about how to test, this course will also cover when to test and why, as well as all sorts of testing best practices.Course OverviewStarting from scratch, we are going to introduce behavior-driven testing concepts, by quickly introducing the main concepts and utilities of the Jasmine Testing framework.We are then going to introduce some testing best practices, and we are going to talk about mocks and Jasmine spies. We will then introduce some of the Angular Testing utilities such as the Angular TestBed, which we will be using to test a couple of simple Angular services.We are then going to move on to test a more complex Angular service and talk about Angular HTTP request mocking, after which we will cover the testing of Angular components.We are going to learn how to test Angular components with and without the DOM, what parts of the component to test, and we are going to cover in detail asynchronous tests using the fakeAsync and async utilities.We will cover how to test several types of typical Angular components, such as for example presentational components and smart or container components, and we will learn how to mock Angular Observable-based services.After unit testing the multiple components of our application, we are going to then create a test suite of End to End tests using Cypress.Once we have the tests written for our application, we are then going to deploy them to Travis CI, and make sure that the tests are triggered with every commitAt the end the course, we are going to generate a test coverage report, and discuss some of the metricsTable of ContentsThis course will go over the following topics:Introduction to the Jasmine testing frameworkIntroduction to Jasmine spiesUnit Testing of simple Angular ServicesJasmine testing best practicesIntroduction to Angular testing utilitiesTesting of complex Angular servicesMocking of Angular HTTP requestsUnit Testing of Angular ComponentsAsynchronous Angular Testing with fakeAsync and asyncMocking of Observable-based ServicesUnit Testing of Presentational ComponentsUnit Testing of Smart or Container ComponentsSimulation of user interaction in unit testsEnd to End Angular Testing with CypressContinuous Integration with Travis CIAngular CLI Test Coverage ReportsWhat Will You Learn In this Course?With this course, you will feel comfortable writing Angular tests for multiple types of services and components. You will know not only the multiple Jasmine and Angular testing utilities available, but you will also know when to use them and whyYou will be familiar with Angular testing best practices, and you will know how to write useful tests that don't take a lot of time to write and that contribute a lot for the long term health of your projectHave a look at the course free lessons, and please enjoy the course

课程标签

0人关注该课程

主题相关的课程