New MapCSS test that uses reference images
|Reported by:||michael2402||Owned by:||team|
When debugging MapCSS is often found the need to create custom styles to track down issues.
This is quite annoying and I thought that it could be automated.
I wrote a test that uses sample OSM files and styles and renders them to small (256 x 256 px) images. Those images are then compared to a reference image. If the images differ, the rendered result is stored for the user to inspect.
This works as a good unit test for the renderer classes - we can detect changes and see the impact of changes visually. If we change the renderer in a good way we need to re-create the reference files.
If the team is fine with it, I would like to write some more tests and commit it.
While I was on it, I found the first potential bug (
ws.lowerIndex < offset in
StyledMapRenderer does not make sense)
Change History (19)
comment:9 Changed 2 months ago by
|Status:||closed → reopened|
|Summary:||[Patch] New MapCSS test that uses reference images → New MapCSS test that uses reference images|