Course Code: testangularbspk
Prerequisites:

Participants must be proficient with

Building Applications in Angular

  • JavaScript async patterns using Callbacks, Promises, Async Await & Observables
Overview:

This course is aimed at equipping the developers to write tests for angular applications efficiently.

  

Course Outline:

Testing Basics

  • Introduction to Jasmine
  • Test Suites & Specifications
  • Arrange, Act & Assert
  • Matchers in Jasmine
  • Jasmine Spy Overview
  • Structuring Angular Tests
  • Test Setup & beforeEach
  • Dependency Injection
  • The angular TestBed

Testing Services

  • Testing Http Services
  • Using HttpClientTestingModule
  • HttpTestingController
  • Testing Error Handling
  • Testing Http Request Parameters
  • Testing Resolvers, App Initializers & Constructor

Testing Components

  • Presentational Components
  • Test setup with the async Test Utility
  • Simulating User DOM Interaction
  • Testing DOM Interaction
  • Triggering Change Detection
  • Testing Container Components
  • Mocking Observables

Asynchronous Angular Testing

  • Jasmine done() function
  • Understanding fakeAsync Testing Zone
  • Testing Promises
  • Using fakeAsync with Observables
  • waitForAsync Test Zone

End to End Testing with Cypress

  • Overview of Cypress
  • Cypress APIs
  • Mocking HTTP Backend using Cypress
  • Simulating User Interaction in Cypress

Continuous Integration

  • CLI Code Coverage
  • Deployment in Production Mode
  • Preparing for CI
  • Running Cypress E2E Tests using Travis CI

Jest

  • Jest Overview
  • Organizing Tests in Jest
  • Jest Assertions
  • Mocking using jest.fn()
  • Jest Setup in Angular Applications