GenSpectrum / LAPIS-SILO

Sequence Indexing engine for Large Order of genomic data
GNU Affero General Public License v3.0
12 stars 3 forks source link

Move e2e to unit test framework #317

Open JonasKellerer opened 8 months ago

JonasKellerer commented 8 months ago

In #290 we introduced a new testing framework for queries to test the queries in unit tests. Use this framework to replace the e2e tests in endToEndTests/test/queries. In the end, there should be one standard case left in the e2e (actions: aggregated, mutations, insertions, fasta, Not, And, Or, nOf; filters: stringEquals, dateEquals, intEquals, pangoLineageEquals, symbolEquals ) and all edge cases should be handled by the unit tests.

Also check if additional tests are necessary.

Then remove the corresponding e2e tests

fengelniederhammer commented 8 months ago

We should not move all tests. I think the criterium should be: There should be at least one example for every kind of query that demonstrates how to send the query and what the result looks like.

Testing edge cases and special logic should however be moved to unit tests.

Taepper commented 7 months ago

I do not see a downside to keeping the e2e tests. Any migration should only be performed if the unit tests are viable enough to read the json definition of the e2e testcases, which are more descriptive than the in-code format of the current unit test format

fengelniederhammer commented 7 months ago

Then we should think about a more descriptive format for the unit tests. IMO they should be the preferred way to write tests, since we have much better control over the data (which actually revealed and helped to understand bugs).

Taepper commented 7 months ago

That is true. I like a non-code format for test cases, where the files are as descriptive as possible. Not needing to repeat all data in each testcase is another point one should consider. I think we are on a good track to achieve that, where only a few more bolts and screws need to be adjusted