Unit Testing Angular Web Applications
 

Consultingwerk Blog

Unit Testing Angular Web Applications

by Radu Nicoara | Dec 16, 2020

How many times have you feared deploying your work because even though you’ve tested, re-tested then finally re-re-tested, clicked all the buttons, navigated to every screen, you just couldn’t ever be one hundred percent sure that everything works in every case?

If you can relate to that feeling, I highly recommend checking out the recording of the presentation I held during the 2020 PUG Challenge virtual conference below. It goes into detail discussing the Angular basics and how they can be tested. Further, the session covers many useful concepts, such as spying on method calls, automating screenshots at precise moments in the test runner’s life cycle, running your tests in a headless browser so that they may be part of a CI pipeline and much more.

If Karma, Jasmine and Nightmare sound to you like random words extracted from a message found inside a fortune cookie, this session might be for you ;)

In it, I cover the following:

  • Angular basics
    • Components
    • Services
    • Pipes
    • Modules
  • The Karma Test Runner
  • The Jasmine Testing Framework
  • Nightmare headless browser
  • Spies
  • Fitting all of the above pieces together to produce useful unit tests for your applications, including automated screenshots!

 

About the author

Radu Nicoara

Radu has been using OpenEdge for about 5 years. He has several years of experience in Angular, NativeScript and node.js.

In his role as Developer with Consultingwerk, he developed the SmartComponent Library for Angular and NativeScript.

As Consultant he supports customers, offers consultation for web and mobile architecture and provides training and mentoring services.