SlideShare a Scribd company logo
Front-end First:
sopravvivere con il
testing in JavaScript
ROME 18-19 MARCH 2016
Michele Aponte
CEO/CTO Blexin Srl - Presidente DotNetCampania- MVP Visual Studio and Development Technologies
@apomic80 – http://www.tolist.net - michele.aponte@blexin.com
Abbiamo 50 minuti per chiederci…
• Perché	testare?	
• Perché	testare	il	front-end	(e	il	back-end)?
• Quali	strumenti	e	tecniche	ho	a	
disposizione?
• Da	dove	comincio?
Perché testare e perché testare il front-end?
• Il	codice che scriviamo è sottoposto a	continue	
modifiche durante il suo ciclo di	vita
• E’	l’unico modo di	fare	refactoring	senza la	paura di	
rompere qualcosa
• Fornire strumenti per	il controllo qualità
• Ridurre il rischio di	errori di	regressione
• Non	è così difficile	come	potrebbesembrare
Perché testare e perché testare il front-end?
Perché testare e perché testare il front-end?
Quali strumenti e tecniche ho a disposizione?
• Framework	di	testing:	
• QUnit,	Jasmine,	Mocha
• Framework	di	mocking:	
• Sinon,	Jasmine
• Framework	per	rendere il codice testabile:	
• Angular,	Amplify
• Tool	di	automazione:	
• Gulp,	Grunt
• Code	coverage
• Istanbul
• Buon senso,	SoC e	design	pattern	J
Che tipologie di testing vado a realizzare?
• Unit	Testing:	
• Testano una singola unità di	
codice
• Veloci e	ripetibili
• Integration	Testing:	
• Testano l’integrazionetra
diverse	unità di	codice
• End	to	End	testing:
• Testano funzionalità
attraversandotuttolo	stack	
applicativo
Da dove comincio?
Domande? Intanto vi lascio qualche riferimento
• QUnit:	https://qunitjs.com/
• Jasmine:	http://jasmine.github.io/
• Mocha:	https://mochajs.org/
• Testing	ClientsideJavaScript:	
https://app.pluralsight.com/library/courses/testing-
javascript/table-of-contents
• Front-End	First:	Testing	and	Prototyping	JavaScript	Apps:	
https://app.pluralsight.com/library/courses/testing-and-
prototyping-javascript-apps/table-of-contents
• Unit	Testing	with	Node.js:	
https://app.pluralsight.com/library/courses/unit-testing-
nodejs/table-of-content
Thanks!
ROME 18-19 MARCH 2016
Contatti:
Twitter: @apomic80
Blog: http://www.tolist.net
Mail: michele.aponte@blexin.com - michele.aponte@dotnetcampania.org
All pictures belong
to their respective authors

More Related Content

Viewers also liked (12)

PDF
kostia_sukernik_cv
kostia sukernik
 
DOCX
QNT 351 Final Exam Answers 2015 version
bordignonbunnie
 
PPTX
FDA software compliance 2016
Engineering Software Lab
 
PDF
Social Video Marketing: Tips and Trends from the Trenches
Laura "@pistachio" Fitton
 
PPT
Chapter 9 Transport in Plants Lesson 1 - Monocotyledons and dicot
j3di79
 
PPTX
How to Use Content & Influence to Grow Your Business
TopRank Marketing
 
PPT
01 plants part 2 (slideshare)
mrtangextrahelp
 
PDF
The art of selling with video : For WistiaFest
Reward Gateway
 
PDF
Influencer Engagement: 15 Ways to Fail & 25 Ways to Win
TopRank Marketing
 
DOC
Διδακτική πρόταση - ΜΜΕ
seventekidou
 
PDF
Παρουσίαση προγράμματος Roots & Shoots
Theresa Giakoumatou
 
PDF
Leveraging Static Analysis to Secure Software
Parasoft
 
kostia_sukernik_cv
kostia sukernik
 
QNT 351 Final Exam Answers 2015 version
bordignonbunnie
 
FDA software compliance 2016
Engineering Software Lab
 
Social Video Marketing: Tips and Trends from the Trenches
Laura "@pistachio" Fitton
 
