Professional Angular Testing: Cypress Edition
Jest, Cypress and Storybook – The perfect combination for long-term quality
This workshop covers all aspects of testing in Angular. Learn the various techniques and when and how to apply them. The major ingredients are the hands-on exercises and discussions where we can talk about your individual challenges.
After this 3-day workshop, you will be able to
- understand and know when to apply Unit, Component and End-to-End Tests
- Write tests for code that heavily depends on asynchrony
- interact with the DOM rendered by one or multiple components
- significantly reduce your testing boilerplate by using modern tools
- Verify the layout of your components by using screenshot-matching
- know various ways to work with a Test Seeded database in E2E Tests
- prevent flaky E2E Tests
- build an architecture that is well-suited for tests
- and much more…
🔥 Bonus: Latest Angular features
- 🚥 Testing and Signals
- Testing and standalone components
- Testing and Standalone APIs
Video Intro by Workshop Author, Rainer Hahnekamp
✅ Completely online – no travel required!
✅ Interactive: Ask questions and participate in discussions
✅ Many exercises and live coding
✅ Case study serves as a blueprint for your own projects
✅ Pair programming with your trainer
Part 1: End-to-End Tests with Cypress
- The landscape of existing E2E Frameworks
- WebDriver vs. Chrome DevTools Protocol
- The cy Objekt
- Cypress and its “Actionability” Feature
- Queries, Actions, & Assertions
- Avoiding Flaky Tests
- Implicit and Explicit Assertions
- Queries with A11y Selectors (Testing Library)
- Page Object Models
- Extending the cy object
- Custom Queries
- Mock HTTP Requests
- Manipulate HTTP Requests
- API Tests
- Session Caching
- Switching between Origins with cy.origin
- Optimal Test Design
- Conditional Tests
- Test Coverage
Part 2: Unit Tests
Unit Tests for Angular
- Jasmine vs. Jest
- Setup of Jest
- fakeAsync vs waitForAsync
- Mocking: jest.fn, jest.mock, jest.spyOn
- Testing with inject()
- RxJS Marbles for pipe operators
- Testing NgRx
Part 3: Component & Integration Tests
- TestBed and Dependency Injection
- Differences Standalone and NgModule-based Tests
- Mocking Components/Pipes/Directives with ng-mocks
- Pro/Contra HttpTestingController
Cypress Component Testing Runner
- Mounting Components
- Setting @Input Properties
- Access to Angular’s DI
- Angular Harnesses
- Testing Library
Part 4: Test Strategies: How to Test?
- Two Schools of Thought: London & Detroit
- Test Strategies: When should I use what test type?
- TDD in Frontend?
- Testing Trophy vs. Testing Pyramid
- Testable Architecture
Special: Visual Regression with Storybook
- Screenshottests with Playwright
- Visual Regression & CI
FAQs on our workshops
How do your workshops and courses work?
Our seminars around Angular are a mixture of lecture, live coding and actual exercises. Together we implement what we have learned during the workshop directly on a example project. This mixture guarantees that the course never gets boring and “hands-on” is required instead of gray theory.
Who is the Angular hands-on training designed for?
Our Angular hands-on workshop is aimed at anyone who wants to develop applications with Angular in the future or is already doing so and now wants to better understand the background, context and building blocks of the framework.
For advanced Angular developers we offer advanced seminars and intensive trainings on specific use cases.
Where do the Angular workshops take place?
Our trainings take place as public workshops in seminar rooms at central hotels in Germany, Austria and Switzerland. In-House company workshops take place at your office or conference room.
All courses are also available as remote workshops, where we meet online in a virtual classroom and do the training via video calls, screen sharing and live coding.
Who are the trainers?
Our workshops are held by experienced trainers and software architects. In recent years, we have provided Angular training to well-known companies – including well-known banks, insurance companies, industrial groups. Trainers include well-known conference speakers, authors of books and professional articles, bloggers, Google Developer Experts and university lecturers.
At what times are the training sessions held?
Especially for dedicated company trainings, we are happy to accommodate you. Typical times are 9:00AM to 4:30PM / 5:00PM. Some of our English-language workshops are timed so that you can also attend at US friendly times.
Can we also book online training courses?
Absolutely. In fact, since the pandemic, this has been our main business model and we have had very good experience with it. We use a combination of screen sharing, interactive online whiteboards, and are happy to connect to your computer for support during the exercises if you wish. As with our on-site training, we use a combination of short presentations, discussions, live coding and hands-on labs.
Since there is no travel involved, you also save time and money. We can also respond more flexibly to your scheduling needs.
Can we adapt the training for our purposes?
Yes, very much so. In fact, that’s one of the benefits of dedicated corporate training. You are welcome to weight, shorten or add to our agenda proposals. As a rule, we also coordinate with your trainer about 2 weeks before the training. If you wish, we can also arrange it earlier.
Among other things, Angular’s wide distribution speaks for itself, but also the fact that Google, an Internet giant that also uses the framework very intensively, is behind it. Google alone has over 2600 solutions based on it. Due to the wide distribution, there is a large community and thus a lot of know-how on the market as well as (free and commercial) products that are adapted to Angular. In addition, Angular provides much of what you need for large applications out of the box: test automation, form management, routing, etc. In this respect, you get a stack whose components are coordinated and work together in the long term.
How do you compensate for different prior knowledge?
The good news up front is that participants with different levels of prior knowledge are the rule, not the exception, in adult education. That’s why you’ll find optional fade-in hints and bonus exercises on our exercise sheets, for those who are a little faster. Of course, we also provide personal support for the exercises.
How many participants are recommended?
If you book a company training with us, we leave this decision to you in principle. However, experience shows that there should not be more than 15 participants, especially since a seminar lives very much from questions, discussions and practical exercises.
What software do we need?
Please install the following software packages on your computer:
– NodeJS in current version (we test with current LTS version).
– Angular CLI (npm i -g @angular/cli)
– Visual Studio (free) or WebStorm/IntelliJ (commercial)