Chapter 11. Testing the User Interface

In Chapter 10, Adding Real-time Chat, we extended our social network by adding a real-time chat function. We used WebSockets and Socket.IO in particular to implement the communication between the users in our system. The last chapter of this book is dedicated to user interface testing. We will explore two popular tools to run headless browser testing. This chapter covers the following topics:

  • Introducing the basic testing toolset
  • Preparing our project to run tests
  • Running our tests with PhantomJS
  • Testing the user's registration
  • Testing with DalekJS

Introducing the basic testing toolset

Before writing the tests, we will spend some time talking about the testing toolset. We need some instruments to define and run ...

Get Node.js By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.