Chapter 9 Transport in Plants Lesson 1 - Monocotyledons and dicot
j3di79
 
How to Use Content & Influence to Grow Your Business
TopRank Marketing
 
01 plants part 2 (slideshare)
mrtangextrahelp
 
The art of selling with video : For WistiaFest
Reward Gateway
 
Influencer Engagement: 15 Ways to Fail & 25 Ways to Win
TopRank Marketing
 
Διδακτική πρόταση - ΜΜΕ
seventekidou
 
Παρουσίαση προγράμματος Roots & Shoots
Theresa Giakoumatou
 
Leveraging Static Analysis to Secure Software
Parasoft
 

More from Codemotion (20)

PDF
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Codemotion
 
PDF
Pompili - From hero to_zero: The FatalNoise neverending story
Codemotion
 
PPTX
Pastore - Commodore 65 - La storia
Codemotion
 
PPTX
Pennisi - Essere Richard Altwasser
Codemotion
 
PPTX
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Codemotion
 
PPTX
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Codemotion
 
PPTX
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Codemotion
 
PPTX
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Codemotion
 
PDF
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Codemotion
 
PDF
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Codemotion
 
PDF
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Codemotion
 
PDF
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Codemotion
 
PDF
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Codemotion
 
PDF
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Codemotion
 
PPTX
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Codemotion
 
PPTX
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
Codemotion
 
PDF
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Codemotion
 
PDF
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Codemotion
 
PDF
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Codemotion
 
PDF
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Codemotion
 
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Codemotion
 
Pastore - Commodore 65 - La storia
Codemotion
 
Pennisi - Essere Richard Altwasser
Codemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Codemotion
 
Ad

Front-end First: sopravvivere con il testing in JavaScript

  • 1. Front-end First: sopravvivere con il testing in JavaScript ROME 18-19 MARCH 2016 Michele Aponte CEO/CTO Blexin Srl - Presidente DotNetCampania- MVP Visual Studio and Development Technologies @apomic80 – http://www.tolist.net - [email protected]
  • 2. Abbiamo 50 minuti per chiederci… • Perché testare? • Perché testare il front-end (e il back-end)? • Quali strumenti e tecniche ho a disposizione? • Da dove comincio?
  • 3. Perché testare e perché testare il front-end? • Il codice che scriviamo è sottoposto a continue modifiche durante il suo ciclo di vita • E’ l’unico modo di fare refactoring senza la paura di rompere qualcosa • Fornire strumenti per il controllo qualità • Ridurre il rischio di errori di regressione • Non è così difficile come potrebbesembrare
  • 4. Perché testare e perché testare il front-end?
  • 5. Perché testare e perché testare il front-end?
  • 6. Quali strumenti e tecniche ho a disposizione? • Framework di testing: • QUnit, Jasmine, Mocha • Framework di mocking: • Sinon, Jasmine • Framework per rendere il codice testabile: • Angular, Amplify • Tool di automazione: • Gulp, Grunt • Code coverage • Istanbul • Buon senso, SoC e design pattern J
  • 7. Che tipologie di testing vado a realizzare? • Unit Testing: • Testano una singola unità di codice • Veloci e ripetibili • Integration Testing: • Testano l’integrazionetra diverse unità di codice • End to End testing: • Testano funzionalità attraversandotuttolo stack applicativo
  • 9. Domande? Intanto vi lascio qualche riferimento • QUnit: https://qunitjs.com/ • Jasmine: http://jasmine.github.io/ • Mocha: https://mochajs.org/ • Testing ClientsideJavaScript: https://app.pluralsight.com/library/courses/testing- javascript/table-of-contents • Front-End First: Testing and Prototyping JavaScript Apps: https://app.pluralsight.com/library/courses/testing-and- prototyping-javascript-apps/table-of-contents • Unit Testing with Node.js: https://app.pluralsight.com/library/courses/unit-testing- nodejs/table-of-content
  • 10. Thanks! ROME 18-19 MARCH 2016 Contatti: Twitter: @apomic80 Blog: http://www.tolist.net Mail: [email protected] - [email protected] All pictures belong to their respective authors