AngularJS Test-driven Development Front Cover

AngularJS Test-driven Development

  • Length: 205 pages
  • Edition: 1
  • Publisher:
  • Publication Date: 2015-01-28
  • ISBN-10: 1784398837
  • ISBN-13: 9781784398835
  • Sales Rank: #2477848 (See Top 100 Books)
Description

Implement the best practices to improve your AngularJS applications using test-driven development

About This Book

  • Learn about TDD techniques, the TDD lifecycle, and its power through clear examples to enhance your Angular applications
  • Integrate AngularJS testing using Karma and Protractor to perform JavaScript unit tests
  • A practical guide filled with examples that focus on a wide range of testing techniques with AngularJS components

Who This Book Is For

This book is for developers who want to learn about AngularJS development by applying testing techniques. You are assumed to have a basic knowledge and understanding of HTML, JavaScript, and AngularJS.

In Detail

Starting with reviewing the test-driven development (TDD) life cycle, you will learn how Karma and Protractor make your life easier while running JavaScript unit tests. You will learn how Protractor is different from Selenium and how to test it entirely. This book is a walk-through to using TDD to build an AngularJS application containing a controller, model, and scope.

Building on the initial foundational aspects, you will expand to include testing for multiple controllers, partial views, location references, CSS, and the HTML element. In addition, you will explore using a headless browser with Karma. You will also configure Karma file watching to automate testing and tackle components of AngularJS (controller, service, model, and broadcasting) using TDD. At the end of this book, you will extend explore how to pull data using an external API, setting up and configuring Protractor to use a standalone Selenium server, and setting up Travis CI and Karma to test your application.

This book is a complete guide to testing techniques using Karma for unit testing and performing end-to-end testing with Protractor.

Table of Contents

Chapter 1. Introduction to Test-driven Development
Chapter 2. The Karma Way
Chapter 3. End-to-end Testing with Protractor
Chapter 4. The First Step
Chapter 5. Flip Flop
Chapter 6. Telling the World
Chapter 7. Give Me Some Data
Appendix A. Integrating Selenium Server with Protractor
Appendix B. Automating Karma Unit Testing on Commit
Appendix C. Answers

To access the link, solve the captcha.