end-to-end (e2e) testing at chroma
TRANSCRIPT
END TO END TESTING - NIGHTWATCHJS
WWW.CHROMASPORTS.COM
Author: Chroma
Nightwatch.jsEnd-to-End (E2E) at CHROMA
END TO END TESTING - WHAT DO WE MEAN BY TESTING?
WWW.CHROMASPORTS.COM
Author: Chroma
UNIT TESTING● methods/functions
INTEGRATION TESTING● components/modules
PENETRATION TESTING● Complete System
LOAD TESTING● Complete System
E2E TESTING● Web browser● As and end user● Complete System
END TO END TESTING - WHY DO WE NEED E2E TESTING?
WWW.CHROMASPORTS.COM
Author: Chroma
OBJECTIVES
1. Continuous Integration: => Push to production daily
2. No Dedicated QA resources as part of the scrum team
3. Release must not break user flows
END TO END TESTING - WORKFLOW
WWW.CHROMASPORTS.COM
Author: Chroma
INSTALL
● Add nightwatch npm package to your front-end repository
CREATE A TEST
● E2E test is part of “Done”, create a test for each user story
RUN THE TEST
● Make sure “npm test” is added to the build script
END TO END TESTING - NIGHTWATCHJS
WWW.CHROMASPORTS.COM
Author: Chroma
ABOUTNightwatch.js is an automated testing framework for web applications and websites, written in Node.js and using the W3C WebDriver API (formerly Selenium WebDriver). It is a complete browser (End-to-End) testing solution which aims to simplify the process of setting up Continuous Integration and writing automated tests.
END TO END TESTING - NIGHTWATCHJS
WWW.CHROMASPORTS.COM
Author: Chroma
WHY
Best E2E testing framework for Javascript developers
Rich community, actively supported
Easy to get started
END TO END TESTING - WORKFLOW
WWW.CHROMASPORTS.COM
Author: Chroma
KEY PRINCIPLES
● Easy to install & maintain(npm install chroma-
nightwatch)
● Don’t repeat yourself(page objects)
● Use unique html identifiers
END TO END TESTING - LET’S GET SOME CODING DONE!
WWW.CHROMASPORTS.COM
Author: Chroma
1) npm install chroma-nightwatch
2) npm test
3) The tests are failing, let’s fix them