Angular Developer Testing

This is a three-day instructor-led course.

In a DevOps environment, developers take responsibility for the quality (internal and external) of their applications and their build and test pipelines. This course will emphasize the process for creating automated tests for our Angular applications, including low-level Unit Tests, and Isolated Integration Tests.

Buzzwords Covered

  • Unit Testing
  • Integration Testing
  • End-To-End Testing
  • Test Doubles (Mocks, Stubs, Fakes, etc.)
  • Automated Testing in Pipelines
  • Accessibility
  • Additional Technologies Demonstrated or Used In Class:
    • Jest Testing Framework
    • Playwright Testing Framework

Prerequisites

This course is designed for established Angular developers who regularly deliver Angular application code in a team environment. A familiarity and comfort with Angular is required.

Objectives

The objective of this course is for developers to be able to understand, plan, and implement a suite of automated tests for their Angular applications, including the following:

Learn Low-Level Unit Testing, Including Test-First and Test-Driven Development

We will start to build our tool belt developer testing techniques. This module will teach low-level testing to ensure complex algorithm and interactions in "white box" testing. Developers will learn teachniques to test code with dependencies using mocks, stubs, and dummies, designing complex code with Test-Driven Development, and good test-fixture design using Jasmine.

Write Isolated Integration Tests for Angular Components and Full Applications

While low-level Unit tests are helpful, they can cause issues with code maintainability, and still leave "holes" of untested code. We will learn to create increasingly higher-level tests to ensure our components and our application meets our understanding of the requirements. Developers will learn to use the Angular Testing Library to created Component tests that exercise the component in a variety of scenarios. We will also expore other testing tools like Cypress and Playwright.

Understand the Role of Developer Testing in Overall Application Delivery

Now that we know the options available to test our Angular applications as developers, we will learn how to create (or discover) the best testing plan to ensure that when our code is committed and run through the gauntlet or automated tests, we are doing all we can to confidently move our code to the next environment while providing the flexibility to allow us to refactor, learn, and change our code over time as new technical and business requirements are introduced.

Automated Testing: Locally and in Build and Test Pipelines

Developers will learn to create an automated process for linting, building, unit testing, and (isolated) integration testing their Angular applications. We will create git pre-commit hooks to ensure our code meets quality standards before pushing our code for others, and learn to build our code and run the tests in our pipeline.

Create a Testing Plan for your Angular Applications that Grows in its Comprehensiveness with Feedback from Software Testers

Using the feedback provided by our build and test pipelines, we will learn to adjust our testing strategy to ensure smooth and quick delivery of our code while maintaining and even increasing the quality without losing the flexibility we need to meet the needs of the business.

Extract Heavily Tested Stable Features to Feature Modules or Library Modules

The best way to streamline your test pipelines over time is to identify the areas of your application that should be extracted to a shared module. We will learn how to extract useful functionality to an Angular module, create an improved test-plan for the module, and deliver it using NPM.

Feature Toggles and CI/CD with Angular

With Continuous Integration (CI), we need to work on and test features that may not be released yet, without long-lived branches. We will learn how to create tests for features that are in the hypothesis stage, and make them ready for release when it is time.

Expecting Chaos: Developer Testing for Failures Outside of Your Application

Isolated Integration Tests allow us to simulate expected challenges in the production environment, including network failures, authentication issues, etc. We will do exploratory testing to discover risky paths in our code, develop mitigations, and deploy the tests to our pipeline.

Automated Accessibility Testing

We will take a brief look at automated Accessibility testing of our Angular applications, and how to integration tests to check your applications meet accessibility requirements, including color contrast, and keyboard access.

Expected Outcome of this Training

At the conclusion of the Angular Developer Testing, developers will:

  • Understand and have the skills to implement Unit Tests and Isolated Integration Tests for Angular Applications
  • Have the knowledge to intelligently create a testing plan for Angular applications that ensures high code quality without "cementing" in bad design.
  • Know how to run automated tests locally and in a testing pipeline.
  • Have the skills to use feedback from automated tests to improve the design of their code.
  • Implement and use tools like feature toggles to successfully utilize continous integration.
  • Know how to design and write tests that simulate common "real world" problems Angular applications face in production.
  • Know how to do some automated testing for Accessibility requirements, and how to use those to kick off conversations about the role of accessibility in user interface with your team.