Javascript Unit Testing

Video description

In this JavaScript Unit Testing training course, expert author Mark Ethan Trostler will teach you the theory and practice of JavaScript unit testing. This course is designed for users that already have a basic understanding of JavaScript.

You will start by learning the basics of unit testing, then jump into learning how to code for testability. From there, Mark will teach you about Jasmine, including how to run and select tests, write a custom matcher, and how to extend Jasmine. This video tutorial also covers other JavaScript testing frameworks, such as QUnit and Mocha. Finally, you will learn about automation and continuous integration.

Once you have completed this computer based training course, you will have learned everything you need to know about JavaScript unit testing and automation. Working files are included, allowing you to follow along with the author throughout the lessons.

Publisher resources

Download Example Code

Table of contents

  1. Introduction
    1. Types Of Software Testing
    2. The Testing Pyramid
    3. What You Will Learn In This Course
    4. About The Author
  2. Unit Testing Basics
    1. Unit Testing Terminology
    2. What A JavaScript Unit Test Looks Like
    3. Writing Your Own Javscript Unit Test
    4. Assertions
    5. The Role Of Code Coverage
    6. How JavaScript Unit Test Is Different
    7. JavaScript Unit Test Flow
    8. Manual Unit Testing
    9. JavaScript Unit Test Frameworks
    10. Running Unit Tests
    11. JavaScript Unit Test Environments
    12. Synchronous And Asynchronous Unit Tests
    13. Introduction Test Driven Development
    14. Test Driven Development In Practice
  3. Coding For Testability
    1. What Is Testable Code?
    2. Cyclomatic Complexity
    3. Fan-In And Fan-Out
    4. Coupling
    5. Inheritance Or Composition?
    6. Code Injection
    7. Using Decorators
    8. Leveraging Abstract Factories
    9. Measuring Complexity
    10. Getting To Testability
  4. Jasmine
    1. Introduction To Jasmine
    2. Jasmine On The Client
    3. Jasmine On The Server
    4. Starting Your First Test
    5. Writing Your First Test
    6. Selecting Tests
    7. Running Tests
    8. Introduction To Basic Matchers
    9. More Basic Matchers
    10. Asymmetric Matchers
    11. Introduction To Custom Matchers
    12. Custom Matcher Error Messages
    13. Custom Matcher Example - toBeVisible
    14. Basic Spying
    15. More Spying
    16. Advanced Spying
    17. Setup And Teardown - Nesting
    18. Setup And Teardown - Variables
    19. Asynchronous Tests
  5. Extending Jasmine
    1. Introduction To is.js
    2. Integration is.js With Jasmine
    3. Jasmine - Matchers And Promises
    4. Introduction To saywhen
    5. saywhen And Captors
    6. Mocking Time
    7. Introduction To Mocking Ajax
    8. Mocking Ajax Responses
    9. Encapsulation Mocked Ajax
    10. Introduction To Jasmine-jQuery Matchers
    11. Introduction To Jasmine-jQuery Fixtures
    12. Using Jasmine-jQuery Fixtures
    13. Jasmine-jQuery Fixtures And The Dom
    14. Testing With Jasmine-jQuery Fixtures
    15. Other Fixture Operations
    16. Event Spies
    17. Introduction To Code Coverage With Istanbul
    18. Manual Code Coverage Generation
  6. Other JavaScript Testing Frameworks
    1. Introduction To QUnit
    2. Using Qunit
    3. More QUnit
    4. Introduction To Mocha
    5. More Mocha
    6. Even More Mocha
    7. Introduction To Tape
    8. Using Tape
    9. ESLint
    10. Sinon.JS And Spies
    11. Sinon.JS Stubs
    12. Sinon.JS Mocks
    13. Sinon.JS Mocking Ajax
    14. Introduction To Istanbul
    15. Using Istanbul
    16. Introduction To Selenium WebDriver
    17. Using WebDriver
    18. WebDriver And GhostDriver And PhantomJS
  7. Headless And Scriptable Browsers
    1. Introduction To PhantomJS
    2. Using PhantomJS With Jasmine
    3. Scripting PhantomJS And Waits
    4. Introduction To SlimerJS
    5. Using SlimerJS
    6. Introduction To CasperJS
    7. CasperJS Test API
    8. Introduction To Xvfb
    9. Using Xvfb
  8. Automation
    1. The Role Of Automation
    2. How To Automate
    3. Introduction To Karma
    4. Using Karma
    5. Karma In The Real World - Part 1
    6. Karma In The Real World - Part 2
    7. Karma In The Real World - Part 3
    8. Karma And Code Coverage
    9. Grunt
    10. Gulp
    11. Bower
    12. Yeoman
    13. Introduction To npm - package.json And semver
    14. npm Dependencies And Scripts
    15. npm Configuration Variables
    16. npm And Versions And Shrinkwrap
  9. Continuous Integration
    1. What Is Continuous Integration?
    2. Getting Started With Jenkins
    3. Jenkins Project Setup
    4. Jenkins Capturing Test Output
    5. Jenkins And Checkstyle
    6. Jenkins And Code Coverage
    7. Jenkins And Gulp
    8. Using GitHub
    9. Introduction To Travis CI
    10. Preparing Your GitHub Repo For Travis CI Integration
    11. Travis CI And Headless Testing With Firefox And Xvfb
    12. Travis CI Wrap-Up
  10. Wrap-Up
    1. What We Have Learned

Product information

  • Title: Javascript Unit Testing
  • Author(s):
  • Release date: October 2015
  • Publisher(s): Infinite Skills
  • ISBN: 9781771374569