Jasmine JavaScript Testing

0
(0)

Jasmine JavaScript Testing
 

  • Author:Paulo Ragonha
  • Length: 146 pages
  • Edition: 1
  • Publisher: Packt Publishing
  • Publication Date: 2013-08-26
  • ISBN-10: 178216720X
  • ISBN-13: 9781782167204
  • Sales Rank: #2607746 (See Top 100 Books)
  • Download:Register/Login to Download
  • Buy Print:Buy from amazon


    Book Description

    Leverage the power of unit testing to create bigger and better JavaScript applications

    Overview

    • Learn the power of test-driven development while creating a fully-featured web application
    • Understand the best practices for modularization and code organization while putting your application to scale
    • Leverage the power of frameworks such as BackboneJS and jQuery while maintaining the code quality
    • Automate everything from spec execution to build; leave repetition to the monkeys

    In Detail

    From a little renegade scripting language to the de facto standard platform of today, JavaScript has become a universal language available in the widest range of devices; it is truly the ‘write once, run everywhere’ language. However, as JavaScript applications become more complicated, testing and applying sustainable software engineering practices also become mandatory.

    Jasmine JavaScript Testing is a practical guide to a more sustainable JavaScript development process. You will learn by example how to drive the development of a web application using tests and best practices.

    This book is about becoming a better JavaScript developer. So, throughout the chapters, you will not only learn about writing tests, but also about the best practices for writing software in the JavaScript language. This book is about acknowledging JavaScript as a real platform for application development and leveraging all of its potential. You will also learn about tooling and automation and how to make your life easier and more productive.

    You will learn how to create a sustainable codebase with the help of Jasmine. We will take a look at integrated testing (with a backend NodeJS server) and how you can speed this process up by faking AJAX requests. As you progress through the book, you will learn about the challenges of testing an application built on top of a framework and how you can prevent your application from suffering from dependency management hell. Also, since your applications need to get into production, you will learn about optimizing the code to reduce the number of requests the browser needs to make while loading your application.

    With this book, you will learn everything you need to know to become a real professional in the ever-demanding JavaScript universe.

    What you will learn from this book

    • Drive your application development entirely by tests
    • Organize your application code in modules with RequireJS
    • Create a fully-tested jQuery plugin
    • Solve problems and learn best practices for asynchronous testing
    • Use Stubs and Spies to perform quick unit testing
    • Test-drive a BackboneJS application
    • Optimize your JavaScript code to production
    • Master the power of tooling and automation with GruntJS
    • Run your tests on the cloud with Travis-CI

    Approach

    The book uses a concise, to-the-point approach to help developers understand and use the power of Jasmine to create better and more maintainable codebases.

    Who this book is written for

    This book is a must-have guide for web developers who are new to the concept of unit testing. It’s assumed that you have a basic knowledge of JavaScript and HTML.

    Table of Contents

    Chapter 1: Getting Started with Jasmine
    Chapter 2: Your First Spec
    Chapter 3: Testing Frontend Code
    Chapter 4: Asynchronous Testing – AJAX
    Chapter 5: Jasmine Spies
    Chapter 6: Light Speed Unit Testing
    Chapter 7: Testing Backbone.js Applications
    Chapter 8: Build Automation
    Chapter 9: Conclusion

    中文:

    书名:Jasmine JavaScript Testing

    Leverage the power of unit testing to create bigger and better JavaScript applications

    Overview

    • 了解测试驱动开发的力量,同时创建功能齐全的Web应用程序
    • 了解模块化和代码组织的最佳实践,同时扩展您的应用程序
    • 利用BackboneJS和jQuery等框架的强大功能,同时保持代码质量
    • 自动化从规范执行到构建的所有事情;将重复留给猴子

    In Detail

    从一种不起眼的脚本语言到今天事实上的标准平台,JavaScript已经成为一种在最广泛的设备上可用的通用语言;它是真正的一次编写,到处运行的语言。然而,随着JavaScript应用程序变得越来越复杂,测试和应用可持续的软件工程实践也成为强制性的。

    Jasmine JavaScript测试是更可持续的JavaScript开发过程的实用指南。您将通过示例学习如何使用测试和最佳实践来推动Web应用程序的开发。

    这本书是关于成为一名更好的JavaScript开发人员的。因此,在整个章节中,您不仅将了解如何编写测试,还将了解使用JavaScript语言编写软件的最佳实践。这本书是关于承认JavaScript是一个真正的应用程序开发平台,并利用它的所有潜力。您还将学习工具和自动化,以及如何让您的生活更轻松、更高效。

    您将学习如何在Jasmine的帮助下创建可持续的代码库。我们将介绍集成测试(使用后端NodeJS服务器),以及如何通过伪造AJAX请求来加快此过程。随着本书的进展,您将了解到测试构建在框架之上的应用程序的挑战,以及如何防止您的应用程序遭受依赖管理地狱的折磨。此外,由于您的应用程序需要投入生产,因此您将了解如何优化代码以减少浏览器在加载应用程序时需要发出的请求数量。

    有了这本书,您将学习在要求越来越高的JavaScript世界中成为真正的专业人员所需了解的一切。

    你将从这本书中学到什么

    • 完全通过测试驱动您的应用程序开发
    • 使用RequireJS在模块中组织应用程序代码
    • 创建一个完全经过测试的jQuery插件
    • 解决问题并学习用于异步测试的最佳实践
    • Use Stubs and Spies to perform quick unit testing
    • 测试BackboneJS应用程序
    • Optimize your JavaScript code to production
    • 使用GruntJS掌握工具和自动化的力量
    • Run your tests on the cloud with Travis-CI

    Approach

    本书使用了一种简洁、切中要害的方法来帮助开发人员理解和使用Jasmine的力量来创建更好、更易维护的代码库。

    Who this book is written for

    对于刚接触单元测试概念的Web开发人员来说,这本书是一本必备指南。本文假定您已经具备了基本的JavaScript和HTML知识。

    Table of Contents

    第1章:茉莉入门
    Chapter 2: Your First Spec
    Chapter 3: Testing Frontend Code
    Chapter 4: Asynchronous Testing – AJAX
    Chapter 5: Jasmine Spies
    第6章:光速单元测试
    Chapter 7: Testing Backbone.js Applications
    Chapter 8: Build Automation
    Chapter 9: Conclusion

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

    点击星号评分!

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

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

  • 推荐阅读

    评论 抢沙发

    评论前必须登录!

     

    登录

    找回密码

    注册