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

What's hot (20)

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

Viewers also liked (17)

PDF
20150128 angular js_headless_testing
Benjamin Neu
 
DOCX
Protractor end-to-end testing framework for angular js
codeandyou forums
 
PDF
Testing Backbone applications with Jasmine
Leon van der Grient
 
PPTX
The sweet smell of jasmine for testing JavaScript
Emma Armstrong
 
PPTX
Automated Acceptance Testing Example
Hani Massoud
 
PPTX
Jasmine framework
Vishwanath KC
 
PPTX
интернет в социологии важнейшие информационные сайты дадададад)))
faqMEN
 
PDF
Advanced Jasmine
jbellsey
 
PDF
Thinking outside the box (SOX)
Vladimir Matviychuk
 
PDF
Angular Testing
Priscila Negreiros
 
PDF
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Codemotion
 
PPTX
Better End-to-End Testing with Page Objects Model using Protractor
Kasun Kodagoda
 
PPTX
Protractor overview
Abhishek Yadav
 
PPTX
Protractor training
Sergiy Stotskiy
 
PPTX
Protractor for angularJS
Krishna Kumar
 
PDF
Advanced Jasmine - Front-End JavaScript Unit Testing
Lars Thorup
 
PDF
Protractor: Tips & Tricks
Sergey Bolshchikov
 
20150128 angular js_headless_testing
Benjamin Neu
 
Protractor end-to-end testing framework for angular js
codeandyou forums
 
Testing Backbone applications with Jasmine
Leon van der Grient
 
The sweet smell of jasmine for testing JavaScript
Emma Armstrong
 
Automated Acceptance Testing Example
Hani Massoud
 
Jasmine framework
Vishwanath KC
 
интернет в социологии важнейшие информационные сайты дадададад)))
faqMEN
 
Advanced Jasmine
jbellsey
 
Thinking outside the box (SOX)
Vladimir Matviychuk
 
Angular Testing
Priscila Negreiros
 
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Codemotion
 
Better End-to-End Testing with Page Objects Model using Protractor
Kasun Kodagoda
 
Protractor overview
Abhishek Yadav
 
Protractor training
Sergiy Stotskiy
 
Protractor for angularJS
Krishna Kumar
 
Advanced Jasmine - Front-End JavaScript Unit Testing
Lars Thorup
 
Protractor: Tips & Tricks
Sergey Bolshchikov
 
Ad

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

PPTX
Dive into Angular, part 5: Experience
Oleksii Prohonnyi
 
PDF
Testing Angular apps_ A complete guide for developers.pdf
Peerbits
 
PDF
Testing AngularJS
Jacopo Nardiello
 
PDF
AngularJS Testing
Ahmed Elmehri
 
PDF
Client side unit tests - using jasmine & karma
Adam Klein
 
PDF
Automated testing for client-side - Adam Klein, 500 Tech
Codemotion Tel Aviv
 
PPTX
Top 5 AngularJS Tool for Application Development
Paul Cook
 
PPTX
AngularJS Introduction (Talk given on Aug 5 2013)
Abhishek Anand
 
PDF
Angular Application Testing
Troy Miles
 
PPTX
Introduction to AngularJs
murtazahaveliwala
 
PDF
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
DicodingEvent
 
PDF
Top 12 Most Useful AngularJS Development Tools to Use in 2025
GrapesTech Solutions
 
PPTX
Good karma: UX Patterns and Unit Testing in Angular with Karma
ExoLeaders.com
 
PPTX
AngularJS with TypeScript and Windows Azure Mobile Services
Rainer Stropek
 
PPT
Android & iPhone App Testing
SWAAM Tech
 
PDF
Ultimate Introduction To AngularJS
Jacopo Nardiello
 
PDF
AngularJS best-practices
Henry Tao
 
PDF
Big Improvement_ New AngularJS Tools Changing How We Develop.pdf
sarah david
 
PDF
Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar
Applitools
 
PDF
Angular 2 - How we got here?
Marios Fakiolas
 
Dive into Angular, part 5: Experience
Oleksii Prohonnyi
 
Testing Angular apps_ A complete guide for developers.pdf
Peerbits
 
Testing AngularJS
Jacopo Nardiello
 
AngularJS Testing
Ahmed Elmehri
 
Client side unit tests - using jasmine & karma
Adam Klein
 
Automated testing for client-side - Adam Klein, 500 Tech
Codemotion Tel Aviv
 
Top 5 AngularJS Tool for Application Development
Paul Cook
 
AngularJS Introduction (Talk given on Aug 5 2013)
Abhishek Anand
 
Angular Application Testing
Troy Miles
 
Introduction to AngularJs
murtazahaveliwala
 
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
DicodingEvent
 
Top 12 Most Useful AngularJS Development Tools to Use in 2025
GrapesTech Solutions
 
Good karma: UX Patterns and Unit Testing in Angular with Karma
ExoLeaders.com
 
AngularJS with TypeScript and Windows Azure Mobile Services
Rainer Stropek
 
Android & iPhone App Testing
SWAAM Tech
 
Ultimate Introduction To AngularJS
Jacopo Nardiello
 
AngularJS best-practices
Henry Tao
 
Big Improvement_ New AngularJS Tools Changing How We Develop.pdf
sarah david
 
Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar
Applitools
 
Angular 2 - How we got here?
Marios Fakiolas
 

More from Matt Raible (20)

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

Recently uploaded (20)

PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PPT
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
PDF
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Software Development Methodologies in 2025
KodekX
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Doc9.....................................
SofiaCollazos
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 

Testing Angular 2 Applications - HTML5 Denver 2016