Skip to content

Test Planning

Sirapob Phasut edited this page Apr 18, 2025 · 22 revisions

Objective

The test is to find and identify functional errors in the implementation of the API endpoint, function, and UI Component. It is to ensure that the application satisfies its functional requirements.

Scope of Testing

API Endpoints:

  • /count,/count/<vehicle_type> Predict the number of vehicles on the road: tests for return data structure and error handling
  • /flow Predicts traffic flow on the road: tests for return data structure and error handling
  • /desc/* Obtain the data from the database and process for descriptive statistics: tests for return data structure.

Web UI

  • Verify that the Chart visualization is rendered and that the data is correctly fetched.
  • Verify that all choices for the API exploration form are correct
    • Option for vehicle type
    • Option for time
    • Option for Weather Condition
  • Verify that the frontend can call the Backend server correctly

Unit Testing

  • Unit Test implemented to verify correctness of individual functions on both frontend and backend, of which focus on internal logic.

Frontend Pre-processing Logic:

  • Verify that the frontend can generate the time option correctly
  • Verify that the frontend can generate color for the chart without duplication and with the correct number of colors
  • Verify that the frontend can format time from the option to the RFC3339 format with GMT + 7

Test Scenarios

Web UI

Home Page

  • Users view the line chart to see traffic flow and vehicle counts over time.
  • Users view the pie chart to see the distribution of different weather conditions

Explore Page

  • Users select the time in the exploration form.
    • UI_ExplorePage_01 - Verify that the selectable times are correct
    • UI_ExplorePage_02 - Verify that the Time shown on the card changes when the user chooses it from the combobox
  • Users select the weather condition in the exploration form.
    • UI_ExplorePage_03 - Verify that the selectable weather conditions are correct
    • UI_ExplorePage_04 - Verify that the Weather shown on the card changes when the user chooses it from the combobox
  • Users select the vehicle type in the exploration form.
    • UI_ExplorePage_05 - Verify that the selectable vehicle types are correct
    • UI_ExplorePage_06 - Verify that the vehicle type shown on the card changes when the user chooses it from the combobox
  • Users submit the exploration form to get prediction results.
    • UI_ExplorePage_07 - Verify that the API endpoint is properly configured when the user submits the exploration form
  • Users observe the prediction result displayed on the card after submitting the form.
    • UI_ExplorePage_08 - Verify that the result from the backend is displayed on the card after submitting the form

API Calls

Clone this wiki locally