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

RevEng: Add end to end tests which checks from database script to generated code #25543

Open
smitpatel opened this issue Aug 16, 2021 · 5 comments

Comments

@smitpatel
Copy link
Contributor

No description provided.

@smitpatel
Copy link
Contributor Author

(#29105)

Every time I work in scaffolding area, I miss this so much!

@ErikEJ
Copy link
Contributor

ErikEJ commented Sep 15, 2022

@ajcvickers @bricelam @smitpatel Wonder if I could help here?

Could a SQL Server Database project => generated code path add value?

@smitpatel
Copy link
Contributor Author

I think best way to handle this with the current pattern/infra we have is to have a class which is combination of https://github.com/dotnet/efcore/blob/release/7.0/test/EFCore.SqlServer.FunctionalTests/Scaffolding/SqlServerDatabaseModelFactoryTest.cs
https://github.com/dotnet/efcore/blob/release/7.0/test/EFCore.Design.Tests/Scaffolding/Internal/RelationalScaffoldingModelFactoryTest.cs
https://github.com/dotnet/efcore/blob/release/7.0/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpEntityTypeGeneratorTest.cs

So we can test e2e from database script to generate code. It may require some refactoring to account for provider specific tests.
I think one of the main reason I had filed this issue because the model we generate to verify generated code is not going to be same as model scaffolder would generate from facets perspective (like no hierarchy or shadow property or value converter etc)

@ErikEJ
Copy link
Contributor

ErikEJ commented Sep 15, 2022

@smitpatel Got it

@roji
Copy link
Member

roji commented Sep 15, 2022

Yeah... We should definitely avoid SQL Server-specific mechanisms here, since we'd want these e2e tests to work on other databases.

@smitpatel smitpatel removed their assignment Nov 10, 2022
@bricelam bricelam removed their assignment Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants