SlideShare a Scribd company logo
From 0 to 100
How we jump-started our frontend testing
@henningmus

Doist
‣ Studied Business IT and Computer Science

‣ Software Engineer at Doist

‣ Fully remote company behind Todoist

and recently Twist
Intro: Hi, I’m Henning !
Twist
Calmer communication
More organized team knowledge
More productive teamwork
From 0 to 100: How we jump-started our frontend testing
October 2014
Begin of development
October 2014
Begin of development
April 2016
Doist abandons Slack completely
October 2014
Begin of development
April 2016
Doist abandons Slack completely
January 2017
Invite-only Beta
October 2014
Begin of development
April 2016
Doist abandons Slack completely
January 2017
Invite-only Beta
21st July 2017
Public Launch
October 2014
Begin of development
April 2016
Doist abandons Slack completely
January 2017
Invite-only Beta
21st July 2017
Public Launch
1st May 2017
Me joining the web team
Why test?
Why test?
✓ Increase Quality
Why test?
✓ Increase Quality
✓ Easier & faster refactorings
Why test?
✓ Increase Quality
✓ Easier & faster refactorings
✓ Avoid regressions
Why test?
✓ Increase Quality
✓ Easier & faster refactorings
✓ Avoid regressions
✓ Tests as documentation
Why test?
✓ Increase Quality
✓ Easier & faster refactorings
✓ Avoid regressions
✓ Tests as documentation
✓ Reduce fear of changes
Test Types
1. API Tests

2. UI Tests

3. Unit Tests
API Tests
API Tests
Consumer-Driven Contracts

‣ Written by clients executed by service
API Tests
Consumer-Driven Contracts

‣ Written by clients executed by service
Not a high priority in our setup
(at the moment)
UI Tests
Run your web app in an actual browser
UI Tests
Run your web app in all the browsers
UI Tests
Run your web app in all the browsers
‣ Selenium → WebDriver Protocol
UI Tests
Run your web app in all the browsers
‣ Selenium → WebDriver Protocol
‣ Alternative APIs: WebdriverIO or NightwatchJS
UI Tests
Run your web app in all the browsers
‣ Selenium → WebDriver Protocol
‣ Alternative APIs: WebdriverIO or NightwatchJS
‣ Run in the cloud: Saucelabs or Browserstack
Unit Tests
Test your components in isolation

‣ Assert render output against prop-combinations
Unit Tests
Test your components in isolation

‣ Assert render output against prop-combinations
it('renders Page with title and unread count', () => {
const page = shallow(<Page title='title' unreadCount={ 5 } />)
expect(page.find('.page')).toBeDefined()
expect(page.find('.title')).toBeDefined()
expect(page.find('.title').text()).toBe('title')
expect(page.find('.unread-badge')).toBeDefined()
expect(page.find('.unread-badge').text()).toBe('5')
})
Without snapshots
Unit Tests
Test your components in isolation

‣ Assert render output against prop-combinations
it('renders Page with title and unread count', () => {
const page = shallow(<Page title='title' unreadCount={ 5 } />)
expect(page).toMatchSnapshot()
})
With snapshots
exports[`Page renders Page with title and unread count`] = `
<div
className="page"
>
<h1
className="title"
>
title
</h1>
<span
className=“unread-badge”
>
5
</span>
</div>
`;
Snapshot File
Integration Tests
Test the interplay of your components
‣ When I simulate a click here is this being displayed?
‣ If my store changes to this does my UI update correctly?
Field Trip: Chromeless
Chrome automation made simple

Runs locally or headless on AWS.
Field Trip: Chromeless
Chrome automation made simple

Runs locally or headless on AWS.
const chromeless = new Chromeless({ remote: true })
const screenshot = await chromeless
.goto('https://www.google.com')
.type('chromeless', 'input[name="q"]')
.press(13)
.wait('#resultStats')
.screenshot()
.scrollTo(0, 1000)
console.log(screenshot)
await chromeless.end()
Unit Tests
Used technologies
• jest as test-runner

• enzyme as renderer

• enzyme-to-json as snapshot serializer
React 16

Proof
How hard is it to
start with testing?
How hard is it to
start with testing?
Leverage cross-browser tests

for a good night’s sleep.
Reduce boilerplate assertions

by using snapshots.
The biggest mistake 

is not to start.
From 0 to 100
How we jump-started our frontend testing
@henningmus

Doist

More Related Content

PDF
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
PPTX
Web Cache Deception Attack
PPTX
Angular Unit Test
PDF
Cypress - Best Practices
PPTX
Protractor overview
PPTX
Introduction to cypress in Angular (Chinese)
PDF
Automated testing with Cypress
PPTX
Plugin Safety Check - How to Ensure Your Plugin Gets Approved
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
Web Cache Deception Attack
Angular Unit Test
Cypress - Best Practices
Protractor overview
Introduction to cypress in Angular (Chinese)
Automated testing with Cypress
Plugin Safety Check - How to Ensure Your Plugin Gets Approved

