A Few Simple Automated Tests with High Probability to Expose App Defects
Uncover Bugs Quickly with Automated Tests.
In this article, I will cover a few simple automated tests that can help uncover some common defects.
1. Dates Across Timezones
Timezone conversion is always tricky. I once worked on a project where we wanted to display data in local time, but were calculating the date using UTC time instead. Meaning that if you entered data in the morning (before midnight in UTC time), it saved it as “yesterday”! Since we mostly worked in the afternoon, this issue was undetected for a few weeks.
For a timezone test, try testing before and after UTC midnight. For example, in Queensland, we are UTC+10, so perform a test before this time (e.g. 9 am), then after the new UTC day starts (e.g. 10:30 am).
You don’t need to write two separate tests; instead, I recommend making sure you have a convenient way to run your tests frequently enough that they can be run before and after (e.g. a CT server such as BuildWise).
Bonus Test — Daylight Savings
An even more difficult timezone test is related to day light savings.
2. Testing Next Day Operation at the end of a Month
This test is mostly for apps that use calendars. For example, take a look at the calendars in the WhenWise app below.

The next day operation changes from calendar to calendar.
Some calendar changes require you to move to the “next month” before you can click the next day.
Not all months have the same number of days (30/31), and even more confusingly, February sometimes has a leap day depending on the year.
It is common that developers only test the next-day operations in the current month, not considering other months. Automated UI tests serve as regression testing, i.e., run frequently. It might help you detect calendar issues when running in the coming months.
It might be tricky to develop a reliable automated test script that works for all scenarios, so beware.
3. Enter Emoji Text
The rationale: Emoji characters are Unicode.
Try entering text with emoji characters into a text form and submitting it.
If the app’s database (e.g. MySQL) is created with the default encoding, an attempt to save the text will fail and return an error like below:
1366 Incorrect string value: '\xF0\x9F\x98\x83\xF0\x9F...' for column 'comment' at row 1
Solution (for developers):
Change the database default collation as
utf8mb4
.Change the table collation as
CHARACTER SET utf8mb4 COLLATE utf8mb4_bin
.
Check out this post on Stack Overflow for tips on saving emoji characters.
Related reading: