Within the mobile app for HotelTonight, our objective is to give our users the best options for booking last minute hotels. The thing is these hotels don't only encompass US options. We also will need to serve users hotel options in other countries. Serving users in other countries means that we need to deal with other time zones. If our market opens at say... 9am for our users, then thats a piece of cake to test manually from a San Francisco users perspective. Its not until you think about 9am local time for a specific user that is not under the pacific time zone scenario when testing this behavior gets a bit complex.
Lets also say that QA is given the task to check whether or not our prospective markets are showing our users hotels when the markets are open, as well as showing the correct message for our users during times when markets are closed. QA will ideally get a list of those cities opening and closing times and then go through the app and check if the app is showing the correct results at the appropriate time in relation to the specific time zone.
As you can imagine this could turn into a tedious process. After all, there are multiple cities on the planet, and there are multiple time zones. The US alone has multiple time zones that would need to be considered. Running through these time zone checks every time market opens to verify that inventory is available everyday for our users can be cumbersome for QA, especially if some of those markets open at 12am, or 1am pacific time!!! This sounds like a great candidate for automation.
How do we implement test automation to tackle this problem? The answer is broken into these steps.
- Gather a list of Major Cities that represent different time zones (Paris, London, New York, San Francisco)
- Determine how to represent the 9am - 2am market open and close window (Relative to where the tests will be running. In this case in the pacific timezone).
- Most importantly, what should the automated tests expect to see during their execution of these behaviors? If the Market is closed, the user needs to see that appropriate message. If the market is open then they better see hotels, or we have a problem!