Lesson 10

Setting up Cypress & Jest in an Ionic/Angular Project

Getting our application ready

PRO

Lesson Outline

Getting Ready

We have discussed quite a few testing concepts already, and we have covered some of the basics. But, there's only so much we can cover without actually doing it for ourselves (otherwise this knowledge will probably just drop straight back out of your head).

We are going to start walking through a practical example of using Test Driven Development to build out a real-world application. There are still a few concepts that we haven't covered yet that we will need to learn, but we will cover those as they become relevant in the tests we are building. Having the appropriate context for the situations you will need to use these concepts in will do a great deal to help with learning.

We will be using Test Driven Development to build a simplified version of the application used to power the original version of the Elite Ionic course (when Elite Ionic was just a course and not an entire website). The entire application is far too broad in scope to fit into this module, but we will be focusing on the interesting bits and keeping it realistic (I don't want this to be a "how to test a simple todo app" type of situation, because there are important testing scenarios that you just won't hit with that type of application).

We will use the test development cycle we discussed in the last lesson to build out the entire application, which means we will:

  1. Write an End-to-End test to describe the behaviour we want to implement
  2. Write unit tests that would satisfy the requirements of the E2E test
  3. Write code to satisfy the unit tests
  4. Repeat

For the rest of this module, we will spend each lesson going through the process above - starting with an E2E test, implementing unit tests, and satisfying those tests with our applications code. When we run into a situation where we need to understand a new concept to implement a test, we will spend some time talking through that.

Create a New Project with Tests

We are just going to create a fresh new Ionic project, which will have tests set up by default.

PRO

Thanks for checking out the preview of this lesson!

You do not have the appropriate membership to view the full lesson. If you would like full access to this module you can view membership options (or log in if you are already have an appropriate membership).