PragmaticFlow/NBomber.Http

Unable to use Step.Create method

Closed this issue · 7 comments

Hi,
I am unable to use Step.Create method, it is throwing an error "Step does not contain a definition for create", I am trying to build a performance testing framework for our API and I am trying to use various examples scattered around web but I am now stuck on this. I am using Nbomber 4.1.2 and Nbomber.http 4.1.1.I am using Visual Studio 2019

hello,
did you try on the latest NBomber v5?

Yes, I also tried with that but same result

Hi @JaydipBhattacharjee ,
NBomber provides only Step.Run but not Step.Create methods.
https://nbomber.com/docs/using-nbomber/basic-api/step#step-run

Interesting, was it available with earlier versions of Nbomber? sources from the web lists step.create

https://wil-rees.medium.com/net-load-testing-with-nbomber-170b6dbcfb71
https://www.the-koi.com/projects/nbomber-load-testing-ship-with-confidence-robust-stress-tested-apis/
https://slothycode.com/load-testing-with-c-and-nbomber/
https://pankajrawat.hashnode.dev/api-load-testing-using-c-nbomber

even in your blog

https://nbomber.com/blog/

let step = Step.create("step", fun context -> task {

// invocation count of the current step 
// (will be incremented on each invocation)
context.InvocationCount // int

return Response.ok()

})

My scenario is I want to create multiple steps within a scenario so that all the step results can be show in a single results page. Thank you or having a look.

Ok I am trying around with your example but I am facing the below error

System.TypeLoadException: 'Could not load type 'NBomber.CSharp.Scenario' from assembly 'Nbomber, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.'

Thanks a ton, it was really helpful.