What's hot (20)

PPT
Selenium and Cucumber Selenium Conf 2011
PPTX
Cypress workshop for JSFoo 2019
PPTX
Story Testing Approach for Enterprise Applications using Selenium Framework
PPTX
BDD testing with cucumber
PDF
ComponenKit and React Native
PDF
Integration testing - A&BP CC
PDF
Say Goodbye to Flaky Selenium Tests
PPTX
Protractor for angularJS
PDF
Flaky No More: Find the Right Framework for Your Selenium Tests
PDF
Rapid Agile Delivery: Stories from Stash on Shipping Product More Frequently
PPTX
LONDON SDET MEETUP - Difference between Selenium and Cypress presentation
PPTX
Why you should switch to Cypress for modern web testing?
PDF
Tooling for the productive front end developer
PDF
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
PDF
Sharing the pain using Protractor
DOC
Selenium course syllabus
PDF
Validation for APIs in Laravel 4
PDF
Intro to front-end testing
PPTX
Angular Unit Testing
KEY
HTML5 Video for WordPress
Selenium and Cucumber Selenium Conf 2011
Cypress workshop for JSFoo 2019
Story Testing Approach for Enterprise Applications using Selenium Framework
BDD testing with cucumber
ComponenKit and React Native
Integration testing - A&BP CC
Say Goodbye to Flaky Selenium Tests
Protractor for angularJS
Flaky No More: Find the Right Framework for Your Selenium Tests
Rapid Agile Delivery: Stories from Stash on Shipping Product More Frequently
LONDON SDET MEETUP - Difference between Selenium and Cypress presentation
Why you should switch to Cypress for modern web testing?
Tooling for the productive front end developer
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Sharing the pain using Protractor
Selenium course syllabus
Validation for APIs in Laravel 4
Intro to front-end testing
Angular Unit Testing
HTML5 Video for WordPress
Ad

Similar to From 0 to 100: How we jump-started our frontend testing (20)

ODP
Enterprise Workflows When You Aren't Enterprise
PDF
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
ODP
Integration Testing in Python
PDF
Continuous Delivery su progetti Java: cosa abbiamo imparato facendoci del male
PDF
Pietro Di Bello, Paolo D'Incau - Continuous Delivery su progetti Java: cosa a...
PDF
How to use selenium successfully
PDF
Hands On with Selenium and WebDriver
PDF
From devOps to front end Ops, test first
PDF
Mastering Test Automation: How to Use Selenium Successfully
PPTX
10 practices that every developer needs to start right now
PDF
Selenium course training institute ameerpet hyderabad – Best software trainin...
PDF
Selenium course training institute ameerpet hyderabad
PPTX
Web testing with Selenium
PPTX
Bulletproof design systems using storybook
PDF
The "Holy Grail" of Dev/Ops
PDF
Deploy like a pro!
ODP
Writing useful automated tests for the single page applications you build
PDF
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
KEY
Graceful Failure with Selenium and Continuous Integration
PPT
Pragmatic Parallels: Java and JavaScript
Enterprise Workflows When You Aren't Enterprise
[Webinar] Test First, Fail Fast - Simplifying the Tester's Transition to DevOps
Integration Testing in Python
Continuous Delivery su progetti Java: cosa abbiamo imparato facendoci del male
Pietro Di Bello, Paolo D'Incau - Continuous Delivery su progetti Java: cosa a...
How to use selenium successfully
Hands On with Selenium and WebDriver
From devOps to front end Ops, test first
Mastering Test Automation: How to Use Selenium Successfully
10 practices that every developer needs to start right now
Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad
Web testing with Selenium
Bulletproof design systems using storybook
The "Holy Grail" of Dev/Ops
Deploy like a pro!
Writing useful automated tests for the single page applications you build
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
Graceful Failure with Selenium and Continuous Integration
Pragmatic Parallels: Java and JavaScript
Ad

More from Henning Muszynski (8)

PDF
The ABC of Coded Style Guides
PDF
Alphabet from A to Z
PDF
Growth Hacking 101
PDF
Context Discount
PDF
Twitter Trend Detection and Analysis
PDF
PDF
Spark X - Enterprise Crowdfunding
PDF
Virtual Meeting Room
The ABC of Coded Style Guides
Alphabet from A to Z
Growth Hacking 101
Context Discount
Twitter Trend Detection and Analysis
Spark X - Enterprise Crowdfunding
Virtual Meeting Room

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Encapsulation theory and applications.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
KodekX | Application Modernization Development
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Big Data Technologies - Introduction.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
20250228 LYD VKU AI Blended-Learning.pptx
Unlocking AI with Model Context Protocol (MCP)
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation_ Review paper, used for researhc scholars
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Advanced methodologies resolving dimensionality complications for autism neur...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Encapsulation theory and applications.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Mobile App Security Testing_ A Comprehensive Guide.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
KodekX | Application Modernization Development
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
“AI and Expert System Decision Support & Business Intelligence Systems”
Big Data Technologies - Introduction.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm

