part 2
End-to-end testing

Unit tests are great: they run quickly and let you exercise the functionality of your components. But at the end of the day, you still need to be sure that your entire application works as expected. In this part of the book, we cover writing tests that control a browser using Protractor, Angular’s end-to-end (E2E) testing framework. These tests can be hard to write and debug, but having a few E2E tests is a good way to catch issues that might not show up in unit tests.

Chapter 8 is an introduction to Protractor. It covers how Protractor works, writing a basic test, and making your tests easier to maintain with page objects.

Because Protractor tests can interact with your application only through a browser, these tests fail, usually with a timeout error, in which the test times out while waiting for some particular HTML to show up in the page. Chapter 9 explores in depth what these errors mean. In the process, it explains how Angular’s change-detection system works and how Protractor interacts with it.

Finally, chapter 10 is a grab bag of advanced Protractor testing techniques that can make your life easier. This includes customizing Protractor with plugins, different ways to debug failing tests, and writing tests that compare pages using screenshots.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.70.63