SlideShare a Scribd company logo
tweet #tarabica14
tweet #tarabica14
Testing Your SPA
Wekoslav Stefanovski
swekster@gmail.com
facebook.com/sweko
@swekster
tweet #tarabica14
tweet #tarabica14
>whoami
• Senior Developer in Seavus
• Coding professionally since last century
• Rabid about code qualty
• Cofounder of Macedonian .net community
• I love C#
• I hate JavaScript, but I love web development
tweet #tarabica14
What will this talk be about
• A little bit of history
• A little bit of present
• What is and what isn’t an SPA?
• Why test software?
• Design for quality
• How can I test Single Page Applications?
• Demo
tweet #tarabica14
A little bit of history
• What’s the deal with this web thing?
• What is this thing called Javascript???
• Build in Netscape in 1995, focused on non-professional
developers.
• Standardized as ECMAScript (in 1999) – a.k.a. Internet
Prehistory
• What is this thing called DOM???
tweet #tarabica14
A little bit of present
• The rise of the Single-Page Application
• Heavy client logic, getting heavier
• Stateless web is dead and more alive than ever
• The attack of the APIs and services
• Ongoing M/V separation
tweet #tarabica14
So what is an SPA
• Desktop-like user experience
• Starts, and stays on a single page load
• Client-side development
• The server should be as thin and as stateless as possible
tweet #tarabica14
Dataset
SQL
Database Server Desktop Client
Classic Client-Server (VB6)
tweet #tarabica14
Dataset
SQL
Database Server Desktop Client
Web Server
Web Client
Modern Client-Server (SPA)
HTTP API Request
JSON Data
tweet #tarabica14
Why is testing needed
• Software has bugs
• Users and clients have bugs too
• The problem space is extremely complex – almost-
exponential complexity
• Software is never done done.
• Some aspects are prone to automation
• Unit tests
• Functional tests
• Integration tests
• Regression tests
tweet #tarabica14
Quality by design – Pit of Success
• KISS / DRY / YAGNI / SOLID
• Refactoring
• Separate responsibilities
• Avoid mixing of different levels of abstraction
• Manage dependencies
• Write testable code
• Code that does not exist, cannot have bugs
tweet #tarabica14
Testing libraries
• QUnit
• Jasmine
• Mocha
• Chai
• Selenium
• Phantom.js
• Buster.js
• Blanket.js
• Casper.js
• Chutzpah
• Sinon.js
• JsMockito
• jqMock
• mockjax
• Watir / WatiN
• Sahi
• expect.js
• YUI Test
• JSTestDriver
• ….
tweet #tarabica14
How should I test JavaScript
• Javascript code is just code!
• Dynamic structure actually helps
• Unit test frameworks
• Headless browsers
• Regular browsers
• Integration with CI tools
tweet #tarabica14
How should I test everything else?
• The old, tried way – Eyeballs on the job
• Browser automation
• Taking and comparing screenshots
• Selenium WebDriver
tweet #tarabica14
DEMO
A very simple knockout.js based SPA tested with
QUnit, Chutzpah and PhantomJS
tweet #tarabica14

More Related Content

What's hot (20)

PDF
ITT Flisol 2013
Domingo Suarez Torres
 
PPTX
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
Fwdays
 
KEY
SGCE 2012 Lightning Talk-Single Page Interface
Domingo Suarez Torres
 
PDF
Lessons in Open Source from the MongooseJS ODM
Valeri Karpov
 
PDF
Isomorphic React Applications: Performance And Scalability
Denis Izmaylov
 
PDF
IBM Domino Modernizing apps with Angularjs
Dominopoint - Italian Lotus User Group
 
PDF
MEAN Stack Warm-up
Troy Miles
 
PPTX
Codegen2021 blazor mobile
Jose Javier Columbie
 
PPTX
React brief introduction
Prograils.com
 
PDF
MongoDB MEAN Stack Webinar October 7, 2015
Valeri Karpov
 
PDF
Blazor - The New Silverlight?
Christian Nagel
 
PDF
Content as a Service: What to Know About Decoupled CMS
Pantheon
 
