SlideShare a Scribd company logo
Testing 2 Applications
Photos by McGinity Photo

Matt Raible • @mraible
Blogger on raibledesigns.com
UI Architect and Java Champion
Father, Skier, Mountain
Biker, Whitewater Rafter
Web Framework Connoisseur
Who is Matt Raible?
Bus Lover
What about YOU?
How long have you been doing web development?

Do you like JavaScript?

What’s your favorite JavaScript framework?

Why are you here?
Quality
“A person who knows how to fix motorcycles—with Quality—is less
likely to run short of friends than one who doesn't. And they aren't
going to see him as some kind of object either. Quality destroys
objectivity every time.”

— Zen and the Art of Motorcycle Maintenance
Software Testing
With motorcycles, you drive to test them.

With software, you can test it without driving it.

Or rather, you can automate the driving.

If you don’t automate tests, you’re still testing!
Hello World with AngularJS
<!doctype	html>	
<html	ng-app>	
<head>	
				<title>Hello	World</title>	
</head>	
<body>	
<div>	
				<label>Name:</label>	
				<input	type="text"	ng-model="name"	placeholder="Enter	a	name	here">	
				<hr>	
				<h1>Hello	{{name}}!</h1>	
</div>	
<script	src="http://code.angularjs.org/1.5.8/angular.min.js"></script>	
</body>	
</html>
Testing Angular 2 Applications - HTML5 Denver 2016
Hello World with Angular 2
<html>	
		<head>	
				<title>Angular	2	QuickStart</title>	
				<meta	name="viewport"	content="width=device-width,	initial-scale=1">					
				<link	rel="stylesheet"	href="styles.css">	
				<!--	1.	Load	libraries	-->	
				<!--	Polyfills,	for	older	browsers	-->	
				<script	src="node_modules/core-js/client/shim.min.js"></script>	
				<script	src="node_modules/zone.js/dist/zone.js"></script>	
				<script	src="node_modules/reflect-metadata/Reflect.js"></script>	
				<script	src="node_modules/systemjs/dist/system.src.js"></script>	
		</head>	
</html>
Hello World with Angular 2
				<!--	2.	Configure	SystemJS	-->	
				<script>	
						System.config({	
								packages:	{									
										app:	{	
												format:	'register',	
												defaultExtension:	'js'	
										}	
								}	
						});	
						System.import('app/main')	
												.then(null,	console.error.bind(console));	
				</script>	
		</head>	
		<!--	3.	Display	the	application	-->	
		<body>	
				<my-app>Loading...</my-app>	
		</body>	
</html>
app/main.ts
import	{	platformBrowserDynamic	}	from	'@angular/platform-browser-dynamic';	
import	{	AppComponent	}	from	'./app.component';	
platformBrowserDynamic().bootstrapModule(AppComponent);
app/app.component.ts
import	{	Component	}	from	'@angular/core';	
@Component({	
				selector:	'my-app',	
				template:	'<h1>My	First	Angular	2	App</h1>'	
})	
export	class	AppComponent	{	}
Angular 2 QuickStart
Easiest ways to get started
Angular 2 QuickStart

https://github.com/angular/quickstart 

Angular 2 Seed

https://github.com/mgechev/angular2-seed 

Angular CLI

https://github.com/angular/angular-cli
Testing Angular 2 Applications - HTML5 Denver 2016
Testing Angular 2 Applications - HTML5 Denver 2016
Testing Angular 2 Applications - HTML5 Denver 2016
Let’s take a look at a few things…
Angular CLI

TypeScript

Components and Services

IntelliJ IDEA

Unit Tests

Protractor Tests

Continuous Integration
Testing Angular 2 Applications - HTML5 Denver 2016
Angular CLI
npm install -g angular-cli
ng new ng2-demo
cd ng2-demo
ng serve
ng test
ng e2e
ng g component
ng g service
ng build
ng --help
TypeScript
npm install -g typescript

function greeter(person: string) {

return "Hello, " + person;

}



var user = "Jane User";



document.body.innerHTML = greeter(user);
tsc greeter.ts

https://www.typescriptlang.org/docs/tutorial.html
Demo Time!
Learn more about Angular CLI
https://www.youtube.com/watch?v=obbdFFbjLIU
Style Guides
Angular 2 Official Style Guide

https://angular.io/styleguide 

John Papa’s AngularJS Style Guide

https://github.com/johnpapa/angular-styleguide
ng-book 2
A comprehensive guide to developing with
Angular 2

Sample apps: Reddit clone, Chat with RxJS
Observables, YouTube search-as-you-type,
Spotify Search

How to write components, use forms and APIs

Over 5,500+ lines of code!
When will Angular 2 be released?
Resources
Demo Code

https://github.com/mraible/ng2-demo 

Step-by-step Tutorial

http://gist.asciidoctor.org/?github-mraible%2Fng2-demo%2F
%2FREADME.adoc
Contact Me!

raibledesigns.com

@mraible

linkedin.com/in/mraible

Presentations

slideshare.net/mraible

Code

github.com/mraible
Questions?

More Related Content

PDF
The Art of Angular in 2016 - Devoxx UK 2016
PDF
The Art of Angular in 2016 - Devoxx France 2016
PDF
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...
PDF
Get Hip with JHipster - Denver JUG 2015
PDF
The Art of Angular in 2016 - vJUG24
PDF
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx 2015
PDF
Getting Started with Angular - Stormpath Webinar, January 2017
PDF
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
The Art of Angular in 2016 - Devoxx UK 2016
The Art of Angular in 2016 - Devoxx France 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Rich Web Experie...
Get Hip with JHipster - Denver JUG 2015
The Art of Angular in 2016 - vJUG24
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx 2015
Getting Started with Angular - Stormpath Webinar, January 2017
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016

What's hot (20)

PDF
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
PDF
Get Hip with JHipster - Colorado Springs OSS Meetup April 2016
PDF
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
PDF
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Angular Summit 2015
PDF
Testing Angular 2 Applications - Rich Web 2016
PDF
Testing Angular Applications - Jfokus 2017
PDF
Cloud Native Progressive Web Applications - Denver JUG 2016
PDF
Web Frameworks of the Future: Flex, GWT, Grails and Rails
PDF
On Selecting JavaScript Frameworks (Women Who Code 10/15)
PDF
Testing Mobile JavaScript
PDF
Play Framework vs Grails Smackdown - JavaOne 2013
PDF
The Modern Java Web Developer Bootcamp - Devoxx 2013
PDF
What's New in JHipsterLand - DevNexus 2017
PDF
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
PDF
Choosing the best JavaScript framework/library/toolkit
PDF
Microservices for the Masses with Spring Boot, JHipster, and JWT - Rich Web 2016
PDF
Building a PWA with Ionic, Angular and Spring Boot - Jfokus 2017
PDF
The Art of AngularJS in 2015 - Angular Summit 2015
PDF
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
PDF
The Art of AngularJS in 2015
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Get Hip with JHipster - Colorado Springs OSS Meetup April 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Angular Summit 2015
Testing Angular 2 Applications - Rich Web 2016
Testing Angular Applications - Jfokus 2017
Cloud Native Progressive Web Applications - Denver JUG 2016
Web Frameworks of the Future: Flex, GWT, Grails and Rails
On Selecting JavaScript Frameworks (Women Who Code 10/15)
Testing Mobile JavaScript
Play Framework vs Grails Smackdown - JavaOne 2013
The Modern Java Web Developer Bootcamp - Devoxx 2013
What's New in JHipsterLand - DevNexus 2017
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Choosing the best JavaScript framework/library/toolkit
Microservices for the Masses with Spring Boot, JHipster, and JWT - Rich Web 2016
Building a PWA with Ionic, Angular and Spring Boot - Jfokus 2017
The Art of AngularJS in 2015 - Angular Summit 2015
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
The Art of AngularJS in 2015
Ad

Viewers also liked (17)

PDF
20150128 angular js_headless_testing
DOCX
Protractor end-to-end testing framework for angular js
PDF
Testing Backbone applications with Jasmine
PPTX
The sweet smell of jasmine for testing JavaScript
PPTX
Automated Acceptance Testing Example
PPTX
Jasmine framework
PPTX
интернет в социологии важнейшие информационные сайты дадададад)))
PDF
Advanced Jasmine
PDF
Thinking outside the box (SOX)
PDF
Angular Testing
PDF
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
PPTX
Better End-to-End Testing with Page Objects Model using Protractor
PPTX
Protractor overview
PPTX
Protractor training
PPTX
Protractor for angularJS
PDF
Advanced Jasmine - Front-End JavaScript Unit Testing
PDF
Protractor: Tips & Tricks
20150128 angular js_headless_testing
Protractor end-to-end testing framework for angular js
Testing Backbone applications with Jasmine
The sweet smell of jasmine for testing JavaScript
Automated Acceptance Testing Example
Jasmine framework
интернет в социологии важнейшие информационные сайты дадададад)))
Advanced Jasmine
Thinking outside the box (SOX)
Angular Testing
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Better End-to-End Testing with Page Objects Model using Protractor
Protractor overview
Protractor training
Protractor for angularJS
Advanced Jasmine - Front-End JavaScript Unit Testing
Protractor: Tips & Tricks
Ad

Similar to Testing Angular 2 Applications - HTML5 Denver 2016 (20)

PPTX
Dive into Angular, part 5: Experience
PDF
Testing Angular apps_ A complete guide for developers.pdf
PDF
Testing AngularJS
PDF
AngularJS Testing
PDF
Client side unit tests - using jasmine & karma
PDF
Automated testing for client-side - Adam Klein, 500 Tech
PPTX
Top 5 AngularJS Tool for Application Development
PPTX
AngularJS Introduction (Talk given on Aug 5 2013)
PDF
Angular Application Testing
PPTX
Introduction to AngularJs
PDF
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
PDF
Top 12 Most Useful AngularJS Development Tools to Use in 2025
PPTX
Good karma: UX Patterns and Unit Testing in Angular with Karma
PPTX
AngularJS with TypeScript and Windows Azure Mobile Services
PPT
Android & iPhone App Testing
PDF
Ultimate Introduction To AngularJS
PDF
AngularJS best-practices
PDF
Big Improvement_ New AngularJS Tools Changing How We Develop.pdf
PDF
Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar
PDF
Angular 2 - How we got here?
Dive into Angular, part 5: Experience
Testing Angular apps_ A complete guide for developers.pdf
Testing AngularJS
AngularJS Testing
Client side unit tests - using jasmine & karma
Automated testing for client-side - Adam Klein, 500 Tech
Top 5 AngularJS Tool for Application Development
AngularJS Introduction (Talk given on Aug 5 2013)
Angular Application Testing
Introduction to AngularJs
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Top 12 Most Useful AngularJS Development Tools to Use in 2025
Good karma: UX Patterns and Unit Testing in Angular with Karma
AngularJS with TypeScript and Windows Azure Mobile Services
Android & iPhone App Testing
Ultimate Introduction To AngularJS
AngularJS best-practices
Big Improvement_ New AngularJS Tools Changing How We Develop.pdf
Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar
Angular 2 - How we got here?

More from Matt Raible (20)

PDF
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
PDF
Micro Frontends for Java Microservices - Belfast JUG 2022
PDF
Micro Frontends for Java Microservices - Dublin JUG 2022
PDF
Micro Frontends for Java Microservices - Cork JUG 2022
PDF
Comparing Native Java REST API Frameworks - Seattle JUG 2022
PDF
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
PDF
Comparing Native Java REST API Frameworks - Devoxx France 2022
PDF
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
PDF
Native Java with Spring Boot and JHipster - Garden State JUG 2021
PDF
Java REST API Framework Comparison - PWX 2021
PDF
Web App Security for Java Developers - PWX 2021
PDF
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
PDF
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
PDF
Web App Security for Java Developers - UberConf 2021
PDF
Java REST API Framework Comparison - UberConf 2021
PDF
Native Java with Spring Boot and JHipster - SF JUG 2021
PDF
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
PDF
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
PDF
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
PDF
JHipster and Okta - JHipster Virtual Meetup December 2020
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Native Java with Spring Boot and JHipster - Garden State JUG 2021
Java REST API Framework Comparison - PWX 2021
Web App Security for Java Developers - PWX 2021
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Web App Security for Java Developers - UberConf 2021
Java REST API Framework Comparison - UberConf 2021
Native Java with Spring Boot and JHipster - SF JUG 2021
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
JHipster and Okta - JHipster Virtual Meetup December 2020

Recently uploaded (20)

PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Transforming Manufacturing operations through Intelligent Integrations
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced IT Governance
PDF
Modernizing your data center with Dell and AMD
PDF
Machine learning based COVID-19 study performance prediction
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Understanding_Digital_Forensics_Presentation.pptx
Transforming Manufacturing operations through Intelligent Integrations
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Per capita expenditure prediction using model stacking based on satellite ima...
Advanced methodologies resolving dimensionality complications for autism neur...
20250228 LYD VKU AI Blended-Learning.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Mobile App Security Testing_ A Comprehensive Guide.pdf
Spectroscopy.pptx food analysis technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced IT Governance
Modernizing your data center with Dell and AMD
Machine learning based COVID-19 study performance prediction
Chapter 3 Spatial Domain Image Processing.pdf
Review of recent advances in non-invasive hemoglobin estimation
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Reach Out and Touch Someone: Haptics and Empathic Computing
CIFDAQ's Market Insight: SEC Turns Pro Crypto

Testing Angular 2 Applications - HTML5 Denver 2016