tilemaker icon indicating copy to clipboard operation
tilemaker copied to clipboard

Introducing a test framework

Open guillaumerose opened this issue 3 years ago • 5 comments

I am trying this project and it works well for me. It is far more convenient and efficient. I can see some differences between the output of tilemaker and the output of openmaptiles.

Would that make sense to write some tests where we pass a .osm.pbf with few roads, etc. and assert the output is correct ? I see the CI generates a small area but there are no expectations. Should we add some ?

guillaumerose avatar Jan 18 '22 14:01 guillaumerose

Are you wanting to test tilemaker, or the Lua scripts that come with it?

pnorman avatar Jan 18 '22 14:01 pnorman

I think we should start with an end-to-end test to cover most of the features and ensure no regressions when a PR comes in.

guillaumerose avatar Jan 18 '22 15:01 guillaumerose

I like the principle. Possibly a pipeline like .pbf -> tilemaker -> .mvt -> .geojson, and then we parse the geojson to make sure the features are correct. Testing the tile filesize would be useful too. Potentially quite a big undertaking though!

systemed avatar Jan 18 '22 15:01 systemed

The project would definitly benefit from testing. Even if the conversion fails and generates no output, the CI passes. I have seen the tilemaker executable crashing in CI, but CI says build is complete. So even checking if the output file exists and is not empty, would be an improvement

kleunen avatar Jan 18 '22 18:01 kleunen