Testing Angular Components

Angular is one of the most modern frameworks for frontend development. While unit testing in backend is nothing special these days and will be practiced in nearly every project. But it's very rare to test frontend components. Which tools/frameworks would you recommend for frontend testing?
1 answer

The standard way to test components is to use Karma and Jasmin. They are already preinstalled in every Angular project. You get them by the Angular CLI. Angular also provides a TestBed for testing components and services.

But there are also others frameworks you can use: If you want to write integration tests instead of frontend tests you should use e2e with Protractor. Another solution for integration tests would be Selenium, which is a standard way to test web applications.


Thank you, i also stumbled across the question what is the best way to test an angular frontend. For my purposes i went with Karma and Jasmine which worked fine.

Matthias Hofstätter - Mon, 12/14/2020 - 16:09 :::