wiki:LCS_specification

Version 27 (modified by jdalbey, 6 years ago) (diff)

elaborate status form

Lane Closure System Simulator

Functional Specification

The LCS Simulator is intended to provide TMC Academy students practice at creating an emergency lane closure and documenting changes to the status of a lane closure and notifying the responsible person. In the real-world LCS, creating a lane closure creates new icons on QuickMap.

This document will reference the User Interface Prototype extensively.

  1. Login

The login page has a single text field for the user to enter their username and a Submit button. The submit button validates that the text field is not empty and then opens the Home page.

  1. Home

The home page displays message of the day (static fields). There are only two actions that can be taken from here: Search or Request.

  1. Request

A new lane closure is created by submitting a request form. The fields in this form are shown in the UI Prototype. Required fields are marked with an asterisk. Upon submittal the system generates a new closureID and displays a popup dialog with an acknowledgement and the form is reset.

The new closure ID is created in the following format: The uppercase letter "T" (indicating temporary/emergency closure), followed by the highway (route) number, followed by a two letter sequence code that starts with "AA". A log number is also required, a sequential integer starting at 1. There is a pair of Yes/No? radio buttons on the form labeled "Is this an existing incident" which is defaulted to Yes, indicating this requires a new log number (increment by 1) for the closure specified by the drop down box. If No is selected than a new closure ID is created.

  1. Search

The user will usually be provided a closure ID from someone in the field who calls in a request to update a closure. If only the closure ID is provided for the search, it should return all associated log numbers. If both closure ID and log number are provided, return just that specific item.

Any combination of criteria can be provided, include just a start date or just an end date. If a start date is provided, return all closures scheduled ON or AFTER that date. If an end date is provided, return all closures with enddate that are ON or BEFORE the provided enddate. If both start and end dates are provided, return all closures scheduled BETWEEN those dates (that is, with startdate that are ON or AFTER the provided startdate AND enddate that are ON or BEFORE the provided enddate).

  1. Search Results

The results page lists the closures that match the supplied search criteria. The Radio Call number is not part of the initial Request. A separate static lookup table is referenced to find the supervisor name and their radio call number. The "Limits" column is the begin and end location. "Work Description" is the Type of Work field. To view details, one or more checkboxes may be selected from left column, then click Status History or Status Form to see the corresponding details.

  1. Status Form

When the Status Form button is clicked, a new page appear with that search result and an extra column that contains a form to update the status of the closure. The form shows radio buttons to choose 1097, 1098, or 1022 and a text field labeled "Statuser".  When the Submit Status Form button is clicked, the closure info is updated with the data from the status form, an acknowledgement message is displayed, and the Search Results page is displayed.  Note that if one of the three items has previously been chosen it will appear disabled.

  1. Status History

A display of the status history for one or more selected closures. The status history has one to three rows, for possible events 1097, 1022, and 1098. REQ DATE is the start/end time of the original request. STATUS DATE is the time when the a status update happened (obtained from the status form above). USER is the value from the "Statuser" field of the status form.

Data Dictionary

All fields in this dictionary are strings, since there are no arithmetic computations required.

closureid - a unique identifier for each closure, format described above.

lognum - a subordinate sequence number.

route - highway number

direction - traffic direction, see options in combobox.

facility - what part of the roadway is affected, see options in combobox.

startdate - calendar date when the closure will begin. The user enters MMDDYYYY but the value stored in the database must be YYYYMMDD.

enddate - calendar date when the closure ends. The user enters MMDDYYYY but the value stored in the database must be YYYYMMDD.

starttime - time of day on the start date when the closure begins. Format: HHMM (military time)

endtime - time of day on the end date when the closure ends. Format: HHMM (military time)

startcounty - County in which the closure starts. For now, Orange county is the only option.

endcounty - County in which the closure ends. For now, Orange county is the only option.

startlocation - Cross street used to identify location of the closure. The options in the drop down are obtained from the postmile book. It would be nice if the drop down was smart enough to only display cross streets on the selected route.

endlocation - same as above. closuretype - see options in combobox.

worktype - see options in combobox.

estdelay - estimated number of minutes of delay caused by the closure. (How long drivers have to wait).

tmpcozeep - yes or no

tmpdetour - yes or no

supervisor - see options in combobox. obtained from callout map.

fieldrep - same as above.

meetingplace - optional, free format field.

reason - optional, free format field.

