CUTR-at-USF / transit-feed-quality-calculator

A tool that uses the gtfs-realtime-validator to calculate the quality of a large number of GTFS-realtime feeds
Other
7 stars 1 forks source link

Add unit tests for ResultsAnalyzer #20

Closed barbeau closed 6 years ago

barbeau commented 6 years ago

Summary:

Similar to the tests for the gtfs-realtime-validator project for the BatchProcessor (https://github.com/CUTR-at-USF/gtfs-realtime-validator/blob/master/gtfs-realtime-validator-lib/src/test/java/edu/usf/cutr/gtfsrtvalidator/lib/test/BatchTest.java), we should add tests for ResultsAnalyzer to make sure the output Excel file contains the expected information based on the actual validator results in the .results.json files.

I see this having a few steps:

  1. Find a few small .results.json files from actual validation output - 3 would probably be good
  2. Add a unit test that loads in these .results.json files and output the graphs.xlsx file
  3. Load in the graphs.xlsx file and run assertions to confirm that the errors and warnings that show up for certain feeds in multiple tabs

Steps to reproduce:

Try to run unit tests for the project

Expected behavior:

Run unit tests

Observed behavior:

No unit tests exist