Showcase a 500+ End-to-End (via UI) Test Suite: E2E Test Automation is Surely Feasible for Large/Complex Apps. Part B: WhenWise is a feature-rich web app, its automated E2E testing is NOT trivial
A few components of WhenWise and its E2E testing.
Continuing from Part A. After presenting the test statistics, I will demonstrate that WhenWhse is a feature-rich web app and that its automated end-to-end testing is not trivial.
A few WhenWise Features and its E2E Testing
Below, I just quickly show a few components of WhenWise and its E2E testing.
1. User Authentication related
WhenWise supports sign-up and login with Facebook and Google accounts. For testing, two seeded users (Facebook and Google) were used to emulate sign-up/sign-in with Facebook/Google.
Of course, there are usual E2E tests:
User Sign-up with email verification
Tip: Use a Fake SMTP Server such as MailCatcher to verify emails.Change password, Change User Profile, …
Verify access privileges
Don’t underestimate those common tests (which almost universally existed tests for any web app), the majority of so-called ‘automated testers’ got it wrong, i.e., flaky tests.
Check out my most-liked article on Medium, One Simple Test Automation Scenario Interview Question that Most Candidates Failed. In other words, every so-called automated tester and senior test automation engineer I interviewed, lacked a basic understanding of real test automation, even this simple test they designed was flaky. (in real work, they often blame the framework)
2. Client Booking (one on one)
A client finds a business and makes a booking (on mobile, iPad or PC).
Readers with coding experience would know, this is a highly-dynamic page, and utilize a lot of JavaScript. Of course, there are many E2E test cases created for this feature. How did I make E2E tests (for dynamic) not flaky at all? Not auto-waiting (which can still cause flakiness), check out my article, Test AJAX Properly and Efficiently with Selenium WebDriver, and Avoid ‘Automated Waiting’
Please note, the screenshot shows a booking for driving school, so there are custom data such as Car type and Pickup address (with Google map validation). Yes, because of the WhenWise E2E regression suite, I am free to customize our booking screen to suit different business types.
Besides one-on-one booking, there is another booking type: Group Lesson (for Yoga classes alike), which offers a completely different booking screen and business logic.
Experienced developers would know that is not easy to get two business flows into one. The E2E tests prevent many regression issues.
3. Business Manage Booking on Calendar
A business user views and manages bookings on the calendar.
As you can imagine, there are numerous features here, which means a variety of E2E tests, including those for actions like move, delete, adjust, filter by professionals, switch between different views, and more.
Calendar testing is often considered flaky—why is that? The test data is highly dependent on the execution time. For example, yesterday’s "tomorrow" is not the same as today’s "tomorrow." When designing my tests, I paid meticulous attention to this issue to ensure they remain 100% reliable, regardless of when they are executed—whether it’s morning, Monday, Sunday, the end of the month, or during timezone changes. You get the idea: without the right skills and effort, these tests can easily become flaky.
Here is the interface to create an internal event or booking (if the client management module is enabled) on WhenWise.
The modal is highly dynamic, again, a lot of E2E tests here to provide the safety net.
4. Business Settings
A quick way to gauge the number of features an app offers is by looking at its settings page. WhenWise, for example, provides a wide range of business settings.
Each setting leads to one or more E2E tests.
5. Customer Payment
In addition to the free plan, WhenWise offers two paid customer plans.
Accept credit card payment (via Stripe):
Stripe has a testing mode, my E2E tests utilize that.
Besides the pre-defined plans, customers can purchase extra add-ons for $1 per resource per month.
This means many business features, thus, very good E2E Test coverage for them, too.
Further reading: