Sustainable end-to-end tests for Angular applications with Protractor and TypeScript

Protractor is the standard testing framework for writing end-to-end tests within your Angular application. In this workshop, we’ll test a real Angular application with a working API backend and we’ll cover most aspects of what it takes to write a robust suite of e2e tests that adhere to best programming practices and get to know some well-known patterns for making your tests as ergonomic as possible. We’ll also explore the TypeScript language (used for writing Angular code both unit and e2e tests) and have an overview of the technology behind the Protractor framework, exploring the building blocks used to create the tests.

After the workshop, you should have a very good understanding of how Protractor works and have good confidence in writing e2e tests for your own Angular project.

Workshop outline

  • Intro
  • Overview of Protractor framework
  • TypeScript crash-course
  • Project setup and configuration
  • E2e testing strategy and principles
  • Locators and actions
  • Control flow in tests (using promises and async/await)
  • Page objects and Domain objects
  • Commonly used patterns and best practices for writing tests
  • Debugging end-to-end
  • Preparing your e2e test suite for a CI/CD pipeline

 

Key Takeaways

  • Familiarize yourself with TypeScript
  • Discover the Protractor testing framework for writing e2e tests in Angular applications
  • Learn the basics of writing tests that verify flows and scenarios in your web application
  • Implement common patterns for writing effective tests suites
Automation Full Day Tutorial