Skip to content

Latest commit

 

History

History
41 lines (34 loc) · 1.61 KB

File metadata and controls

41 lines (34 loc) · 1.61 KB

Build status NuGet Gitter

NBomber plugin for defining HTTP scenarios

How to install

To install NBomber.Http via NuGet, run this command in NuGet package manager console:

PM> Install-Package NBomber.Http

Documentation

Documentation is located here

Contributing

Would you like to help make NBomber even better? We keep a list of issues that are approachable for newcomers under the good-first-issue label.

Examples

class Program
{
    static void Main(string[] args)
    {
	var step = HttpStep.Create("simple step", (context) =>
	    Http.CreateRequest("GET", "https://gitter.im")
	        .WithHeader("Accept", "text/html")
		.WithHeader("Cookie", "cookie1=value1; cookie2=value2")
		//.WithBody(new StringContent("{ some JSON }", Encoding.UTF8, "application/json"))
		//.WithCheck(response => Task.FromResult(response.IsSuccessStatusCode))
	);

	var scenario = ScenarioBuilder.CreateScenario("test gitter", new[] {step})
				      .WithConcurrentCopies(100)
				      .WithDuration(TimeSpan.FromSeconds(10));

	NBomberRunner.RegisterScenarios(scenario)
		     .RunInConsole();
    }
}