OptionalLoadTestConfiguration Class

  • java.lang.Object
    • com.azure.developer.loadtesting.models.OptionalLoadTestConfiguration

Implements

public final class OptionalLoadTestConfiguration
implements JsonSerializable<OptionalLoadTestConfiguration>

Configuration for quick load test.

Constructor Summary

Constructor Description
OptionalLoadTestConfiguration()

Creates an instance of OptionalLoadTestConfiguration class.

Method Summary

Modifier and Type Method and Description
static OptionalLoadTestConfiguration fromJson(JsonReader jsonReader)

Reads an instance of OptionalLoadTestConfiguration from the JsonReader.

Duration getDuration()

Get the duration property: Test run duration in seconds.

String getEndpointUrl()

Get the endpointUrl property: Test URL.

Integer getMaxResponseTimeInMs()

Get the maxResponseTimeInMs property: Maximum response time in milliseconds of the API/endpoint.

Integer getRampUpTime()

Get the rampUpTime property: Ramp up time in seconds.

Integer getRequestsPerSecond()

Get the requestsPerSecond property: Target throughput (requests per second).

Integer getVirtualUsers()

Get the virtualUsers property: No of concurrent virtual users.

OptionalLoadTestConfiguration setDuration(Duration duration)

Set the duration property: Test run duration in seconds.

OptionalLoadTestConfiguration setEndpointUrl(String endpointUrl)

Set the endpointUrl property: Test URL.

OptionalLoadTestConfiguration setMaxResponseTimeInMs(Integer maxResponseTimeInMs)

Set the maxResponseTimeInMs property: Maximum response time in milliseconds of the API/endpoint.

OptionalLoadTestConfiguration setRampUpTime(Integer rampUpTime)

Set the rampUpTime property: Ramp up time in seconds.

OptionalLoadTestConfiguration setRequestsPerSecond(Integer requestsPerSecond)

Set the requestsPerSecond property: Target throughput (requests per second).

OptionalLoadTestConfiguration setVirtualUsers(Integer virtualUsers)

Set the virtualUsers property: No of concurrent virtual users.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

OptionalLoadTestConfiguration

public OptionalLoadTestConfiguration()

Creates an instance of OptionalLoadTestConfiguration class.

Method Details

fromJson

public static OptionalLoadTestConfiguration fromJson(JsonReader jsonReader)

Reads an instance of OptionalLoadTestConfiguration from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of OptionalLoadTestConfiguration if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the OptionalLoadTestConfiguration.

getDuration

public Duration getDuration()

Get the duration property: Test run duration in seconds.

Returns:

the duration value.

getEndpointUrl

public String getEndpointUrl()

Get the endpointUrl property: Test URL. Provide the complete HTTP URL. For example, https://contoso-app.azurewebsites.net/login.

Returns:

the endpointUrl value.

getMaxResponseTimeInMs

public Integer getMaxResponseTimeInMs()

Get the maxResponseTimeInMs property: Maximum response time in milliseconds of the API/endpoint.

Returns:

the maxResponseTimeInMs value.

getRampUpTime

public Integer getRampUpTime()

Get the rampUpTime property: Ramp up time in seconds.

Returns:

the rampUpTime value.

getRequestsPerSecond

public Integer getRequestsPerSecond()

Get the requestsPerSecond property: Target throughput (requests per second). This may not be necessarily achieved. The actual throughput will be lower if the application is not capable of handling it.

Returns:

the requestsPerSecond value.

getVirtualUsers

public Integer getVirtualUsers()

Get the virtualUsers property: No of concurrent virtual users.

Returns:

the virtualUsers value.

setDuration

public OptionalLoadTestConfiguration setDuration(Duration duration)

Set the duration property: Test run duration in seconds.

Parameters:

duration - the duration value to set.

Returns:

the OptionalLoadTestConfiguration object itself.

setEndpointUrl

public OptionalLoadTestConfiguration setEndpointUrl(String endpointUrl)

Set the endpointUrl property: Test URL. Provide the complete HTTP URL. For example, https://contoso-app.azurewebsites.net/login.

Parameters:

endpointUrl - the endpointUrl value to set.

Returns:

the OptionalLoadTestConfiguration object itself.

setMaxResponseTimeInMs

public OptionalLoadTestConfiguration setMaxResponseTimeInMs(Integer maxResponseTimeInMs)

Set the maxResponseTimeInMs property: Maximum response time in milliseconds of the API/endpoint.

Parameters:

maxResponseTimeInMs - the maxResponseTimeInMs value to set.

Returns:

the OptionalLoadTestConfiguration object itself.

setRampUpTime

public OptionalLoadTestConfiguration setRampUpTime(Integer rampUpTime)

Set the rampUpTime property: Ramp up time in seconds.

Parameters:

rampUpTime - the rampUpTime value to set.

Returns:

the OptionalLoadTestConfiguration object itself.

setRequestsPerSecond

public OptionalLoadTestConfiguration setRequestsPerSecond(Integer requestsPerSecond)

Set the requestsPerSecond property: Target throughput (requests per second). This may not be necessarily achieved. The actual throughput will be lower if the application is not capable of handling it.

Parameters:

requestsPerSecond - the requestsPerSecond value to set.

Returns:

the OptionalLoadTestConfiguration object itself.

setVirtualUsers

public OptionalLoadTestConfiguration setVirtualUsers(Integer virtualUsers)

Set the virtualUsers property: No of concurrent virtual users.

Parameters:

virtualUsers - the virtualUsers value to set.

Returns:

the OptionalLoadTestConfiguration object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to