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)

PDF
Common Site Crawl issue with Javascript
PPTX
Visual regression testing
PPTX
Easier and faster tagging with Kermit
KEY
Wwcode2
PPT
Nakal think test_2015
PDF
PrairieDevCon 2014 - Web Doesn't Mean Slow
PPTX
Browser Automated Testing Frameworks - Nightwatch.js
PDF
The other side of elegant websites
PPT
Unobtrusive javascript
PPTX
Angular JS - Introduction
PDF
Large-Scale Web Scraping: An Ultimate Guide
PPTX
MEAN Stack Course.pptx
PDF
Automating Mobile Testing at Gilt with Appium
PDF
AngularJS - What is it & Why is it awesome ? (with demos)
PPTX
E4D js conference responsive web design - js-il.com
PPTX
Colorful world-of-visual-automation-testing-latest
PDF
Boost SEO with Smart Front-End Practices
PPTX
Ui components - js-il.com
PDF
Increase Your WordPress Website's Google PageSpeed Score
PDF
Measuring Web Performance - HighEdWeb Edition
Common Site Crawl issue with Javascript
Visual regression testing
Easier and faster tagging with Kermit
Wwcode2
Nakal think test_2015
PrairieDevCon 2014 - Web Doesn't Mean Slow
Browser Automated Testing Frameworks - Nightwatch.js
The other side of elegant websites
Unobtrusive javascript
Angular JS - Introduction
Large-Scale Web Scraping: An Ultimate Guide
MEAN Stack Course.pptx
Automating Mobile Testing at Gilt with Appium
AngularJS - What is it & Why is it awesome ? (with demos)
E4D js conference responsive web design - js-il.com
Colorful world-of-visual-automation-testing-latest
Boost SEO with Smart Front-End Practices
Ui components - js-il.com
Increase Your WordPress Website's Google PageSpeed Score
Measuring Web Performance - HighEdWeb Edition

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)

PDF
EGCB_Solar_Project_Presentation_and Finalcial Analysis.pdf
PDF
TrustArc Webinar - Data Minimization in Practice_ Reducing Risk, Enhancing Co...
PDF
Introduction to c language from lecture slides
PDF
Decision Optimization - From Theory to Practice
PDF
State of AI in Business 2025 - MIT NANDA
PDF
Child-friendly e-learning for artificial intelligence education in Indonesia:...
PDF
TicketRoot: Event Tech Solutions Deck 2025
PDF
Addressing the challenges of harmonizing law and artificial intelligence tech...
PDF
The Digital Engine Room: Unlocking APAC’s Economic and Digital Potential thro...
PDF
Uncertainty-aware contextual multi-armed bandits for recommendations in e-com...
PPTX
Blending method and technology for hydrogen.pptx
PDF
Examining Bias in AI Generated News Content.pdf
PDF
Be ready for tomorrow’s needs with a longer-lasting, higher-performing PC
PDF
Gestión Unificada de los Riegos Externos
PPTX
Introduction-to-Artificial-Intelligence (1).pptx
PDF
Altius execution marketplace concept.pdf
PDF
eBook Outline_ AI in Cybersecurity – The Future of Digital Defense.pdf
PDF
FASHION-DRIVEN TEXTILES AS A CRYSTAL OF A NEW STREAM FOR STAKEHOLDER CAPITALI...
PPTX
Report in SIP_Distance_Learning_Technology_Impact.pptx
PDF
Optimizing bioinformatics applications: a novel approach with human protein d...
EGCB_Solar_Project_Presentation_and Finalcial Analysis.pdf
TrustArc Webinar - Data Minimization in Practice_ Reducing Risk, Enhancing Co...
Introduction to c language from lecture slides
Decision Optimization - From Theory to Practice
State of AI in Business 2025 - MIT NANDA
Child-friendly e-learning for artificial intelligence education in Indonesia:...
TicketRoot: Event Tech Solutions Deck 2025
Addressing the challenges of harmonizing law and artificial intelligence tech...
The Digital Engine Room: Unlocking APAC’s Economic and Digital Potential thro...
Uncertainty-aware contextual multi-armed bandits for recommendations in e-com...
Blending method and technology for hydrogen.pptx
Examining Bias in AI Generated News Content.pdf
Be ready for tomorrow’s needs with a longer-lasting, higher-performing PC
Gestión Unificada de los Riegos Externos
Introduction-to-Artificial-Intelligence (1).pptx
Altius execution marketplace concept.pdf
eBook Outline_ AI in Cybersecurity – The Future of Digital Defense.pdf
FASHION-DRIVEN TEXTILES AS A CRYSTAL OF A NEW STREAM FOR STAKEHOLDER CAPITALI...
Report in SIP_Distance_Learning_Technology_Impact.pptx
Optimizing bioinformatics applications: a novel approach with human protein d...

Testing Angular 2 Applications - HTML5 Denver 2016