From 0 to 100: How we jump-started our frontend testing

  • 1. From 0 to 100 How we jump-started our frontend testing @henningmus Doist
  • 2. ‣ Studied Business IT and Computer Science ‣ Software Engineer at Doist ‣ Fully remote company behind Todoist
 and recently Twist Intro: Hi, I’m Henning !
  • 3. Twist Calmer communication More organized team knowledge More productive teamwork
  • 5. October 2014 Begin of development
  • 6. October 2014 Begin of development April 2016 Doist abandons Slack completely
  • 7. October 2014 Begin of development April 2016 Doist abandons Slack completely January 2017 Invite-only Beta
  • 8. October 2014 Begin of development April 2016 Doist abandons Slack completely January 2017 Invite-only Beta 21st July 2017 Public Launch
  • 9. October 2014 Begin of development April 2016 Doist abandons Slack completely January 2017 Invite-only Beta 21st July 2017 Public Launch 1st May 2017 Me joining the web team
  • 12. Why test? ✓ Increase Quality ✓ Easier & faster refactorings
  • 13. Why test? ✓ Increase Quality ✓ Easier & faster refactorings ✓ Avoid regressions
  • 14. Why test? ✓ Increase Quality ✓ Easier & faster refactorings ✓ Avoid regressions ✓ Tests as documentation
  • 15. Why test? ✓ Increase Quality ✓ Easier & faster refactorings ✓ Avoid regressions ✓ Tests as documentation ✓ Reduce fear of changes
  • 16. Test Types 1. API Tests 2. UI Tests 3. Unit Tests
  • 18. API Tests Consumer-Driven Contracts ‣ Written by clients executed by service
  • 19. API Tests Consumer-Driven Contracts ‣ Written by clients executed by service Not a high priority in our setup (at the moment)
  • 20. UI Tests Run your web app in an actual browser
  • 21. UI Tests Run your web app in all the browsers
  • 22. UI Tests Run your web app in all the browsers ‣ Selenium → WebDriver Protocol
  • 23. UI Tests Run your web app in all the browsers ‣ Selenium → WebDriver Protocol ‣ Alternative APIs: WebdriverIO or NightwatchJS
  • 24. UI Tests Run your web app in all the browsers ‣ Selenium → WebDriver Protocol ‣ Alternative APIs: WebdriverIO or NightwatchJS ‣ Run in the cloud: Saucelabs or Browserstack
  • 25. Unit Tests Test your components in isolation ‣ Assert render output against prop-combinations
  • 26. Unit Tests Test your components in isolation ‣ Assert render output against prop-combinations it('renders Page with title and unread count', () => { const page = shallow(<Page title='title' unreadCount={ 5 } />) expect(page.find('.page')).toBeDefined() expect(page.find('.title')).toBeDefined() expect(page.find('.title').text()).toBe('title') expect(page.find('.unread-badge')).toBeDefined() expect(page.find('.unread-badge').text()).toBe('5') }) Without snapshots
  • 27. Unit Tests Test your components in isolation ‣ Assert render output against prop-combinations it('renders Page with title and unread count', () => { const page = shallow(<Page title='title' unreadCount={ 5 } />) expect(page).toMatchSnapshot() }) With snapshots
  • 28. exports[`Page renders Page with title and unread count`] = ` <div className="page" > <h1 className="title" > title </h1> <span className=“unread-badge” > 5 </span> </div> `; Snapshot File
  • 29. Integration Tests Test the interplay of your components ‣ When I simulate a click here is this being displayed? ‣ If my store changes to this does my UI update correctly?
  • 30. Field Trip: Chromeless Chrome automation made simple Runs locally or headless on AWS.
  • 31. Field Trip: Chromeless Chrome automation made simple Runs locally or headless on AWS. const chromeless = new Chromeless({ remote: true }) const screenshot = await chromeless .goto('https://www.google.com') .type('chromeless', 'input[name="q"]') .press(13) .wait('#resultStats') .screenshot() .scrollTo(0, 1000) console.log(screenshot) await chromeless.end()
  • 32. Unit Tests Used technologies • jest as test-runner • enzyme as renderer • enzyme-to-json as snapshot serializer React 16 Proof
  • 33. How hard is it to start with testing?
  • 34. How hard is it to start with testing?
  • 35. Leverage cross-browser tests for a good night’s sleep.
  • 37. The biggest mistake is not to start.
  • 38. From 0 to 100 How we jump-started our frontend testing @henningmus Doist