Course Code:
bsautjs
Duration:
14 hours
Prerequisites:
- A general understanding of unit testing
- Javascript programming experience
Overview:
In this instructor-led, live training, participants will learn about various JavaScript testing frameworks as they step through the creation of a unit test suite for a web application.
By the end of this training, participants will be able to:
- Write unit tests in JavaScript using unit test frameworks such as QUnit and Jasmine
- Use frameworks such as Mocha and Chai to implement TDD and BDD
Audience
- Test engineers
Format of the course
- Part lecture, part discussion, exercises and heavy hands-on practice
Course Outline:
- Learn about JavaScript unit testing tool: Jasmine
- Jasmine design guidelines and best practices
- Understand Jasmine's evolution & intended purpose
- Use Jasmine to create efficient, well-structured unit tests
- Learn how unit testing enables development time efficiencies
- Understand Jasmine expectation assertions work
- Learn to install and configure Jasmine for everyday use
- Discover how Jasmine tests are structured with JavaScript functions
- Use Jasmine to create comprehensive, configurable test suites
- Learn various Jasmine validation functions for testing any types of JavaScript functions
- Use an online IDE to manage a JavaScript project integrated with Jasmine testing.
- Special Methods - QUnits naming of functions
- Assert Statements
- Example mathTest.q file
- Running Tests
- From Command Line
- qStudio Support
- Advanced Tests
- Test Results
- Setup Mocha
- Understanding a TDD based basic mocha spec
- Understanding the actual code execution with mocha
- Brief discussion on Hooks
- Managing test suite in mocha
- Getting started with Chai
- Testing Promises with Chai
- Mocha Reporter