remarks - optional, free format field.

The remaining fields are for values from the status form.

s1097date s1097time s1097user s1097phone s1098date s1098time s1098user s1098phone s1022date s1022time s1022user s1022phone

Test Strategy

See Reference:  Equivalence Classes

Valid Equivalence Classes

V1: closureid not empty, all others empty

V2: closureid, log num not empty, all others empty

V3: route not empty, all others empty

V4: direction not empty, all others empty

V5: start date not empty, all others empty

V6: end date not empty, all others empty

V7: start date not empty, end date not empty, all others empty

Invalid Equivalence Classes

X2: log num not empty, closureid empty

Boundary Value Analysis

Given a closure with a start date of Jan 2, 2020 and end date of Jan 5, 2020 provide input data of

  1. Jan1
  2. Jan2
  3. Jan 3
  4. Jan4
  5. Jan5
  6. Jan 6

Branch Testing

Since search by any combination of fields is allowed, for exhaustive testing we would do each of the 7 classes above in combination with the others, but that would require 7! = 5040 tests. To simplify, we will provide tests for each field included in one combination with some other field.

  1. ClosureID and log number (Note that in general use when a closure id and log number are provided the other fields will NOT be provided because closure id/log number specifies a unique closure.)
  1. route and direction (Note that in general use direction won't be provided without a route, though it is legal to do so.)
  1. route and start date
  1. route and end date
  1. route and start date and end date

For each of the above cases, we want a search that succeeds and a search that finds no results.

Test Plan

Test Setup

  • From the database folder of the LCSv1 web2py application directory. Run the following command to start sqlite3 command line.
    $ sqlite3 storage.sqlite 
    
  • Clear the data in closures table in sqlite3 using the command
    >> delete from closures; 
    
  • Download the attached file search_test_data.csv and place it under the database folder in LCSv1 web2py application directory.
  • From the database folder, run the following command to import the testing data.
    >> .mode csv
    >> .import search_test_data.csv closures 
    
  • Run the following command to confirm the data is imported correctly.
    >> select * from closures; 
    
    It should have all the entries from id 63 to 71 ( 9 entries total)
  • Run the LCSv1 web2py application and open the search page on the browser.
  • Start testing according to the test cases in the Test Case Table below. Check if the search returns the correct entries.


Database Records

Example of the closures database:

closures.id,closures.closureid,closures.lognum,closures.route,closures.direction,closures.facility,closures.startdate,closures.enddate,closures.starttime,closures.endtime,closures.startcounty,closures.endcounty,closures.startlocation,closures.endlocation,closures.closuretype,closures.worktype,closures.estdelay,closures.tmpcozeep,closures.tmpdetour,closures.supervisor,closures.fieldrep,closures.meetingplace,closures.reason,closures.reHAL COTAs,closures.s1097date,closures.s1097time,closures.s1097user,closures.s1097phone,closures.s1098date,closures.s1098time,closures.s1098user,closures.s1098phone,closures.s1022date,closures.s1022time,closures.s1022user,closures.s1022phone
63,T5AA,1,5,NB,Mainline,2020-01-01,2020-01-02,0800,0900,ORA,ORA,BAKER,BRISTOL,Lane,AC Paving,66,NO,NO,JORGE MEJIA,,,,,20200320,1609,JORGE MEJIA,,2020-03-19,1420,APRIL MAY,,2020-03-19,1421,JORGE MEJIA,
64,T405AA,1,405,NB,Mainline,2020-02-02,2020-03-02,0800,1700,ORA,ORA,BAKER,BRISTOL,Lane,AC Paving,33,NO,NO,JORGE MEJIA,,,,,20200319,1618,JOEL ARRIA,,2020-03-19,1358,JORGE MEJIA,,2020-03-19,1417,ORALIA MENDEZ,
65,T5AB,1,5,SB,Mainline,2019-01-22,2019-01-25,0800,1700,ORA,ORA,BAKER,BRISTOL,Lane,AC Paving,33,NO,NO,JOEL ARRIA,,,,,2020-03-19,1105,,,,,,,,,,
66,T22AA,1,22,NB,Mainline,2000-01-01,2000-10-10,0800,1700,ORA,ORA,BAKER,BRISTOL,Lane,AC Paving,33,NO,NO,APRIL MAY,,,,,,,,,,,,,,,,
67,T22BB,1,22,WB,Mainline,2000-01-01,2000-10-10,0800,1700,ORA,ORA,BAKER,BRISTOL,Lane,AC Paving,33,NO,NO,APRIL MAY,,,,,,,,,,,,,,,,
68,T55AA,1,55,NB,Off Ramp,2000-10-11,2000-10-11,0800,0900,ORA,ORA,BAKER,BRISTOL,Lane,Blasting,22,YES,NO,JOEL ARRIA,,,,,20200319,1616,JOEL ARRIA,,,,,,,,,
69,T73AA,1,73,WB,Mainline,2020-03-18,2020-03-19,0800,0900,ORA,,First,Second,Full,Blasting,66,,,JOEL ARRIA,,,,,,,,,,,,,,,,
70,T1AA,1,1,SB,Mainline,2020-03-02,2020-03-26,0700,1700,ORA,ORA,AVOCADO AVE,LOS TRANCOS,Lane,Bridge Inspection,70,NO,NO,HAL COTA,,,,,20200320,1617,JOEL ARRIA,,,,,,,,,
71,T55AB,1,5,SB,Rest Area,2020-04-01,2020-05-01,0330,1000,ORA,ORA,EL CAMINO REAL,MAGDALENA,Full,AC Paving,35,NO,NO,APRIL MAY,HAL COTA,,,,,,,,,,,,,,,
72,T11AB,5,1,NB,Mainline,2020-03-01,2020-03-15,0500,0600,ORA,ORA,BAKER,BRISTOL,Lane,AC Paving,40,NO,NO,JOEL ARRIA,HAL COTA,,,,,,,,,,,,,,,


Test Case Table

Test Case Description Search Input Expected Search Results (closures.id)
1a closureid not empty, all others empty closureid = "T55AA" 63
1b closuredid = "T4AB" None
2a closureid + lognum not empty, all others empty closureid = "T2AA", lognum = 1 66
2b closureid = "T2AA", lognum = 6 None
3a route not empty, all others empty route = 22 66, 67
3b route = 261 None
4a direction not empty, all others empty direction = "SB" 65, 70, 71
4b direction = "EB" None
5a startdate not empty, all others empty startdate = "2020-03-17" 69, 71
5b startdate = "2020-04-02" None
6a enddate not empty, all others empty enddate = "2019-12-31" 65, 66, 67, 68
6b endate = "1999-07-13" None
7a startdate + enddate not empty, all others empty startdate = "2000-01-01", enddate = "2000-12-24" 66, 67, 68
7b startdate = "2020-05-01", enddate = "2020-08-22" None
8a route + direction not empty, all others empty route = 5, direction = "SB" 65, 71
8b route = 73, direction = "NB" None
9a route + startdate not empty, all others empty route = 1, startdate = "2020-03-02" 70
9b route = 1, startdate = "2020-04-02" None
10a route + enddate not empty, all others empty route = 405, enddate = "2020-02-10" 64
10b route = 405, enddate = "2020-01-30" None
11a route + startdate + enddate not empty, all others empty route = 5, startdate = "2019-11-26", enddate = "2020-04-15" 63, 71
11b route = 5, startdate = "2020-05-01", enddate = "2020-05-30" None
12a startdate + enddate not empty, all others empty startdate = "2020-03-01", enddate = "2020-03-30" 69, 70, 72
12b startdate = "1999-12-01", enddate = "1999-12-31" None
13a direction + startdate not empty, all others empty direction = "NB", startdate = "2020-03-01" 72
13b direction = "NB", startdate = "2020-04-29" None
14a direction + enddate not empty, all others empty direction = "NB", enddate = "2000-11-07" 66, 68
14b direction = "SB", enddate = "2018-06-13" None
15a direction + startdate + enddate not empty, all others empty direction = "NB", startdate = "2020-01-01", enddate = "2020-02-03" 63, 64
15b direction = "SB", startdate = "2017-04-19" , enddate = "2018-05-21" None
16 lognum not empty, closureid empty and others empty lognum = 4 Error: Invalid search

Boundary Value Analysis

Test Case Description Search Input Do Search Results include T5AB?
17a before lower bound startdate = "2019-01-21" Yes
17b at lower bound startdate = "2019-01-22" Yes
17c after lower bound startdate = "2019-01-23" No
17d before upper bound enddate = "2019-01-26" Yes
17e at upper bound enddate= "2019-01-25" Yes
17f after upper bound enddate= "2019-01-24" No

Attachments