Skip to content

AutoCluster - Grafana dashboard isn't displaying Status Codes #697

@daveharris1

Description

@daveharris1

The following issues has been raised after talking with Anton Moldovan.

NBomber NuGet package version: 5.6.0
NBomber.Sinks.InfluxDB NuGet package version: 5.0.2

When running distributed tests the Grafana dashboard 'Scenario Status Code' panel doesn't display any results.

The Grafana dashboard was created using the nbomber_board.json and nbomber_sessions_board.json found here:

https://github.com/PragmaticFlow/NBomber.Grafana

image

Sudo-code example of the code:

public async Task ApiResponseTimes(TestData testData)
        {
            var scenario = Scenario.Create("ApiResponseTimes", async context =>
            {
		//test logic
		var apiResponse = await AnApiCall(testData.Url).ConfigureAwait(false);		
		
		//Expect the Status code to be registered and displayed
                return Response.Ok(statusCode: apiResponse.StatusCode.ToString());
            })
            .WithRestartIterationOnFail(false)
            .WithoutWarmUp()
            .WithLoadSimulations(Simulation.KeepConstant(copies: testData.Copies, this.Duration));
            var nbomberRunner = NBomberRunner.RegisterScenarios(scenario)
                .WithLicense(await this.KeyVaultClient.GetSecretStringAsync(this.TestId, "NBomberKey").ConfigureAwait(false))
                .LoadConfig(await this.GenerateConfig().ConfigureAwait(false))
                .LoadInfraConfig(await this.GenerateInfraConfig().ConfigureAwait(false))
                .WithReportingSinks(this.influxDbSink)
                .Run();

Metadata

Metadata

Assignees

No one assigned

    Labels

    5.7bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions