KnowledgeCity

测试 Angular 应用程序

This chapter will introduce software testing and how to write tests for your Angular application. You’ll learn about the different types of tests and the features they focus on.
免费观看第一课 — 获取全部 7 节课程的完整访问权限。

To view this video please enable JavaScript.

课程:按需
中级  提供者 Michaela Ochnich  7 课时 ·  17m  语言:阿拉伯语, 德语, 英语, 西班牙语, 法语, 葡萄牙语, 简体中文 

课程描述

This chapter will introduce software testing and how to write tests for your Angular application. You’ll learn about the different types of tests and the features they focus on. You’ll learn how to begin writing unit tests for components and services using Jasmine, a Javascript testing framework, and how to run them with Karma, a test runner created by Angular. 

您将学到的内容

  • 了解不同类型的软件测试及其各自关注的功能特性
  • 使用 Jasmine 为 Angular 组件和服务编写单元测试
  • 使用由 Angular 创建的测试运行器 Karma 执行测试
  • 使用 TestBed 构建和配置 Angular 测试
  • 区分不同的测试类型及其结构化方式

关键要点

  • 本章介绍软件测试以及如何为 Angular 应用程序编写测试。
  • Jasmine 是一个 JavaScript 测试框架,用于为组件和服务编写单元测试。
  • Karma 是由 Angular 创建的测试运行器,用于运行测试。
  • 本章涵盖不同类型的测试以及每种类型所关注的具体功能特性。

常见问题

本课程将学习哪些内容?

本章介绍 Angular 应用程序的软件测试,涵盖不同类型的测试,以及如何使用 Jasmine 为组件和服务编写单元测试,再通过 Karma 运行这些测试。

本课程使用哪些测试工具?

本课程使用 Jasmine(一个 JavaScript 测试框架)编写单元测试,并使用由 Angular 创建的测试运行器 Karma 来运行测试。

课程涵盖哪些主题?

课程内容包括 Karma 与 Jasmine 简介、TestBed、测试结构以及测试类型。

本课程的学习目标是什么?

学习目标是了解不同类型的软件测试,并学习如何使用 Jasmine 编写单元测试。