Learning AngularJS Testing

Excel at AngularJS testing skills and coding techniques to build potent, interactive applications
3.4 (7 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
127 students enrolled
$19
$75
75% off
Take This Course
  • Lectures 14
  • Length 1 hour
  • Skill Level Beginner Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 12/2015 English

Course Description

Finding the perfect balance between visual layout and coding has been a nightmare for developers, a problem which AngularJS deals with so well that in just a brief time since inception, it has become a favorite of developers all around the world. It has rightfully earned the tag of being a ‘Superheroic’ framework thanks to the diverse range of features it provides, and also as it helps the developers to build powerful applications without compromising on the visual aspects. Along with being a fully-featured package, it also presents an outstanding ability to be tested, which further helps to manage the applications and keeps them up and running!

Learning AngularJS Testing will help you to understand the different aspects involved in testing components, such as controllers and directives, with the help of a practical pizza ordering application right from the start, all the way to the end!

We’ll start by constructing a project structure of our app, before installing and initializing various helpful tools such as Karma, Jasmine, and Grunt. We will create controllers for ordering the pizza, reviewing the order and test them be it with or without any dependencies. Not only that, but we will also go through testing the navigation between two controllers with the help of End2End testing. After that, we will create accordion directives for our application, unit test them, and resolve the errors if these tests fail. Furthermore, we will modify our services to use the $resource module and help them interact with REST API web services, as well as unit test them with the help of mocks and spies. Finally, we will create and test directives and controllers which fetch information from the service and display it.

At the end of the course, you’ll be familiar with the various approaches involved in testing AngularJS code and will be able to implement them to develop bug-free and maintainable applications.

About The Author

Rudolf Olah is a fullstack web developer who runs the Learning AngularJS newsletter and currently works with Python/Django, and NodeJS and JavaScript. In the past he has written for Linuxcom and writes about open source on the SourceContribute blog. He is a professional member of the ACM (Association of Computing Machinery) and has used all sorts of programming languages from C/C++ to Java to Ruby to Lisp and Smalltalk.

What are the requirements?

  • Are you an experienced JavaScript developer whose work relies heavily on AngularJS? Want to begin test-driven development in AngularJS? Then this course is perfect for you!

What am I going to get from this course?

  • Setup your testing environment by installing and configuring various tools like Jasmine, Karma and Grunt
  • Unit test your controllers without dependencies and those with dependencies with the help of mocks and spies
  • Analyze the navigation between two different controllers with routes using End2End testing
  • Create and test accordion directives for DOM manipulations as well as perform End2End test on controllers which use them
  • Build and test a service which interacts with REST API

What is the target audience?

  • Learning AngularJS Testing will help you to learn various testing techniques as well as add unit tests and integration/end2end tests to your code.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Setting Up AngularJS for Unit Testing and End2End Testing
01:56

This video will offer the overview of the course.

05:22

We want to run and write unit tests to practice test-driven development. We will use a test framework and a test/task runner.

03:33

We have to set up project directories and other files. We will create the project structure.

04:42

We need to perform a unit test and an end2end test on the existing controller. We will configure the Karma test runner.

Section 2: Testing Controllers
05:28

A controller needs testing and is self-contained. We will write unit tests for this.

04:33

A controller relies on a service. We have to make sure that the integration works. We will write unit and integration tests for it.

03:59

We need multiple controllers in an app. We have to make sure that they work together and the UI works for the user.

Section 3: Testing Directives
03:46

We require a custom user interface component. So, we will create a directive.

05:11

We need to make sure that the UI works automatically. We will write a unit test for it.

02:12

The directive influences user navigation or the UI appearance. We will test it at the integration level.

Section 4: Testing $resource-based REST API Services
08:06

We want to interface with the REST API. We will use the $resource service that is included with AngularJS.

04:20

We require a fast way to test the REST API. We will create a server with fake data.

06:30

We need a useful directive. We will create a directive that is hooked up to a service.

03:53

We need a controller to communicate with the server. We will hook up a controller to the service.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Packt Publishing, Tech Knowledge in Motion

Over the past ten years Packt Publishing has developed an extensive catalogue of over 2000 books, e-books and video courses aimed at keeping IT professionals ahead of the technology curve. From new takes on established technologies through to the latest guides on emerging platforms, topics and trends – Packt's focus has always been on giving our customers the working knowledge they need to get the job done. Our Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.

Ready to start learning?
Take This Course