iTransit - Quick tests before release

By xngo on June 22, 2019

Before releasing iTransit to production, the following quick tests need to be performed.

Usage tests

Bus

  • Normal bus line should show schedule for weekday and weekend. Try bus 197.
  • Weekdays bus shouldn't show any schedule over the weekend. Try bus 25.
  • Night bus should show schedule. Try bus 361.

Metro

  • Metro stations should return 2 rows: 1st and last time.
  • Access the last metro station should show message: "No schedule. Exit stop only.".

Favorite

  • Should be able to flag a bus stop or a metro as favorite. And also, unflag them.
  • Should be able to access bus or metro schedule from the Favorite.

Limitation: When you unflagged and hit the back arrow, the bus stop or metro station will still be shown on the list of favorites. For them to be removed, you have to get out and get back in.

SQL tests

Normal bus

SELECT HOUR, minutes
    FROM real_schedules
    WHERE route_id=197 AND stop_code=51755 AND direction_id=0
            AND from_day<=1 AND 1<=to_day ORDER BY HOUR ASC;

Expected

04|  59
05|  31
06|  04  37
07|  11  43
08|  16  45
09|  13  41
10|  11  41
11|  10  39
12|  09  29  49
13|  09  29  50
14|  11  21  31  41  51
15|  01  11  21  31  41  51
16|  01  11  21  31  41  51
17|  01  11  21  31  41  51
18|  00  10  20  30  39  49  59
19|  09  18  28  37  46  56
20|  06  16  25  34  43  53
21|  18  43
22|  08  33
23|  03  35  57
24|  20  47
25|  14

Night bus

SELECT HOUR, minutes
    FROM real_schedules
    WHERE route_id=361 AND stop_code=52846 AND direction_id=0
            AND from_day<=6 AND 6<=to_day ORDER BY HOUR ASC;

Expected

25|  08  18  28  38  43  49  54  59
26|  03  10  17  26  31  36  42  47  52  55  58
27|  01  05  08  12  17  22  28  34  37  44  53
28|  03  13  23  38

Metro

SELECT HOUR, minutes
    FROM real_schedules
    WHERE route_id=4 AND stop_code=10452 AND direction_id=1
            AND from_day<=6 AND 6<=to_day;

Expected Expected 2 rows only: First train and last train time.

05|  32
25|  32

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.