Angular Unit Testing with Jasmine


Course Number: ANG-184
Duration: 2 days (13 hours)
Format: Live, hands-on

Angular Unit Testing Training Overview

Accelebrate's live online or onsite Angular Unit Testing with Jasmine training course teaches attendees how to master the behavior-driven Jasmine test framework.

Location and Pricing

Accelebrate offers instructor-led enterprise training for groups of 3 or more online or at your site. Most Accelebrate classes can be flexibly scheduled for your group, including delivery in half-day segments across a week or set of weeks. To receive a customized proposal and price quote for private corporate training on-site or online, please contact us.

In addition, some courses are available as live, instructor-led training from one of our partners.

Objectives

  • Learn synchronous and asynchronous testing with Angular components, pipes, and services
  • Write component and DOM tests
  • Configure Jasmine to behave the way you want
  • Perform integration testing, including use of spies and mocks

Prerequisites

Attendees should have prior familiarity with JavaScript, TypeScript, and modern Angular.

Outline

Expand All | Collapse All

Unit testing in Jasmine
  • Software Testing
  • Types of tests
  • Test Pyramid
  • Unit Tests
  • Jasmine, Karma and Angular
  • Jasmine
  • Karma
  • Basic Terminology
  • Test Suite
  • Spec
  • Assertion
  • Matchers
  • Setup and Teardown
  • A Test Suite
  • Auto-Generated Angular Test Suites
  • Run a Test
Jasmine Configuration
  • Setup and Teardown
  • Setup/Teardown Example
  • Order of Execution
  • Nested Test Suites
  • Nested Test Suites Order of Execution
  • Nested Setup/Teardown Order of Execution
  • Custom Matchers
  • Interface
  • Matcher Factory
  • Use the Matcher
  • Run the Tests
  • Disabling Suites and Specs
  • The this Keyword
Testing - Components, Pipes and Services
  • Testing Components
  • Testing the Class Only
  • Example Component
  • Test Component Class
  • Test Component Class Example
  • Test Component
  • Test Component Example
  • TypeScript async/await
  • Change Detection
  • DOM Element(s)
  • Testing Pipes
  • Pipe Class Example
  • Pipe Spec Example
  • Testing Services
  • Service Class Example
  • Service Spec Example
  • Expecting an Error
DOM, Routing and Code Coverage
  • Testing in Angular
  • Components
  • Testing the DOM
  • DOM Testing vs End-to-End Testing
  • TestBed
  • TestBed Use Cases
  • Using TestBed
  • ComponentFixture
  • Get the Component and DOM Element
  • Selecting DOM Elements with NativeElement
  • Selecting DOM Elements with DebugElement
  • Selection Examples
  • Accessing Text
  • Button Clicks
  • Routing
  • Routing Test Setup
  • Routing Spec
  • Code Coverage
  • Detailed Coverage Summary
  • Details
Integration Testing
  • Integration Testing
  • Spies
  • Service Class Example
  • Spec
  • Using a Spy to Return a Fixed Value
  • Using a Spy to Return a Dynamic Value
  • Injection
  • Injection Example
  • Injection in a Test Suite
  • Mocks

Training Materials

All attendees receive comprehensive courseware covering the topics in the class.

Software Requirements

  • Google Chrome
  • Other modern browsers as desired
  • IDE/development environment of your choice
  • Other free software (such as Node) and lab files that Accelebrate would specify


Learn faster

Our live, instructor-led lectures are far more effective than pre-recorded classes

Satisfaction guarantee

If your team is not 100% satisfied with your training, we do what's necessary to make it right

Learn online from anywhere

Whether you are at home or in the office, we make learning interactive and engaging

Multiple Payment Options

We accept check, ACH/EFT, major credit cards, and most purchase orders



Recent Training Locations

Alabama

Birmingham

Huntsville

Montgomery

Alaska

Anchorage

Arizona

Phoenix

Tucson

Arkansas

Fayetteville

Little Rock

California

Los Angeles

Oakland

Orange County

Sacramento

San Diego

San Francisco

San Jose

Colorado

Boulder

Colorado Springs

Denver

Connecticut

Hartford

DC

Washington

Florida

Fort Lauderdale

Jacksonville

Miami

Orlando

Tampa

Georgia

Atlanta

Augusta

Savannah

Hawaii

Honolulu

Idaho

Boise

Illinois

Chicago

Indiana

Indianapolis

Iowa

Cedar Rapids

Des Moines

Kansas

Wichita

Kentucky

Lexington

Louisville

Louisiana

New Orleans

Maine

Portland

Maryland

Annapolis

Baltimore

Frederick

Hagerstown

Massachusetts

Boston

Cambridge

Springfield

Michigan

Ann Arbor

Detroit

Grand Rapids

Minnesota

Minneapolis

Saint Paul

Mississippi

Jackson

Missouri

Kansas City

St. Louis

Nebraska

Lincoln

Omaha

Nevada

Las Vegas

Reno

New Jersey

Princeton

New Mexico

Albuquerque

New York

Albany

Buffalo

New York City

White Plains

North Carolina

Charlotte

Durham

Raleigh

Ohio

Akron

Canton

Cincinnati

Cleveland

Columbus

Dayton

Oklahoma

Oklahoma City

Tulsa

Oregon

Portland

Pennsylvania

Philadelphia

Pittsburgh

Rhode Island

Providence

South Carolina

Charleston

Columbia

Greenville

Tennessee

Knoxville

Memphis

Nashville

Texas

Austin

Dallas

El Paso

Houston

San Antonio

Utah

Salt Lake City

Virginia

Alexandria

Arlington

Norfolk

Richmond

Washington

Seattle

Tacoma

West Virginia

Charleston

Wisconsin

Madison

Milwaukee

Alberta

Calgary

Edmonton

British Columbia

Vancouver

Manitoba

Winnipeg

Nova Scotia

Halifax

Ontario

Ottawa

Toronto

Quebec

Montreal

Puerto Rico

San Juan