Functional Programming in Test Automation
summary
Workshop demonstrates refactoring a Selenium 4 UI test suite (JavaScript/Node.js) for the Juice Shop app into layered, reusable code: actions vs calculations vs data, replacing for-loops with map/filter/reduce, isolating pure functions, and exporting driver-bound action factories so tests stop passing driver everywhere. Demo uses Ramda for piping and shows higher‑order functions, currying, and immutability; tests run end-to-end after refactor and reduce duplicated iteration and argument passing while making business rules (bonus, delivery) easy to change.
AI-written summary · about
chapters (27)
- 0:00Start
- 0:36Introduction about Ourselves
- 1:51Functional Programming Workshop
- 2:52Pure Functions
- 4:54Javascript Functions
- 11:09Written a Function from a Function
- 16:39Summary Recap
- 23:50Sample Application
- 25:54Payment Options
- 26:25Business Case
- 26:36Business Use Case
- 30:17For Loops
- 31:51Add Juices to the Card
- 36:15Higher Order Functions
- 38:58Map Functions
- 39:46Filter Function What Does the Filter Function Does
- 41:23Reduce Function
- 52:09User Defined Libraries
- 52:49Pipe Function
- 58:09Sequence of Operations
- 1:08:21Practices We Need To Follow To Make It a Very Good Functional Programming Style in Your Test Automation Framework
- 1:08:31Separate Out the Business Rules as Functions
- 1:09:04Use the Call Graph
- 1:10:24Keep Data Immutable
- 1:12:09Duplicate Code
- 1:21:27Exporting Card Action Methods
- 1:30:11References
related talks
51mAutomation Testing for React
01h 02mWriting better tests for your JavaScript app
37mFront-end Testing for Skeptics
41mFunctional Tests (Selenium) in Practice
24mWriting Good Tests for Vue Applications
40mSelenium and the Four Rules of Simple Design
45mWriting Tests That Don't Suck: TDD in JavaScript
16mA unit test walks into a bar
