8 Getting started with Protractor
This chapter covers
- Understanding how Protractor works
- Writing your first Protractor test
- Interacting with elements
- Interacting with a list of elements
- Organizing tests with page objects
In the first part of the book, you saw how to create unit tests that verify your application’s features work as expected in isolation. Having a good suite of unit tests isn’t enough to make sure your application will do what it’s supposed to. Because unit tests validate the Contacts app in isolation, they can’t confirm that external services or dependencies work together with the application.
You could test both the workflow and external dependencies with a set of tests that interact with the Contacts app like a real-world user. You could manually test the application, but it’s better to have automated tests. Tests that interact with the application like a real-world user are end-to-end tests. These tests launch a browser, navigate to the Contacts app and interact with. This kind of test would be expensive to run, so instead of exhaustively testing every possible real-world user scenario, we’ll pick a set of tests that cover the most important scenarios.