PDF
Testing Mobile JavaScript (Fall 2010
jeresig
 
PPTX
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Alessandro Pilotti
 
PPTX
Engage 2019 - De04. Java with Domino After XPages
Jesse Gallagher
 
PPTX
Decoupled Architecture and WordPress
Pantheon
 
PDF
Tomasz Janczuk - Webtaskalifragilistexpialidocious
ServerlessConf
 
PPTX
Blazor v1.1
Juan Luis Guerrero Minero
 
PPTX
Gatsby intro
Ben McCormick
 
PPTX
DevDay 2018 - Blazor
Denis Voituron
 
ITT Flisol 2013
Domingo Suarez Torres
 
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
Fwdays
 
SGCE 2012 Lightning Talk-Single Page Interface
Domingo Suarez Torres
 
Lessons in Open Source from the MongooseJS ODM
Valeri Karpov
 
Isomorphic React Applications: Performance And Scalability
Denis Izmaylov
 
IBM Domino Modernizing apps with Angularjs
Dominopoint - Italian Lotus User Group
 
MEAN Stack Warm-up
Troy Miles
 
Codegen2021 blazor mobile
Jose Javier Columbie
 
React brief introduction
Prograils.com
 
MongoDB MEAN Stack Webinar October 7, 2015
Valeri Karpov
 
Blazor - The New Silverlight?
Christian Nagel
 
Content as a Service: What to Know About Decoupled CMS
Pantheon
 
Testing Mobile JavaScript (Fall 2010
jeresig
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Alessandro Pilotti
 
Engage 2019 - De04. Java with Domino After XPages
Jesse Gallagher
 
Decoupled Architecture and WordPress
Pantheon
 
Tomasz Janczuk - Webtaskalifragilistexpialidocious
ServerlessConf
 
Gatsby intro
Ben McCormick
 
DevDay 2018 - Blazor
Denis Voituron
 

Viewers also liked (19)

PDF
The Dark Side of Single Page Applications
Dor Kalev
 
PDF
Measuring the Performance of Single Page Applications
Nicholas Jansma
 
PPTX
Through Meteor to the stars - Developing full-stack SPA's with meteor.js
Wekoslav Stefanovski
 
PDF
How to slice your monolithic webapp using MicroApps architecture
Yonatan Maman
 
PDF
Webapp-Architecture
Shailendar Chintha
 
PPTX
Content Architecture
cleveg
 
PDF
Acceptance & Functional Testing with Codeception - Devspace 2015
Joe Ferguson
 
PPT
Smoke and Mirrors - Reflection in C#
Wekoslav Stefanovski
 
PPTX
TypeScript 1.6 - How I learned to Stop Worrying and Love JavaScript
Wekoslav Stefanovski
 
PPTX
Behavior Driven Development with AngularJS & Jasmine
Remus Langu
 
PDF
Measuring Continuity
Nicholas Jansma
 
PDF
Jasmine BDD for Javascript
Luis Alfredo Porras Páez
 
PPTX
Single Page WebApp Architecture
Morgan Cheng
 
PDF
Performance Testing using Real Browsers with JMeter & Webdriver
BlazeMeter
 
PPTX
How Slow Load Times Hurt Your Bottom Line (And 17 Things You Can Do to Fix It)
Tammy Everts
 
PPTX
JMeter Database Performace Testing - Keytorc Approach
Keytorc Software Testing Services
 
PPTX
Coding for the cloud - development of modern web applications
Wekoslav Stefanovski
 
PDF
Speed matters, So why is your site so slow?
Andy Davies
 
PDF
Integration Test Hell
David Völkel
 
The Dark Side of Single Page Applications
Dor Kalev
 
Measuring the Performance of Single Page Applications
Nicholas Jansma
 
Through Meteor to the stars - Developing full-stack SPA's with meteor.js
Wekoslav Stefanovski
 
How to slice your monolithic webapp using MicroApps architecture
Yonatan Maman
 
Webapp-Architecture
Shailendar Chintha
 
Content Architecture
cleveg
 
Acceptance & Functional Testing with Codeception - Devspace 2015
Joe Ferguson
 
Smoke and Mirrors - Reflection in C#
Wekoslav Stefanovski
 
TypeScript 1.6 - How I learned to Stop Worrying and Love JavaScript
Wekoslav Stefanovski
 
Behavior Driven Development with AngularJS & Jasmine
Remus Langu
 
Measuring Continuity
Nicholas Jansma
 
Jasmine BDD for Javascript
Luis Alfredo Porras Páez
 
Single Page WebApp Architecture
Morgan Cheng
 
Performance Testing using Real Browsers with JMeter & Webdriver
BlazeMeter
 
How Slow Load Times Hurt Your Bottom Line (And 17 Things You Can Do to Fix It)
Tammy Everts
 
JMeter Database Performace Testing - Keytorc Approach
Keytorc Software Testing Services
 
Coding for the cloud - development of modern web applications
Wekoslav Stefanovski
 
Speed matters, So why is your site so slow?
Andy Davies
 
Integration Test Hell
David Völkel
 
Ad

Similar to Testing your Single Page Application (20)

PPTX
JavaScript in Universal Windows Platform apps
Timmy Kokke
 
PPTX
Tarabica 2019 - Migration from ASP.NET MVC to ASP.NET Core
Miroslav Popovic
 
PPTX
WTF: Where To Focus when you take over a Drupal project
Symetris
 
PDF
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Conference
 
PDF
Progressive Enhancement using WSGI
Matthew Wilkes
 
PDF
The Thick Front-End
Jeff Dickey
 
PPTX
Develop a vanilla.js spa you and your customers will love
Chris Love
 
PDF
Next Generation Web Development Techniques with Cloud Foundry
Malachi Smith
 
PDF
Best Practices for WordPress
Taylor Lovett
 
PDF
Letter to a Junior Developer: The Engineering Side of Programming
Lazar Kovacevic
 
PPTX
Single Page Application Development with backbone.js and Simple.Web
Chris Canal
 
PPTX
Angular Owin Katana TypeScript
Justin Wendlandt
 
PPTX
Untangling spring week1
Derek Jacoby
 
PPTX
Test Automation with Twist and Sahi
ericjamesblackburn
 
PPTX
Acing application lifecycle management in SharePoint
Jeremy Thake
 
PPTX
Episode 16 - Introduction to LWC
Jitendra Zaa
 
PDF
The Silver Bullet Syndrome by Alexey Vasiliev
Pivorak MeetUp
 
PPTX
Untying the Knots of Web Dev with Internet Explorer
Sarah Dutkiewicz
 
PDF
Node.js for .NET Developers
David Neal
 
PPTX
Web development - Developing Web as A Team
Muhammad Akbar Yasin
 
JavaScript in Universal Windows Platform apps
Timmy Kokke
 
Tarabica 2019 - Migration from ASP.NET MVC to ASP.NET Core
Miroslav Popovic
 
WTF: Where To Focus when you take over a Drupal project
Symetris
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Conference
 
Progressive Enhancement using WSGI
Matthew Wilkes
 
The Thick Front-End
Jeff Dickey
 
Develop a vanilla.js spa you and your customers will love
Chris Love
 
Next Generation Web Development Techniques with Cloud Foundry
Malachi Smith
 
Best Practices for WordPress
Taylor Lovett
 
Letter to a Junior Developer: The Engineering Side of Programming
Lazar Kovacevic
 
Single Page Application Development with backbone.js and Simple.Web
Chris Canal
 
Angular Owin Katana TypeScript
Justin Wendlandt
 
Untangling spring week1
Derek Jacoby
 
Test Automation with Twist and Sahi
ericjamesblackburn
 
Acing application lifecycle management in SharePoint
Jeremy Thake
 
Episode 16 - Introduction to LWC
Jitendra Zaa
 
The Silver Bullet Syndrome by Alexey Vasiliev
Pivorak MeetUp
 
Untying the Knots of Web Dev with Internet Explorer
Sarah Dutkiewicz
 
Node.js for .NET Developers
David Neal
 
Web development - Developing Web as A Team
Muhammad Akbar Yasin
 
Ad

More from Wekoslav Stefanovski (10)

PPTX
Make you a Redux for fun and profit!
Wekoslav Stefanovski
 
PPTX
Blazor - C# for the web
Wekoslav Stefanovski
 
PPTX
Asynchrony on the web
Wekoslav Stefanovski
 
PPTX
Servers? We don't need no stinking servers
Wekoslav Stefanovski
 
PPTX
Typescript Decorators
Wekoslav Stefanovski
 
PPT
How to write bad code using C#
Wekoslav Stefanovski
 
PPTX
Garbage Collection .Net
Wekoslav Stefanovski
 
PPT
TypeScript - Javascript done right
Wekoslav Stefanovski
 
PPTX
Entity Framework 5 - Code First
Wekoslav Stefanovski
 
PPTX
SOLID -Clean Code For Mere Mortals
Wekoslav Stefanovski
 
Make you a Redux for fun and profit!
Wekoslav Stefanovski
 
Blazor - C# for the web
Wekoslav Stefanovski
 
Asynchrony on the web
Wekoslav Stefanovski
 
Servers? We don't need no stinking servers
Wekoslav Stefanovski
 
Typescript Decorators
Wekoslav Stefanovski
 
How to write bad code using C#
Wekoslav Stefanovski
 
Garbage Collection .Net
Wekoslav Stefanovski
 
TypeScript - Javascript done right
Wekoslav Stefanovski
 
Entity Framework 5 - Code First
Wekoslav Stefanovski
 
SOLID -Clean Code For Mere Mortals
Wekoslav Stefanovski
 

Recently uploaded (20)

PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 

Testing your Single Page Application

  • 2. tweet #tarabica14 Testing Your SPA Wekoslav Stefanovski [email protected] facebook.com/sweko @swekster
  • 4. tweet #tarabica14 >whoami • Senior Developer in Seavus • Coding professionally since last century • Rabid about code qualty • Cofounder of Macedonian .net community • I love C# • I hate JavaScript, but I love web development
  • 5. tweet #tarabica14 What will this talk be about • A little bit of history • A little bit of present • What is and what isn’t an SPA? • Why test software? • Design for quality • How can I test Single Page Applications? • Demo
  • 6. tweet #tarabica14 A little bit of history • What’s the deal with this web thing? • What is this thing called Javascript??? • Build in Netscape in 1995, focused on non-professional developers. • Standardized as ECMAScript (in 1999) – a.k.a. Internet Prehistory • What is this thing called DOM???
  • 7. tweet #tarabica14 A little bit of present • The rise of the Single-Page Application • Heavy client logic, getting heavier • Stateless web is dead and more alive than ever • The attack of the APIs and services • Ongoing M/V separation
  • 8. tweet #tarabica14 So what is an SPA • Desktop-like user experience • Starts, and stays on a single page load • Client-side development • The server should be as thin and as stateless as possible
  • 9. tweet #tarabica14 Dataset SQL Database Server Desktop Client Classic Client-Server (VB6)
  • 10. tweet #tarabica14 Dataset SQL Database Server Desktop Client Web Server Web Client Modern Client-Server (SPA) HTTP API Request JSON Data
  • 11. tweet #tarabica14 Why is testing needed • Software has bugs • Users and clients have bugs too • The problem space is extremely complex – almost- exponential complexity • Software is never done done. • Some aspects are prone to automation • Unit tests • Functional tests • Integration tests • Regression tests
  • 12. tweet #tarabica14 Quality by design – Pit of Success • KISS / DRY / YAGNI / SOLID • Refactoring • Separate responsibilities • Avoid mixing of different levels of abstraction • Manage dependencies • Write testable code • Code that does not exist, cannot have bugs
  • 13. tweet #tarabica14 Testing libraries • QUnit • Jasmine • Mocha • Chai • Selenium • Phantom.js • Buster.js • Blanket.js • Casper.js • Chutzpah • Sinon.js • JsMockito • jqMock • mockjax • Watir / WatiN • Sahi • expect.js • YUI Test • JSTestDriver • ….
  • 14. tweet #tarabica14 How should I test JavaScript • Javascript code is just code! • Dynamic structure actually helps • Unit test frameworks • Headless browsers • Regular browsers • Integration with CI tools
  • 15. tweet #tarabica14 How should I test everything else? • The old, tried way – Eyeballs on the job • Browser automation • Taking and comparing screenshots • Selenium WebDriver
  • 16. tweet #tarabica14 DEMO A very simple knockout.js based SPA tested with QUnit, Chutzpah and PhantomJS