Skip to content
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

Test: Create a TestBase which allows inserting custom model to run queries #17588

Closed
smitpatel opened this issue Sep 3, 2019 · 2 comments
Closed
Labels
area-query area-test closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. punted-for-3.1 type-enhancement
Milestone

Comments

@smitpatel
Copy link
Contributor

We need to make QueryBugsTest provider agnostic so we can get better coverage. This is important since most of the model we add here are customer models.

@smitpatel
Copy link
Contributor Author

Adding few more points, which are related and should be considered.
QueryBugsTest creates database only once but populate it with tables and data for each test.
Context different test scenario

  • Separate bounderies
  • Creates only required tables and seed them
  • Easy to see data and test together

Single context for all test

  • We can go into normal flow of other test classes by having a model which just add more entityTypes in future
  • Database is initialized only once and reused

@AndriySvyryd
Copy link
Member

AndriySvyryd commented Sep 9, 2019

Tests the require MARS should be moved out and marked with SqlServerCondition.SupportsMARS. See 68c1a5f, 97bf494, #1015

Also create a TestStoreFixtureBase and use it where SharedStoreFixtureBase is used but the database does not actually needs to be shared (almost everything except Northwind). And move tests that invoke SaveChanges from QueryBugsTest to EndToEndTests

@ajcvickers ajcvickers modified the milestones: 3.1.0, Backlog Oct 11, 2019
@ajcvickers ajcvickers modified the milestones: Backlog, MQ Sep 11, 2020
@ajcvickers ajcvickers modified the milestones: MQ, 6.0.0 Dec 16, 2020
AndriySvyryd added a commit that referenced this issue Jan 9, 2021
@AndriySvyryd AndriySvyryd removed their assignment Jan 9, 2021
@AndriySvyryd AndriySvyryd removed this from the 6.0.0 milestone Jan 9, 2021
AndriySvyryd added a commit that referenced this issue Jan 11, 2021
@ajcvickers ajcvickers added this to the MQ milestone Jan 11, 2021
AndriySvyryd added a commit that referenced this issue Jan 12, 2021
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jan 21, 2022
@ajcvickers ajcvickers modified the milestones: MQ, 7.0.0 Jan 21, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0, 6.0.0 Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-query area-test closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. punted-for-3.1 type-enhancement
Projects
None yet
Development

No branches or pull requests

3 participants