Book Image

JavaScript at Scale

By : Adam Boduch
Book Image

JavaScript at Scale

By: Adam Boduch

Overview of this book

Table of Contents (17 chapters)
JavaScript at Scale
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

End-to-end tests and continuous integration


The final piece of the puzzle is putting together end-to-end tests for our feature, and hooking it into our continuous integration process. Unit tests are one thing, they leave us confident that our components are solid—when they pass. Users don't care about unit tests, end-to-end tests serve as a proxy for our users that interact with our UI. For instance, there's probably a set of use cases embedded within the requirements of any given feature we implement. The end-to-end tests should be designed around these.

Tools like Selenium make automating end-to-end tests possible. They record the test as a set of steps we perform as a user. Those same steps can then be repeated whenever we tell it to. For example, an end-to-end test might involve the creation, modification, and deletion of a resource. The tool knows what to look for in the UI as a success path. When this doesn't happen, we know the test has failed, and there's something we need to go fix...