It is Wrong to Have Await and Promises in E2E Automated Test Scripts

It is only meaningful for JavaScript Developers, not E2E testers and end-users.

Zhimin Zhan
5 min readFeb 26, 2024

--

Let me start with three Memes on Reddit.

  1. asyncButlet
with over 6.6K ++

2. “stopDoingAsync

with 5.3K ++

3. “coroutines

https://www.reddit.com/r/ProgrammerHumor/comments/16tc6qn/coroutines/

I can program JavaScript and understand the uses for async , promises and await . But those reasons (good or bad) are only valid in the scope of coding (web) apps. It is wrong to introduce them into E2E Test Automation.

Table of Contents:
·
Meaning of Script
·
E2E Test Scripts reflect an end-user’s operations
Automated Test Script (Selenium + Rspec, Ruby)
Automated Test Script using await (Playwright Test, JavaScript)
Automated Test Script using Promise (Selenium + Mocha

--

--

Zhimin Zhan

Test automation & CT coach, author, speaker and award-winning software developer. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.