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

Use WebApplicationFactory directly instead of running the tested app with the dotnet CLI (OSOE-46) #101

Closed
Piedone opened this issue Oct 21, 2021 · 0 comments · Fixed by #186
Assignees
Labels
enhancement New feature or request

Comments

@Piedone
Copy link
Member

Piedone commented Oct 21, 2021

You can run an ASP.NET Core app directly with WebApplicationFactory, see this blog post and the corresponding code. Why?

  • This can potentially make things faster.
  • Reduce the app-level configuration you have to do, so no need to add the Shortcuts module, for example, or ConfigureUITesting().
  • Since this would require a hard reference from the UI test project and the web app, we'd get rid of the necessity to manually build the web app.
  • This would allow us to debug the app being tested too, since it would be the same as the test process.
  • After this, this note should be adjusted.

See the linked PR for the beginnings of this and comments.

Note that in the linked demo stylesheets didn't load so that may be something to resolve.

This needs to happen after a .NET 6 upgrade (Lombiq/Open-Source-Orchard-Core-Extensions#30).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment