Currently, we have unit tests that depend on live data, and that's not idea. What we want is multiple levels:
Unit tests
- should test yente functionality and not depend on OpenSanctions data, most definitely not live data.
Acceptance tests
contrib/validation_report is a start. We want to build tests that test whether matching is still working as well as last version, and to be able to compare and document what the performance was six versions ago (so: release a report with every yente release). We need a moderately complex haystack and needle to test real-world performance, so likely OpenSanctions data. Ideally, we keep the test fixtures constant for as long as possible for comparability to previous versions. One idea for how to do that is to use OS statements as a base and then generate the current flavor of FtM from that for our yente under test to consume.
End-to-end tests
These can test the full stack, from data production to the response, even our Hosted API performance. But they come with the usual issues of end to end tests.
Currently, we have unit tests that depend on live data, and that's not idea. What we want is multiple levels:
Unit tests
Acceptance tests
contrib/validation_reportis a start. We want to build tests that test whether matching is still working as well as last version, and to be able to compare and document what the performance was six versions ago (so: release a report with every yente release). We need a moderately complex haystack and needle to test real-world performance, so likely OpenSanctions data. Ideally, we keep the test fixtures constant for as long as possible for comparability to previous versions. One idea for how to do that is to use OS statements as a base and then generate the current flavor of FtM from that for our yente under test to consume.End-to-end tests
These can test the full stack, from data production to the response, even our Hosted API performance. But they come with the usual issues of end to end tests.