Sample GTFS/GTFS Realtime datasets for software testing

48 views
Skip to first unread message

Sean Barbeau

unread,
Mar 3, 2022, 5:51:12 PMMar 3
to Transit Developers
Hi all,
Have anyone created a set of sample GTFS or GTFS Realtime datasets used for software unit tests that are publicly shared?

An example of what I'm referring to:

The general idea is to have a sample GTFS dataset that doesn't change, and that models certain conditions (e.g., common errors), so you know that when you make code changes (e.g., in a validator) your expected output is consistent.

Thanks,
Sean

Sean Barbeau
Center for Urban Transportation Research
University of South Florida

Tom Brown

unread,
Mar 21, 2022, 8:27:03 PMMar 21
to transit-d...@googlegroups.com
Hi Sean,
https://github.com/google/transitfeed/tree/masteSorry for theSorry for ther/tests/data hasn't been updated much in many years but seems close to what you want for static GTFS. Sorry for my slow reply. I'm not working with transit data any longer but lurking. Thank you for your ongoing effort!
Tom

--
You received this message because you are subscribed to the Google Groups "Transit Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to transit-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/transit-developers/21ea294c-52d5-496c-ba44-985768b2b431n%40googlegroups.com.

Sean Barbeau

unread,
Mar 22, 2022, 10:01:09 AMMar 22
to Transit Developers
Thanks Tom!

For anyone interested, I'm tracking these here on the awesome-transit list:

Sean Barbeau

unread,
Mar 22, 2022, 3:33:28 PMMar 22
to Transit Developers
From Drew @ Interline (for some reason his reply was never posted):

Hi Sean,

 

Yes, we use this type of approach for testing the transitland-lib library that handles GTFS and GTFS Realtime parsing and validation for Transitland:

 

There are test case feeds for all three levels of GTFS static validation:

 

1. "bad entities" at the single row level: https://github.com/interline-io/transitland-lib/tree/master/test/data/bad-entities

 

2. validation errors that that involve entities in one or more files: https://github.com/interline-io/transitland-lib/tree/master/test/data/validator/errors

 

3. best practices: https://github.com/interline-io/transitland-lib/tree/master/test/data/validator/best-practiceshttps://github.com/interline-io/transitland-lib/tree/master/test/data/validator/best-practices

 

You'll notice that it's just the relevant files in each directory for each test case. At the time of running the test, the tooling injects the rest of the feed files that are needed to make the feed complete. In theory, the tooling could be expanded to also generate full feed archives for external use.

 

For GTFS Realtime, we create test cases in JSON and turn them into PB contents in the test rig. Much less coverage for that so far — it's mainly for testing matching logic: https://github.com/interline-io/transitland-server/tree/main/test/data/rt

 Drew

Reply all
Reply to author
Forward
0 new messages