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

Update intergration tests to use WebAppliationFactory #21

Closed
ttu opened this issue Mar 16, 2018 · 4 comments
Closed

Update intergration tests to use WebAppliationFactory #21

ttu opened this issue Mar 16, 2018 · 4 comments

Comments

@ttu
Copy link
Owner

ttu commented Mar 16, 2018

https://docs.microsoft.com/en-us/aspnet/core/testing/integration-testing

@kashifsoofi
Copy link
Contributor

Limitation, that need changes in TestHost is currently (at the time of comment) there is no way to create a client with HttpHandler with Auto Redirect set to false using TestHost.

@ttu
Copy link
Owner Author

ttu commented Jun 2, 2019

@kashifsoofi Hi. Sorry that haven't updated the Issue, but Microsoft changed practices how integration tests should be done.

Now WebAppliationFactory should be used instead of TestServer. I think this changed at some point in the end of the last year.

With WebAppliationFactory AlowAutoRedirect can set to false (https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-2.2#test-a-secure-endpoint).

If you still want to finish this issue I can mark this as in progress, but I understand if you don't want to continue with this anymore.

If you have some questions about this, just let me know. I should have some sample code how test values can be injected to test server with WebAppliationFactory.

@ttu ttu changed the title Update intergration tests to use TestServer from Microsoft.AspNetCore.TestHost Update intergration tests to use WebAppliationFactory Jun 2, 2019
@kashifsoofi
Copy link
Contributor

Thanks @ttu for the comment, almost done with the update only test now left to do is web sockets.

@ttu
Copy link
Owner Author

ttu commented Jun 29, 2019

Implemented in #54

@ttu ttu closed this as completed Jun 29, 2019
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

2 participants