The exact situation is that I am running E2E tests using Protractor.NET (the .NET port for the AngularJS Protractor E2E platform) and I would like to make some web requests (and the API - System.Net.Http.HttpClient - has everything Async / Task ). In order to execute my test before I activate / validate, I need to complete this procedure for several tests.
I use xUnit.net as my test runner, which uses the interface ( IUseFixture<T> ) for the setup code for each fixture. It would be nice if there was an IAsyncUseFixture<T> that had a Task SetFixtureAsync(T t); or something like that. I do not think such a thing exists. Also, I don't think that constructors can use await , and constructors are the only way to execute the same block for every test in xUnit.net.
What are my options? .Result ? Isn't that a bad practice (dead end)?
Words Like Jared
source share