Book Image

Angular Test-Driven Development - Second Edition

By : Md. Ziaul Haq
Book Image

Angular Test-Driven Development - Second Edition

By: Md. Ziaul Haq

Overview of this book

<p>This is a complete guide that shows you testing techniques with Karma that will help you perform unit testing and end-to-end testing with Protractor. It will show you how to optimize your Angular development process using TDD techniques and ensure your final project is free of bugs. All examples in this book are based on Angular v2 and are compatible with Angular v4.</p> <p>We start by reviewing the TDD life cycle, TDD in the context of JavaScript, and various JavaScript test tools and frameworks. You will see how Karma and Protractor can make your life easier while running JavaScript unit tests. We will enable you to build a test suite for an Angular application and build a testable medium-to-large scale Angular application by handling REST API data.</p> <p>Building on the initial foundational aspects, we move on to testing for multiple classes, partial views, location references, CSS, and the HTML element. In addition, we will explore how to use a headless browser with Karma. We will also configure a Karma file to automate the testing and tackle elements of Angular (components, services, classes, and broadcasting) using TDD.</p> <p>Finally, you will find out how to pull data using an external API, set up and configure Protractor to use a standalone Selenium server, and set up Travis CI and Karma to test your application.</p>
Table of Contents (15 chapters)
Angular Test-Driven Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

About the Reviewers

Ramachandra Vellanki is a passionate programmer. He has 13 years of programming experience, has worked in different roles, and has experience in building and maintaining large-scale products/applications. He started his career with IBM iSeries and then worked on C++, MFC, .NET, and JavaScript. Currently, he is working on .NET and JavaScript technologies. He enjoys exploring and learning new technologies.

I would like to thank my parents (Saroja and Ramaiah), wife (Sirisha), and kids (Abhi and Ani) for their love, understanding and constant support. I also would like to thank all my friends and relatives for their continuous encouragement and support throughout my career and life.

Huseyin Babal is an enthusiast Full Stack software engineer and Google Developer Expert who mainly develops web applications using Java, Node.js, and PHP on the backend; Angular, React, and Twitter Bootstrap on the frontend; and Elasticsearch, MongoDB, and Apache Kafka for some research projects. He is the author of NodeJS in Action on Udemy, with over 1500 students. He is also interested in DevOps engineering and applies continuous delivery principles to his projects. He writes tutorials about full-stack development on Tuts+ and Java Code Geeks (https://www.javacodegeeks.com/) and shares his experiences in public conferences.

He lives in Istanbul with his wonderful wife and son. Apart from the computer world, he likes to spend time with his wife by walking at least an hour every day, visiting different places, watching cartoons, and going on summer holidays.