-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[MEVD] Specification/conformance integration test suite for providers #10194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Small note: I already refactored the integration tests for I tried to do the same with As an alternative solution, we can keep current tests for specific providers to ensure high coverage but add separate set of test cases (maybe basic ones) using abstraction only and enable it for as many connectors as we can. |
@dmytrostruk thanks for the context, yeah, that all makes sense. I plan to take a look at this, will share what i come up with. I agree that it's OK if an implementation needs to have its own tests in addition to the "standard" ones it can get for free - I do hope we'll be able to provide a meaningful set of standard ones, without being prevented from testing too much by differences between the database etc. |
Note: the basic infrastructure for this and first test implementation are being done as part of #10273 (LINQ-based filtering).
Assuming we're all OK with this direction (we should discuss), am keeping this issue to track porting over the other non-filter integration tests over into this new integration test structure. |
Do we need to publish test-related code via NuGet? If we need to share something internally between test projects - we have a concept of |
@dmytrostruk the reason to publish test-related code via NuGet is for supporting connectors which are maintained outside the repo, e.g. by the database vendor (I think there's one today already?). Such vendors should be able to easily use our specification/conformance tests, and also update the nuget as tests are improved/added for new APIs. FWIW we have this approach in EF, where a "specification" test suite is published as a nuget, and it greatly helps external implementation maintainers. Of course, for connectors inside the SK repo, a simple |
Closes microsoft#10156 Does most of microsoft#10194
Closes microsoft#10156 Does most of microsoft#10194
Closes microsoft#10156 Does most of microsoft#10194
Closes microsoft#10156 Does most of microsoft#10194
Closes microsoft#10156 Does most of microsoft#10194
Closes microsoft#10156 Does most of microsoft#10194
Closes microsoft#10156 Does most of microsoft#10194
Closes microsoft#10156 Does most of microsoft#10194
@roji Thanks for your response!
Not at all, just wanted to learn more about this approach, since we didn't publish a package to NuGet that is related to tests in Semantic Kernel yet. I think publishing specification test suite should really help connector developers to speed up the development process. I also think that it's not only about test suites, but also our internal classes such as Although, I'm not sure if we should handle it all together in scope of the same task. For example, we can start with internal test suite, use it for some period of time in SK repo, see how the tests perform (i.e. sometimes they can be flacky etc.). Later, when we are comfortable with sharing these tests with other developers, we can publish it via NuGet. I guess it's a matter of prioritization. |
Sure thing. FYI EF Core publishes very extensive tests in this way: an EF provider gets a ton of test coverage for free, and this is vital to making sure providers implement the functionality they need to, behave in the right way, etc.
Absolutely - that indeed also needs to be made public. External connectors generally shouldn't ever need to copy files from the SK repo (e.g. VectorStoreRecordPropertyReader), since that means they don't automatically get fixes and improvements to that code.
We can. Though if something's flaky, that would be a specific database, or its implementation of the tests - the (abstract) tests themselves should never be flaky (if they are that's a bug). I understand the worry about flakiness, but at least from what I've seen working on the LINQ filtering tests, things seem rock solid across all databases. On that:
So I don't think there's any particular reason to not publish a test nuget. Of course, it's not the most urgent thing we have to do, and given that there are almost no external connector developers, that can probably wait until after release. But I'm trying to at least design things in a way that will make this possible etc. |
#10944 has helped, but not solved the problem (yet) |
The tests should also cover custom mappers. |
contributes to #10194 --------- Co-authored-by: Shay Rojansky <[email protected]>
We have sufficient coverage for Build. Keeping this open as there is more we want to do. |
General overview of tasks that need to be done here (nothing for Build):
|
The current integration tests for NEVM providers are implemented separately for each provider, with no support from the abstraction. To promote better universal coverage and reduce the per-provider work needed, we could expoes a "specification test suite" with the abstraction, which providers implement, and which execute a set of standardized tests to ensure the provider works correctly. A good model here would be the Entity Framework Core specification test suite, which exercises an EF provider in a myriad of ways.
/cc @westey-m
The text was updated successfully, but these errors were encountered: