Test Driven Development with Protractor/Jasmine (Legacy)
This module is deprecated and no longer receives updates. Protractor is likely being removed as the default from Angular applications and Protractor itself will likely stop receiving updates and development in the future. I would recommend checking out the Test Driven Development with Cypress/Jest as a replacement.
Getting Ready
WARNING: This module is deprecated and no longer receives updates. Protractor is likely being removed as the default from Angular applications and Protractor itself will likely stop receiving updates and development in the future. I would recommend checking out the Test Driven Development with Cypress/Jest as a replacement.
Getting our application ready
DEPRECATEDModule Outline
- Resources PRO
- Lesson 1: Introduction PRO
- Lesson 2: Introduction to Test Driven Development PRO
- Lesson 3: Testing Concepts PRO
- Lesson 4: Jasmine, Karma, and Protractor PRO
- Lesson 5: A Simple Unit Test PRO
- Lesson 6: A Simple E2E Test PRO
- Lesson 7: Introduction to Angular's TestBed PRO
- Lesson 8: Setting up Tests PRO
- Lesson 9: Test Development Cycle PRO
- Lesson 10: Getting Ready PRO
- Lesson 11: The First Tests PRO
- Lesson 12: Injected Dependencies & Spying on Function Calls PRO
- Lesson 13: Building out Core Functionality PRO
- Lesson 14: Testing Asynchronous Code PRO
- Lesson 15: Creating a Mock Backend PRO
- Lesson 16: Setting up the Server PRO
- Lesson 17: Testing Integration with a Server PRO
- Lesson 18: Testing Storage and Reauthentication PRO
- Lesson 19: Refactoring with Confidence PRO
- Lesson 20: Conclusion 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:
- Write an End-to-End test to describe the behaviour we want to implement
- Write unit tests that would satisfy the requirements of the E2E test
- Write code to satisfy the unit tests
- Repeat
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).