PacktLib: Using Node.js for UI Testing

Using Node.js for UI Testing

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Getting Started with Zombie.js

A brief history of software and user interface testing

Understanding the server-side DOM

Summary

Creating a Simple Web App

Defining the requirements of our web app

Setting up Node.js and Flatiron

Creating your to-do app

File summary

Summary

Installing Zombie.js and Mocha

Changing the application manifest

Setting up a test environment

Summary

Understanding Mocha

Organizing your tests

Using before and after hooks

Using asynchronous hooks

Using assertions

Performing asynchronous tests

Summary

Manipulating the Zombie Browser

When is the browser ready?

Checking the existence of elements

Filling a form

Testing the login form

Testing the to-do list

Putting it all together

Summary

Testing Interactions

Acting on radio buttons

Testing the user interaction

Selecting values

Summary

Debugging

Running a specific test

Using the browser JavaScript console

Dumping the browser state

Dumping the whole document

Summary

Testing AJAX

Implementing drag-and-drop

Summary

Index