Angular 2 Test-driven Development, 2nd Edition

0
(0)

Angular 2 Test-driven Development, 2nd Edition
 

  • Author:Md. Ziaul Haq
  • Length: 252 pages
  • Edition: 2nd Revised edition
  • Publisher: Packt Publishing
  • Publication Date: 2017-02-08
  • ISBN-10: B01D1HI9D8
  • Sales Rank: #1152536 (See Top 100 Books)
  • Download:Register/Login to Download
  • Buy Print:Buy from amazon


    Book Description

    Key Features

    • Learn test-driven development (TDD) in JavaScript and see its power though clear examples
    • Enhance your understanding with details on Karma and Protractor, and set up an Angular2 test suit with them
    • A practical guide filled examples that focus on a wide range of testing techniques in a professional Angular2 application

    Book Description

    This is a complete guide that shows you testing techniques with Karma to perform unit testing and end-to-end testing with Protractor. It will show you how to optimize your Angular 2 development process using TDD techniques and ensure the final project is free of bugs.

    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 Angular2 application and build a testable Angular2 medium-to-large scale application by handling REST API data.

    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 Angular2 (components, services, classes, and broadcasting) using TDD.

    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.

    What you will learn

    • Get a clear overview of TDD in the context of JavaScript with a brief look at testing techniques, tools, and frameworks
    • Get an overview of Karma and Protractor and create test suites for an Angular2 application with them
    • Understand automated testing and implement headless automated tests with Karma
    • Implement the testing techniques with mocks, broadcast events, and asynchronous behavior
    • Integrate REST-based services and APIs into an application to extract data
    • Automate Karma unit tests with Travis CI

    About the Author

    Md. Ziaul Haq is a senior software engineer, full stack JavaScript developer, front-end architect, speaker, and certified scrum master who has worked in an upwork development team (remotely) as JavaScript Developer since 2011. He likes to play with new technologies, and is a passionate programmer loves to code daylong with JavaScript. Beside JavaScript, he has worked on LAMP technologies since an early stage in his career.

    Ziaul Haq started his career in 2005 as a software developer, and in his 10-year career journey, he has worked with various software development hubs and start-ups, including UNICEF in different countries as a web consultant. He just completed his MS in computer science from United International University.

    Ziaul Haq likes to watch soccer, and is a huge fan of Barca and Messi. He also likes to read blogs, moderate techi groups, and is very active in the local JavaScript community, where he is well known as jquerygeek.

    Table of Contents

    Chapter 1. Introduction to Test-Driven Development
    Chapter 2. Details of JavaScript Testing
    Chapter 3. The Karma Way
    Chapter 4. End-to-End Testing with Protractor
    Chapter 5. Protractor, a Step Ahead
    Chapter 6. The First Step
    Chapter 7. Flip Flop
    Chapter 8. Telling the World

    中文:

    书名:Angular 2 Test-driven Development, 2nd Edition

    Key Features

    • 学习测试驱动的开发(TDD),并通过清晰的示例了解它的威力
    • 通过Karma和量角器的细节加深您的理解,并与他们一起设置Angular2测试服
    • 该实用指南充满了专注于专业Angular2应用中的各种测试技术的示例

    Book Description

    这是一个完整的指南,向您展示了使用Karma执行单元测试和使用量角器进行端到端测试的测试技术。它将向您展示如何使用TDD技术优化您的角度2开发过程,并确保最终项目没有错误。

    我们首先回顾TDD生命周期、在JavaScript上下文中的TDD以及各种JavaScript测试工具和框架。您将看到Karma和Protractor如何在运行JavaScript单元测试时让您的工作变得更轻松。我们将使您能够为Angular2应用程序构建一个测试套件,并通过处理rest API数据构建一个可测试的Angular2中大型应用程序。

    在最初的基本方面的基础上,我们将继续测试多个类、部分视图、位置引用、CSS和HTML元素。此外,我们还将探索如何在Karma中使用无头浏览器。我们还将配置一个Karma文件,以使用TDD自动化测试和处理Angular2的元素(组件、服务、类和广播)。

    最后,您将了解如何使用外部API获取数据,如何设置和配置Protrator以使用独立的Selify服务器,以及如何设置Travis CI和Karma来测试应用程序。

    你将学到什么

    • 通过简要介绍测试技术、工具和框架,在Java环境中对TDD有一个清晰的概述
    • 了解Karma和量角器的概述,并使用它们为Angular2应用程序创建测试套件
    • 了解自动化测试并利用Karma实施无头自动化测试
    • 使用模拟、广播事件和异步行为实现测试技术
    • Integrate REST-based services and APIs into an application to extract data
    • 使用Travis CI自动执行Karma单元测试

    About the Author

    Md. Ziaul Haq 是一名高级软件工程师、全栈JavaScript开发人员、前端架构师、演讲者和经过认证的Scrum大师,自2011年以来一直在Upwork开发团队(远程)担任JavaScript开发人员。他喜欢尝试新技术,是一位热情的程序员,喜欢整天用Java编写代码。除了JavaScript,他从职业生涯的早期就开始研究LAMP技术。

    Ziaul Haq于2005年作为一名软件开发人员开始了他的职业生涯,在他长达10年的职业生涯中,他曾与各种软件开发中心和初创企业合作,包括作为网络顾问的联合国儿童基金会在不同国家。他刚刚从联合国际大学获得了计算机科学硕士学位。

    齐奥尔·哈克喜欢看足球比赛,他是巴萨和梅西的铁杆球迷。他还喜欢阅读博客,温和的技术小组,并在当地的JavaScript社区非常活跃,在那里他被称为jquerygeek。

    目录表

    第1章:测试驱动开发简介
    第2章.JavaScript测试的细节
    第三章因果报应之道
    第4章.使用量角器进行端到端测试
    第五章量角器,领先一步
    第六章.第一步
    第七章触发器
    Chapter 8. Telling the World

  • 下载电子版:下载地址
  • 购买纸质版:亚马逊商城

    点击星号评分!

    平均分 0 / 5. 投票数: 0

    还没有投票!请为他投一票。

  • 评论 抢沙发

    评论前必须登录!

     

    登录

    找回密码

    注册