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.
Let me start with three Memes on Reddit.
2. “stopDoingAsync”
3. “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, JavaScript)
· Why “Async”, “Await”, and “Then” were introduced in E2E Test Automation?
Meaning of Script
Test Scripts is equivalent to Code for App in E2E Test Automation. We call “Scripts” for a good reason.
Definition of Script in Oxford Dictionary in COMPUTING
“an automated series of instructions carried out in a specific order”.
As you can see, the word “script” carries two meanings:
Keep reading with a 7-day free trial
Subscribe to AgileWay’s Test Automation & Continuous Testing Blog to keep reading this post and get 7 days of free access to the full post archives.