My Article Series
A list of my article series for convenient access
Table of Contents:
· Quick Guide
· How to do X in Selenium WebDriver?
· Courtney’s Appium Series
· Functional Test Refactoring
· Optimize Selenium WebDriver Automated Test Scripts
· Why Do Most UI Test Automation Fail?
· Benefits of Continuous Testing
· IT Terminology Clarified
· Software Design Pattern by Example
· Programming Language Advice
· Be aware of Fake Test Automation/DevOps Engineers
· IT Job Interviews
· Bad Test Automation Frameworks/Tools
· My Innovative Solution to …
· Chinese Idiom Stories for Software Professionals
· Web Test Automation Workbook
· Stories
· E2E Test Automation Anti-Pattern
· What Does it Take to Become a Real E2E Test Automation Engineer?
· Correcting Wrong ‘Playwright’s Advantage over Selenium”
· Laws in Software Development
Quick Guide
- 10-Minute Guide to Git Version Control for Testers
- 10-Minute Guide to Set up Test Automation using Selenium WebDriver with Ruby
- Step by Step showing how to learn to write raw Selenium WebDriver test scripts in minutes
- Set up, Develop Automated UI tests and Run them in a CT server on your First day at work
- Set Up a Continuous Testing Server to Run Selenium Tests in Minutes
How to do X in Selenium WebDriver?
- Test AJAX Properly and Efficiently with Selenium WebDriver, and Avoid ‘Automated Waiting’
- Automated Testing Charts in Selenium WebDriver
- Drive Chrome with Extensions using Selenium WebDriver
- Reloading a Chrome Extension using Selenium WebDriver
- Use Regular Expressions in Test Automation
- Automating Shadow DOM with Selenium WebDriver
- How to avoid hCaptcha with Selenium WebDriver?
- An Unsuccessful Attempt to use OCR to Pass text-based Captcha in Selenium Automated Tests
- Draw on a Canvas using Selenium WebDriver
- Automated Testing QR Codes in Selenium WebDriver
- Automated Testing Frames in Selenium WebDriver
- Testing Emails in Automated Test Scripts with Fake SMTP server: MailCatcher
- Practical DDT: Randomized data scenarios in one automated test script + Continuous Testing
- Automated Testing PDF Download in Selenium WebDriver
- Selenium 4 Chrome DevTools Examples
- Selenium 4 Relative Locator Examples
- Case Study: Simulate Two Users with Selenium Automation Scripts
- Case Study: User Login Tests in Selenium WebDriver
- Case Study: Automated Testing ‘Login with Remember Me’ in Selenium WebDriver
- Case Study: User Change Password Automated Test
- Case Study: User Sign up Automated Test in Selenium WebDriver
- Case Study: User Reset Password via Email in Selenium WebDriver
- Case Study: Locator Chaining in Selenium WebDriver
- Creative Web Automation: Generate Ad-Free Study Notes
- Advice on Self-Learning Test Automation with Selenium WebDriver
- Verify a Dynamic Chart in Selenium WebDriver
- Use Advanced User Interactions in Selenium WebDriver to drive keyboard and mouse
- Interacting with Databases in Automated Functional Test Scripts
- How to Fix “Element is not clickable” in Selenium WebDriver tests?
- Creative Web Automation: Generate User Guide with Automation Script
- Fake Your GeoLocation in Web Test Automation
- Print Style Sheets and Export a Webpage to PDF in Selenium WebDriver
- Automate Input Range Element in Selenium WebDriver
- Responsive Web Testing
- Automated Testing Elements on a Lazy Load Page with Selenium WebDriver
- Select a date in a DatePicker with Selenium WebDriver
- Case Study: Wait for File Download to Complete Safely in Selenium
- Case Study: Automation Script to Extract the Top 10 Authors featured in the Software Testing Newsletters
- Responsiveness Testing with Selenium WebDriver
- How to Drive a Transformed Web Control in Selenium WebDriver?
Courtney’s Appium Series
- Set up Appium 2 to Run XCUITest (for iOS)
- Automate an iOS Tic Tac Toe app with Appium 2 (XCUITest) Part 1: Player vs Player
- Case Study: Image Manipulation in Automated End-to-End Tests
- Automate Windows Calculator (UWP) with Appium 2
- A Brief Introduction to Appium Inspector: Part 1 — Creating Sessions
Functional Test Refactoring
Automated test scripts are often poorly designed, inefficient, and hard to understand and maintain, i.e., the same issues we found in code. Functional Test Refactoring is a process of enhancing the quality of automated functional test scripts.
- Functional Test Refactoring: Introduction
- Functional Test Refactoring: Extract Function
- Functional Test Refactoring: Move to Helper
- Functional Test Refactoring: Move
- Functional Test Refactoring: Extract to Page Function
- Functional Test Refactoring: Introduce to Page Object
- Functional Test Refactoring: Rename
Optimize Selenium WebDriver Automated Test Scripts
Working automated test scripts is only the first test step to successful test automation. As automated tests are executed often and the application changes frequently too, it is important that test scripts need to be fast, easy to maintain and read.
- Optimize Selenium WebDriver Automated Test Scripts: Speed
- Optimize Selenium WebDriver Automated Test Scripts: Maintainability
- Optimize Selenium WebDriver Automated Test Scripts: Readability
Why Do Most UI Test Automation Fail?
FACT: not many software engineers (in Test) received proper education or training in test automation, which is unfortunate. Considering this: 30–40% of staff in a software team are usually testers. Programmers and business analysts spend a lot of time performing functional testing as well. However, there are few dedicated Functional Testing courses offered at universities to my knowledge. Therefore, it is not surprising that many wrong decisions on test automation are made due to a lack of knowledge.
(Technical)
- Wrong choice of automation framework
- Wrong choice of test syntax framework
- Wrong test scripting language
- Wrong choice of test automation tool
- Don’t know how to design easy-to-maintain test scripts
- Lack of Efficiency
- Lack of experience in executing a medium-size regression suite of automated UI tests
(Human)
- Management under-estimate the effort, especially on test maintenance
- Tech leads over-estimate their capability in test automation
- Tech leads are fixated with a particular wrong technologies
- No access to a real Test Automation Coach
Benefits of Continuous Testing
Continuous Testing (enables software teams to push software updates to production daily, not fake CI/CD talks. Check out “Continuous Integration at Facebook” and AgileWay Continuous Testing Grading) is the heart of the software development process. It benefits all stakeholders of a software project.
1. Part 1: to Wise Executives
2. Part 2: to Wise Managers
3. Part 3: to Wise Business Analysts
4. Part 4: to Wise Developers
5. Part 5: to Wise Testers
6. Part 6: to Happy Customers
IT Terminology Clarified
In software development, particularly in software testing, there are many terminologies that are used wrongly by IT professionals.
- Unit Testing Clarified
- User Story Card Clarified
- Regression Testing Clarified
- Cross Browser Testing Clarified
- Headless Browser Testing Clarified
- ‘Data-Driven Testing’ Clarified
- ‘Shift Left Testing’ Clarified
- Continuous Testing Clarified
- Full-Stack Software Engineer Clarified
- Testing Pyramid Clarified
- BDD Clarified: BDD ≠ “Given-When-Then” (Gherkin)
- Codeless Test Automation is Irrational
- “Done, Done” in Agile
- Fake End-to-End Test Automation Clarified
- In-Sprint Test Automation Clarified
- CI/CD (Pipeline) Clarified
- DevOps Clarified
- Test Automation Clarified
- “Release Early, Release Often” Clarified
- Robotic Process Automation (RPA) Clarified
- “Daily Production Releases” Clarified
- Testing Center of Excellence Clarified
- Code Commenting Clarified
- Side Hustle Clarified
- Why I don’t use Test Management Tools at all?
- Execution Speed of Automated End-to-End (via UI) Testing Clarified
- Expose a Common Lie, “Selenium is Flaky”, Part 2: Clarify ‘automated waiting’
- Record/Playback in Test Automation is Bad, mostly
- Correct a Common Misconception: “Using the Coding Language for End-to-End Test Automation”
- Correct two Common Misconceptions: End-to-End Test Automation is “Simple and Easy” or “Complex and Impossible”.
- Correct a Common Misconception: “Setting up Selenium is Complex and Time-Consuming” with a benchmark test.
- User Acceptance Testing Clarified
- Auto-Waiting in Web Test Automation Clarified
- Three Types of Efforts in E2E (UI) Test Automation Clarified
Software Design Pattern by Example
Design Patterns are good practices of Object-Oriented (OO) Software Design. Applying appropriate design patterns will help to design your software better. However, design patterns are not easy to master, it was the case for me, and my daughter as well when she started an IT degree at Uni. I wrote a series of articles to help her learn Design Patterns quickly. My approach is to use easy-to-understand exercises, which I believe is an easier way to master design patterns.
- Software Design Pattern By Example: Singleton
- Software Design Pattern By Example: Strategy
- Software Design Pattern By Example: Template Method
Programming Language Advice
- Programming Language Advice to My Daughter, Part 1: Ruby
- Programming Language Advice to My Daughter, Part 2: C++
- Programming Language Advice to My Daughter, Part 3: Java
- Programming Language Advice to My Daughter, Part 4: Shell Script
- Programming Language Advice to My Daughter, Part 5: Others
Be aware of Fake Test Automation/DevOps Engineers
- Be aware of the “fake it until you make it” mindset in Test Automation and CI/CD
- Fake End-to-End Test Automation Clarified
- Selenium vs X, Y, Z, …, all these years
- False ‘Selenium WebDriver Cons’
- Evil Mudslingings against Selenium WebDriver
- Crazy Web Test Automation: “Freedom Is Slavery”
- Estimating Test Automation Story Points is a Total Waste of Time
- Protractor, another Automation Framework I rightly avoided, is being Deprecated
- Why Recording Videos for Automated Test Execution in Test Scripts is Wrong?
- Why is Object Identification GUI Utility in Test Automation Unnecessary?
- Why Gherkin (Cucumber, SpecFlow,…) Always Failed with UI Test Automation?
- Why Cypress sucks for real test automation? (Part 1)
- Why JavaScript Is Not a Suitable Language for Real Web Test Automation?
- Fake Code Review with ‘LGTM’
- Four Screening Questions to Filter Out Fake Test Automation Engineers in Interviews
- One Test Automation Scenario Interview Question that Most Candidates Failed
- CIO’s Agile/DevOps: The Emperor’s New Clothes
IT Job Interviews
- Four Screening Questions to Filter Out Fake Test Automation Engineers in Interviews
- One Test Automation Scenario Interview Question that Most Candidates Failed
- Case Study: User Change Password Automated Test
- Agile Project Management: You Cannot Lower the Quality
(filter out incompetent software managers, fake agile coaches/scrum masters) - My secret of near 100% interview success on Test Automation Engineer roles
- Practical Advice for Hiring a Junior Test Automation Engineer
- Software Engineer Choices: Permanent Employee vs Contractor vs Micro-ISV, Part 1: Employee
Bad Test Automation Frameworks/Tools
- Why Cypress sucks for real test automation? (Part 1)
- Why Cypress Sucks for Real Test Automation? (Part 2: Limitations)
- Why Gherkin (Cucumber, SpecFlow,…) Always Failed with UI Test Automation?
- Protractor, another Automation Framework I rightly avoided, is being Deprecated
- Cypress vs Selenium WebDriver Comparison by Example
My Innovative Solution to …
- Test Automation: Keep the Browser Open after Executing an Individual Test
- Test Automation: ‘The Simpsons’ Data Reset Pattern
- Test Automation: Run the same test against a different browser with a click of a button
- Test Automation: Run the same test against a different server with a click of a button
- Software Development: Versioned Database Migration
- Test Automation: TestWise IDE
- Load Testing: Run Selenium Tests (real browser) in a CT Server with Parallel Execution for better Load Testing
- Test Automation: Easy Wait in test scripts
- Test Automation: Debug Automated E2E Web Test Scripts Intuitively and Proficiently
- Test Automation: Functional Test Refactoring
- Test Automation: Attach test execution to the existing browser
- Continuous Cross Browser Testing
- Continuous Testing: Let Business Analysts Self-help Create Data in a BuildWise CT Server
- Continuous Testing: Parallel Automated End-to-End Test Execution
- Continuous Testing: Dynamic Ordering
- Continuous Testing: Auto-Retry
- Continuous Testing: Manual-Rerun
- Continuous Testing: BuildWise Server and Agents
- Continuous Testing: Delay Completion
- Continuous Testing: Invoke test execution from the browser, even with parameters
- Continuous Testing: Quick Navigation to failed test line (from CT to Testing IDE)
- Agile: User Story Printing
- Software Development: Generating Requirement Traceability
- Continuous Testing: Build notifications with Lava Lamps
- Agile: Automation-Assisted Showcase
- My Simple Approach to App Health Check with Automation
Chinese Idiom Stories for Software Professionals
Using Chinese idioms to explain some of the problems I have witnessed in the software industry (in particular, test automation and continuous testing) ”. Chinese idioms are insightful and often with interesting stories. Human nature has changed little, and these Chinese idioms stand the test of time (over 1000 years).
- #1 Seven-Step Poem (七步詩)
- #2 Lord Ye Loves Dragon (葉公好龍)
- #3 Imitating Beauty (东施效颦)
- #4 To win a war with words (纸上谈兵)
- #5 Practice makes perfect (熟能生巧)
- #6 A quiet man of sincerity attracts admiration (桃李不言,下自成蹊)
- #7 Be There Just to Make Up the Number (滥竽充数)
- #8 Cutting a Mark on the Boat to Find the Sword (刻舟求剑)
- #9 Covering One’s Ears to Steal a Bell (掩耳盗铃)
- #10 Self-Contradictory (自相矛盾)
- #11 Pulling Up the Seedlings to Help Them Grow(拔苗助长)
- #12 Learning to Walk in Handan (邯郸学步)
- #13 Buying the Case but Returning the Pearl (买椟还珠)
- #14 Waiting for Hares by the Tree(守株待兔)
- #15 Those Who Flee 50 Steps Laugh at Those Who Flee 100 Steps(五十步笑百步)
- #16 Complementing Each Other (相辅相成)
- #17 It is never too late to mend (亡羊补牢)
- #18 The Measurements Are More Reliable! (愚人買鞋)
- #19 Paying a Handsome Price For A Swift Steed (千金買死馬)
- #20 Opposite effect to one’s intention (南辕北辙)
- #21 Prevention is Better (扁鹊三兄弟)
- #22 A Good Neighbour worths a Thousand Silver Coins(千金买邻)
- #23 Calling A Stag A Horse (指鹿为马)
- #24 To Draw a Snake with Feet 画蛇添足
- #25 Blind Men Feeling an Elephant盲人摸象
- #26 Skilled and Magical Craftsmanship (庖丁解牛)
- #27 Trim the Toes to Fit the Shoes 削足适履
- #28 Climb a tree to Catch fish (缘木求鱼)
- #29 Look for a Steed by Book (按图索骥)
- #30 To give up halfway (半途而废)
- #31 Carrying Firewood to Put Out a Fire (抱薪救火)
- #32 One is willing to punish; the other is willing to accept 周瑜打黄盖,一个愿打,一个愿挨
- #33 The More, The Better 多多益善
- #35 A bird startled by the mere twang of a bowstring (惊弓之鸟)
Web Test Automation Workbook
Welcome to Learning Web Test Automation with short and purposeful exercises, no tech background is required at all. An exercise typically takes 15–20 minutes.
(Bold ones: published, italic and underlined: soon will be published)
- #01 Hello Web Test Automation
- #02: Web Test Automation Simplified
- #03: Introduction to Selenium WebDriver
- #04: User Sign in OK Test
- #05: Multi-Login Tests (RSpec Test Syntax Framework)
- #06: The second test: Failed to sign in (tips for productivity)
- #07: Running a test script file vs Running an individual test case
- #08: Select Oneway Flight
- #09: Select Return Flight
- #10 Enter Passenger Names
- #11: Execution Tests in Tools and from Command Line
- #12: AJAX Test: Agile Travel Payment
- #13: Sony Playstation Login Test
- #14 Testing Page with iFrames
- #15: Refactor AgileTravel User Login Test (extract function)
- #16: Refactor AgileTravel User Login Test (move to helper)
- #17: Refactor Move test steps into Rspec hooks
- #18: Software Environments and Cross-Browser Testing
- #19: Refactor WhenWise Login Tests (extract function and move helper)
- #20: Refactor AgileTravel Tests (extract to page Function)
- #21: Refactor Agile Travel Tests (introduce page object)
- #22: CRUD WhenWise Professional Tests
- #23: CRUD WhenWise Professional Tests Refinement
- #24 Dynamic Test data for WhenWise Create Professional Test
- #25 File Upload Test
- #26: WhenWise Create Client Test
- #27: WhenWise CRUD Client Tests
- #28: WhenWise CRUD Client Tests (Refactored)
- #29: WhenWise Find Client Test
- #30: WhenWise Client Sorting Tests
- #31: Review: WhenWise CRUD Service Tests
- #32: WhenWise Search Test
- #33: WhenWise Client Membership Test
- #34: WhenWise Create Non-Time-Based Service Test (Transformed Controls)
- #35: Verify Available Time Slots
- #36: Change Available Time Slots
- (haven’t converted one-on-one training to writing yet, if you are keen, leave a message here)
- #37: WhenWise Client Make Booking Test
- #38: WhenWise Business View Booking Test
- #39 Responsive Web Testing
- #41: Create an Appointment in Calendar
- #42: Create a Multi-Slot Appointment in Calendar
- #43: Business Create Booking in Calendar
- #44: Move Appointment & Assert Background Color in Calendar
- #45: Shopping Cart
- #46: Create Client Invoice (inline-edit testing)
- #47: Print Invoice (file download)
- #48: Verify PDF Content
Stories
- Story: An IT Graduate’s frustration with a Fake ‘Senior Test Automation Engineer’
- Story: A Former Mentee Failed Test Automation with Protractor
- Story: “What is the Most Challenging in E2E Test Automation?”
- An Unbelievable True Story: People’s Fixation on an Obviously Failed “Self-Created” Test Automation Framework
- A Good Software Testing Culture Can be Easily Broken
- A Story: Principal Software Engineer Undermines E2E Test Automation
- A Story of a Veteran Manual Tester’s Learning Test Automation from a Coach: “One Question per Day”
- A Story of ~Unit, a Failed Developer-Created E2E Automation Framework I Witnessed
E2E Test Automation Anti-Pattern
- node_modules and package.json or alike
- Semi-Automated Execution
- Using Developers-Coded Utility For Preparing Test Data
- Developer-Focused Approach. Part 1: It is Black-Box Testing!
- Developer-Focused Approach. Part 2: Scripting Language, Frameworks and Tools
- Developer-Focused Approach. Part 3: Most Developers Lack Proficiency in Test Automation
- Design a new test “framework”
- Headless Browser Testing
- BDD with a Gherkin syntax framework
- Prioritizing tests
- Create test scripts using a recorder
- Run the suite in the testing tool, or not run it often as regression testing
- Run the test suite in a traditional CI server
What Does it Take to Become a Real E2E Test Automation Engineer?
- Part 1: Broad Knowledge (A, B, C)
- Part 2: Willing to Learn
- Part 3: Willing to Invest in Self’s Growth
- Part 4: Willing to do Hands-on work, a lot of Hands-on work
- Part 5: Integrity
Correcting Wrong ‘Playwright’s Advantage over Selenium”
- “Playwright is Modern and Faster than Selenium” 😒
- “Playwright has Parallel Execution Support” 👎🏽
- “Playwright has Native Auto-Waiting Mechanism” 👎🏽
- “Playwright has a native test runner” 👎🏽 (coming soon)
- “Playwright has native HTML Reporters” 👎🏽
- “Playwright Features Can be Configured in one Configuration” 👎🏽
- “Playwright supports a range of Testing Types, e.g. API Testing, Component Testing, …” 👎🏽
- “Playwright ARIA locator support” 👎🏽
- “Playwright UI Mode, CodeGen, Debugging support.” 👎🏽
Laws in Software Development
- 80/20 Rule
- Broken Window Theory
- Parkinson’s Law: “work expands so as to fill the time available for its completion”
- Sturgeon’s law: “ninety percent of everything is crap”
- Murphy’s law: “Anything that can go wrong will go wrong”
- The 10,000-Hour Rule: “The key to achieving true expertise is simply a matter of practicing”
- Brooks’ Law: “Adding manpower to a late project makes it later.”
- KISS Principle: “Keep it Simple, Stupid”
- Hosftadter’s Law: “It always takes longer than you expect, even when you take into account Hofstadter’s Law.”
- Conway’s Law: “Any piece of software reflects the organizational structure that produced it.”
- Linus’s Law: “given enough eyeballs, all bugs are shallow”
- Wirth’s Law: “Software gets slower faster than hardware gets faster”
- Ninety-Ninety Rule: “The first 90% of the code takes 10% of the time. The remaining 10% takes the other 90% of the time”
- KNUTH’S OPTIMIZATION PRINCIPLE: “Premature optimization is the root of all evil”.
- Goodhart’s Law: “When a measure becomes a target, it ceases to be a good measure.”
- Kernighan’s Law: “Debugging is twice as hard as writing the code in the first place”
- Gall’s Law: “A complex system that works has evolved from a simple system that worked. A complex system built from scratch won’t work.”
- Doerr’s Law: “We need teams of missionaries, not teams of mercenaries”
- Choose Boring Technology: “Consider how you would solve your immediate problem without adding anything new”
- Questioning “If It Ain’t Broke, Don’t Fix It” in Software Development
Software Side Hustle Anti-Pattern
- Creating Something You Wouldn’t Use Daily
- Get the first customer too late, and Assume adding the second customer is easy
- Use the same tech stack as day-time work
- No E2E Test Automation