geocoders / geocoder-tester

Run search queries against a geocoder that supports geocodejson spec.
Other
40 stars 23 forks source link

How to run the test API? #59

Open xinyuluo opened 2 years ago

xinyuluo commented 2 years ago

Hello,

I tried to use geocoder-tester to test Nominatim, and I ran the following command:

py.test --tb short --api-url https://nominatim.openstreetmap.org/ -m iledefrance --save-report log/nominatim-url.log --api-type nominatim

result I got:

1161 failed, 473 passed, 647 skipped, 20013 deselected, 34 warnings in 895.47s (0:14:55)

which seems surprisingly low accuracy for me. Is this expected, or I missed something / ran the API in the wrong way?

Thank you!

lonvia commented 2 years ago

This test suite collects acceptance tests and are used to compare the performance of different geocoders (or versions of them). It is perfectly normal that some tests fail.

When running against Nominatim, the tests with geographic reference are currently skipped because the API doesn't support a point localisation. It is on the TODO list to somehow change the tests, so Nominatim's bbox-based parameter can be used.

Side note: Please do not run the tests against the main API. This will get you banned from it.