TranslatorSRI / NameResolution

A service for finding CURIEs from lexical strings.
3 stars 2 forks source link

Add integration tests and index-wide tests #112

Open gaurav opened 8 months ago

gaurav commented 8 months ago

There are currently three types of tests for NameRes:

  1. Unit tests in this GitHub repository, which use a tiny dataset to make sure that the searching is working at a simple level.
  2. Babel Validation has some Scala-based tests, but for NameRes it pretty much just reads through the file to make sure it's readable. We need more advanced testing, in particular index-wide tests that allow us to find cases where the same name is used for multiple concepts (#40).
  3. The website tests in Babel Validation. Since a lot of these were developed in a hurry, they're pretty usable for me, but (1) aren't very easy for everybody to understand, and (2) aren't easy to set up and run.

This means there are two big gaps in the testing. Here's how I propose fixing them:

  1. Python-based integration tests, piggy-backing on the same data used by Babel Validation, but including other tests as well. This will make it easier to replicate the current Babel Validation tests, plus allow us to quickly write new tests for e.g. slow-running terms (#107) and to prove that we can provide the throughput that Translator needs (.
  2. Write some index-wide tests. This will probably make more sense to create in the Babel Validation repository. Our last plan there was to write them in Souffle, and I'm not sure there is a better way to implement them.

This also applies to NameRes (https://github.com/TranslatorSRI/NameResolution/issues/113).

gaurav commented 7 months ago

Python tests were added to babel-validation in PR https://github.com/TranslatorSRI/babel-validation/pull/25. I'll tackle index-wide tests next year.