You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@baremaps.apache.org by "leonardcser (via GitHub)" <gi...@apache.org> on 2023/05/15 09:35:56 UTC

[GitHub] [incubator-baremaps] leonardcser opened a new issue, #657: Integration tests for regression detection

leonardcser opened a new issue, #657:
URL: https://github.com/apache/incubator-baremaps/issues/657

   The idea is to implement a system to check changes by rendering areas of interest and doing a pixel by pixel match detection.
   
   ## Approches
   
   A consideration to make is whether to use javascript or typescript.
   - Javascript is easy to run with node
   - Typescript provides more type safety and documentation but requires a ts complier (two step)
   
   ### 1. Basemap Only
   Include all the logic in a new folder in `basemap/tests/`. The actual tests would be in `basemap/tests/integration/` and the entry point script would be at `basemap/tests/main.js`
   
   In the CICD this would be:
   
   ```bash
   cd basemap && node tests/main.js
   ```
   
   ### 2. Integration Testing Script
   Include all the logic in a new package at the root of the repository (`integration-testing/`). This package would export a cli script that allows to run the integration tests in any given folder by discovering them.
   
   The actual tests would also be in `basemap/tests/integration/`. As an example, to run the tests:
   
   ```bash
   baremaps-test discover basemap
   ```
   
   ## Functionality
   
   The test render would be inspired by maplibre's testing suite:
   https://github.com/maplibre/maplibre-gl-js/tree/main/test/integration/render
   
   Each integration test would contain a metadata file with lon, lat and zoom and the an `expected.png` image.
   
   The script would allow to:
    - generate the `expected.png` for individual tests or for all tests in the folder
    - run an individual test or all tests in the folder
   
   For reporting, the script would generate an html file containing statistics and failed tests with side by side comparisons.
   
   ## Proposition
   
   For the simplest approach, it can be good to first include all the testing logic in the `basemap/tests/` folder using javascript. Later when other map styles need integration testing, the modular logic can be extracted to a new package (2nd approach) and migrate to typescript.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@baremaps.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-baremaps] bchapuis closed issue #657: Integration tests for regression detection

Posted by "bchapuis (via GitHub)" <gi...@apache.org>.
bchapuis closed issue #657: Integration tests for regression detection
URL: https://github.com/apache/incubator-baremaps/issues/657


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@baremaps.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org