You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's possible to add support async/await for any kind of Hooks.
I have some case to setup specflow tests.
I want to start my services in docker-compose env
=> I have some code that process in loop to ping all services, I have to wait with timeout that all services will startup and give me /version or /healthz good response.
So, in brief I have this code:
[BeforeTestRun]
public static Task BeforeTestRun()
{
..... // to check that code below execute only once
.....
PermissionService.SetUpAuthorizedUserRoleAsync(FindServiceUrl(Names.PermissionService)).GetAwaiter().GetResult();
}
async Task SetUpAuthorizedUserRoleAsync(..)
{
// for example
var tasks = services.Select(x => checker.CheckAsync(url)).ToList();
await Task.WaitAll(tasks); // if some task fail, test engine don't respond.
// but if I change code that:
Task.WaitAll(tasks).GetAwaiter().GetResult(); // ok
}
SpecFlow Version:
[*] 3.1
Used Test Runner
SpecFlow+Runner
MSTest
NUnit
[*] Xunit
Version number: Version=2.4.1
Project Format of the SpecFlow project
Classic project format using packages.config
Classic project format using <PackageReference> tags
It's possible to add support async/await for any kind of Hooks.
I have some case to setup specflow tests.
So, in brief I have this code:
[BeforeTestRun]
public static Task BeforeTestRun()
{
..... // to check that code below execute only once
.....
PermissionService.SetUpAuthorizedUserRoleAsync(FindServiceUrl(Names.PermissionService)).GetAwaiter().GetResult();
}
async Task SetUpAuthorizedUserRoleAsync(..)
{
// for example
var tasks = services.Select(x => checker.CheckAsync(url)).ToList();
await Task.WaitAll(tasks); // if some task fail, test engine don't respond.
// but if I change code that:
Task.WaitAll(tasks).GetAwaiter().GetResult(); // ok
}
SpecFlow Version:
Used Test Runner
Version number: Version=2.4.1
Project Format of the SpecFlow project
packages.config
<PackageReference>
tags.feature.cs files are generated using
SpecFlow.Tools.MsBuild.Generation
NuGet packageSpecFlowSingleFileGenerator
custom toolVisual Studio Version
Enable SpecFlowSingleFileGenerator Custom Tool
option in Visual Studio extension settingsAre the latest Visual Studio updates installed?
<Major>.<Minor>.<Patch>
.NET Framework:
Test Execution Method:
<SpecFlow> Section in app.config or content of specflow.json
The text was updated successfully, but these errors were encountered: