Testing AngularJS Applications
This article is the second in a series about learning AngularJS. It describes how to test a simple AngularJS application. In a previous article, Getting Started with AngularJS, I showed how to develop a simple search and edit feature.
What you'll learn
You'll learn to use Jasmine for unit testing controllers and Protractor for integration testing. Angular's documentation has a good developer's guide to unit testing if you'd like more information on testing and why it's important.
The best reason for writing tests is to automate your testing. Without tests, you'll likely be testing manually. This manual testing will take longer and longer as your codebase grows.
What you'll need
- About 15-30 minutes
- A favorite text editor or IDE. We recommend IntelliJ IDEA.
- Git installed.
- Node.js and NPM installed.