Angular Testing Masterclass (Angular 19)
A complete guide to Angular 19 Unit Testing and End to End (E2E) Testing, including Testing best practices and CI

What you will learn
Code in Github repository with downloadable ZIP files per section
Testing Fundamentals
Angular Unit Testing Best Practices
Angular E2E Testing with Cypress
Angular Component and Service Testing
Asynchronous Angular Testing with fakeAsync and Async
Continuous Integration with Travis CI
Why take this course?
🎓 Angular Testing Masterclass (Angular 17)
This Course in a Nutshell 🎯
- A step-by-step guide to Angular Testing for Angular 17.
- We'll take an existing application with no tests and guide you through the process of testing each component using a running Github repository.
- Learn how to write Unit Tests for different parts of your application, understanding every decision along the way.
- Progress to performing End to End (E2E) Tests later in the course.
- Understand the whys and whens of testing, not just the how.
- Follow best practices for testing in Angular, ensuring you write tests that are both effective and efficient.
Course Overview 📚
- Introduction to behavior-driven testing concepts using Jasmine.
- Explore testing utilities such as the Angular TestBed to test Angular services.
- Dive into mocking with mocks and Jasmine spies.
- Unit test simple and complex Angular services, including mocking HTTP requests.
- Comprehensively test Angular components, both with and without the DOM.
- Master asynchronous tests using
fakeAsync
andasync
. - Mock Observable-based services for comprehensive testing strategies.
- Implement End to End tests using Cypress.
- Integrate your tests with Travis CI for continuous integration, ensuring tests run with every commit.
- Generate and understand Angular CLI Test Coverage Reports to gauge the effectiveness of your tests.
Table of Contents 📑
- Introduction to the Jasmine testing framework
- Introduction to Jasmine spies
- Unit Testing of simple Angular Services
- Jasmine testing best practices
- Introduction to Angular testing utilities
- Testing of complex Angular services
- Mocking of Angular HTTP requests
- Unit Testing of Angular Components
- Asynchronous Angular Testing with
fakeAsync
andasync
- Mocking of Observable-based Services
- Unit Testing of Presentational Components
- Unit Testing of Smart or Container Components
- Simulation of user interaction in unit tests
- End to End Angular Testing with Cypress
- Continuous Integration with Travis CI
- Angular CLI Test Coverage Reports
What Will You Learn In this Course? 🚀
- Write comprehensive Angular tests for services and components.
- Gain a deep understanding of the Jasmine and Angular testing ecosystem, including when and why to use certain tools or utilities.
- Master the Angular testing best practices to write tests that are both meaningful and manageable.
- Feel confident in your ability to create tests that contribute significantly to the long-term health of your project.
🔍 Explore the Course Free Lessons 🌟 Dive into the course content and get a taste of what you'll learn. Enjoy the learning journey with Angular University, and elevate your testing skills to new heights! 🚀
Screenshots




Our review
👁 Global Overview:
The Global course rating stands at 4.58, with recent reviews indicating that while the course covers the basics well and is great for beginners, it requires significant updates to be considered a "Masterclass" for more advanced testing scenarios in Angular. Some of the key issues mentioned include outdated code examples, deprecated functions, and a lack of coverage of more complex concepts and new features introduced in recent Angular versions, particularly Angular 17.
Pros:
- The course content is understandable and well explained, with some users highlighting the clear explanation of asynchronous testing concepts.
- It's a good starting point for beginners looking to learn Angular Unit testing and Cypress End-to-End testing.
- The course provides a solid foundation in testing Angular applications, including how to set up continuous integration servers.
- Some users found the course very detailed, especially in testing asynchronous activities and understanding micro tasks and tasks.
- It is a valuable resource for those who want to understand the basics of Jasmine testing and apply these concepts in real-world scenarios.
Cons:
- The course content is outdated in places, with some commands and practices already deprecated or replaced, such as
ng build --prod
being replaced byng build --configuration production
. - Advanced concepts like marble testing are omitted, which could be beneficial for more experienced users.
- The Cypress section is covered relatively quickly, and some users encountered issues with the Cypress setup on their PCs.
- Some users lost time correcting issues that were not explicitly highlighted as outdated in the course material.
- The course lacks coverage of testing more complex scenarios such as directives and pipes, which are common components in Angular applications.
- Users reported a need for step-by-step instructions at the beginning of the course to guide beginners better.
User Experience:
- Many users found the example code provided in the course to be functional and valuable for gaining knowledge about Angular testing.
- The Q&A section was often utilized by users to find workarounds and solutions when encountering outdated content or issues with the code examples.
- Some users expressed that they had to do additional research to keep up with the evolving Angular ecosystem while following the course.
Recommendations:
- The course is recommended for beginners and those looking to refresh their knowledge of Angular testing.
- Users who are working with the latest versions of Angular should be prepared to encounter deprecated content and may need to supplement the course material with updates from the Angular documentation or community resources.
- For advanced users, it's suggested to look for more up-to-date resources or consider this course as a starting point before delving into more complex testing scenarios.
Conclusion: Overall, the course is beneficial for understanding the basics of Angular Unit and End-to-End testing but requires updates to cover recent advancements and provide guidance on advanced testing techniques. It's a solid educational resource with room for improvement in terms of content currency and coverage of complex scenarios.