Open JonasKellerer opened 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.
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
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).
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
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