NBomber
NBomber copied to clipboard
Bump FsToolkit.ErrorHandling.TaskResult version
Bump version to prevent incompatible assembly using.
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Ply, Version=0.3.1.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'Ply, Version=0.3.1.0, Culture=neutral, PublicKeyToken=null'
at NBomber.DomainServices.NBomberRunner.runSession(TestInfo testInfo, NodeInfo nodeInfo, NBomberContext context, IGlobalDependency dep)
at NBomber.DomainServices.NBomberRunner.run(Boolean disposeLogger, NBomberContext context)
at NBomber.FSharp.NBomberRunner.runWithResult(IEnumerable`1 args, NBomberContext context)
at NBomber.FSharp.NBomberRunner.run(NBomberContext context)
at <StartupCode$NBomberTest>.$Program.main@() in /**/NBomberTest/NBomberTest/Program.fs:line 12
Process finished with exit code 134.
Code:
open NBomber.FSharp
let scenario =
Scenario.create("test", fun ctx -> task { return Response.ok() })
|> Scenario.withoutWarmUp
|> Scenario.withLoadSimulations [LoadSimulation.Inject(100, TimeSpan.FromSeconds 1., TimeSpan.FromMinutes 1.)]
let result =
[scenario]
|> NBomberRunner.registerScenarios
|> NBomberRunner.run
printfn $"{result}"
fsproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FsToolkit.ErrorHandling.TaskResult" Version="4.5.0" />
<PackageReference Include="NBomber" Version="4.1.2" />
</ItemGroup>
</Project>
Hi @z0h3
Do you know if this problem is relevant to your local env?
Hi @AntyaDev
I described my problem in slack: https://nbomberworkspace.slack.com/archives/C050LL4LCP3/p1681136967041579 I added details from slack to PR description
answered in slack
My team is interested in this, too. We're trying to get started with NBomber load testing, but our application depends upon the latest version of FsToolkit.ErrorHandling and is thus incompatible with NBomber.
Hi @colinbobolin ,
Did you use the latest NBomber v5, correct?
@AntyaDev yes. I've since opted to decouple my work enough to be able to bypass the incompatibility, but with .net 7.0 I still needed to add the FsToolkit.ErrorHandling.TaskResult version 2.13.0 dependency explicitly to a fresh project with no other dependencies.
@colinbobolin, what is your company name?
@AntyaDev AutoStore. We're trying to assess if this will work for us before purchasing the license, if that's why you're asking.
@colinbobolin Thanks for the information. I will take a look at this issue. I recall that to fix this issue, I need to switch NBomber to netstandart 2.1 or something higher than netstandart 2.0 which will cause a drop in support of the legacy .NET Framework.
Not sure what other options do we have?
@AntyaDev I see. I think I found a workable solution for now by making a new dotnet sln and referencing FsToolkit.ErrorHandling.TaskResult version 2.13.0 dependency explicitly.
@colinbobolin, It should theoretically work, but I am unsure since it has a significant version change. Please let me know if it fixed this issue. I will try to play with other options to fix it.
@AntyaDev the only thing that seems to be not working so far is the console logger.
System.Security.VerificationException: Method Spectre.Console.AlignableExtensions.Centered: type argument 'Spectre.Console.Rule' violates the constraint of type parameter 'T'.
at NBomber.Infra.Console.addHeader(String header)
at NBomber.DomainServices.Reports.ConsoleReport.ConsoleTestInfo.printTestInfo(TestInfo testInfo)
at NBomber.DomainServices.Reports.ConsoleReport.print(ILogger logger, NodeSessionResult sessionResult, IDictionary`2 simulations)
@colinbobolin can I ask you please to attach your test example to reproduce it? I mean an empty example with the latest FsToolkit.ErrorHandling.TaskResult
Hi @colinbobolin , @z0h3 please try this version https://www.nuget.org/packages/NBomber/5.2.1-beta.0