LoadTest Class

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

Implements

public final class LoadTest
implements JsonSerializable<LoadTest>

Load test model.

Constructor Summary

Constructor Description
LoadTest()

Creates an instance of LoadTest class.

Method Summary

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

Reads an instance of LoadTest from the JsonReader.

AutoStopCriteria getAutoStopCriteria()

Get the autoStopCriteria property: Auto stop criteria for a test.

String getBaselineTestRunId()

Get the baselineTestRunId property: Id of the test run to be marked as baseline to view trends of client-side metrics from recent test runs.

TestCertificate getCertificate()

Get the certificate property: Certificates metadata.

String getCreatedBy()

Get the createdBy property: The user that created.

OffsetDateTime getCreatedDateTime()

Get the createdDateTime property: The creation datetime(RFC 3339 literal format).

String getDescription()

Get the description property: The test description.

String getDisplayName()

Get the displayName property: Display name of a test.

List<String> getEngineBuiltInIdentityIds()

Get the engineBuiltInIdentityIds property: Resource Ids of the managed identity built in to load test engines.

LoadTestingManagedIdentityType getEngineBuiltInIdentityType()

Get the engineBuiltInIdentityType property: Type of the managed identity built in load test engines.

Map<String,String> getEnvironmentVariables()

Get the environmentVariables property: Environment variables which are defined as a set of <name,value> pairs.

Double getEstimatedVirtualUserHours()

Get the estimatedVirtualUserHours property: Estimated virtual user hours for the test.

TestInputArtifacts getInputArtifacts()

Get the inputArtifacts property: The input artifacts for the test.

String getKeyvaultReferenceIdentityId()

Get the keyvaultReferenceIdentityId property: Resource Id of the managed identity referencing the Key vault.

String getKeyvaultReferenceIdentityType()

Get the keyvaultReferenceIdentityType property: Type of the managed identity referencing the Key vault.

LoadTestKind getKind()

Get the kind property: Kind of test.

String getLastModifiedBy()

Get the lastModifiedBy property: The user that last modified.

OffsetDateTime getLastModifiedDateTime()

Get the lastModifiedDateTime property: The last Modified datetime(RFC 3339 literal format).

LoadTestConfiguration getLoadTestConfiguration()

Get the loadTestConfiguration property: The load test configuration.

String getMetricsReferenceIdentityId()

Get the metricsReferenceIdentityId property: Resource Id of the managed identity referencing the metrics.

LoadTestingManagedIdentityType getMetricsReferenceIdentityType()

Get the metricsReferenceIdentityType property: Type of the managed identity referencing the metrics.

PassFailCriteria getPassFailCriteria()

Get the passFailCriteria property: Pass fail criteria for a test.

TestPreferences getPreferences()

Get the preferences property: Preferences for the test.

Map<String,TestSecret> getSecrets()

Get the secrets property: Secrets can be stored in an Azure Key Vault or any other secret store.

String getSubnetId()

Get the subnetId property: Subnet ID on which the load test instances should run.

String getTestId()

Get the testId property: Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.

Boolean isPublicIpDisabled()

Get the publicIpDisabled property: Inject load test engines without deploying public IP for outbound access.

LoadTest setAutoStopCriteria(AutoStopCriteria autoStopCriteria)

Set the autoStopCriteria property: Auto stop criteria for a test.

LoadTest setBaselineTestRunId(String baselineTestRunId)

Set the baselineTestRunId property: Id of the test run to be marked as baseline to view trends of client-side metrics from recent test runs.

LoadTest setCertificate(TestCertificate certificate)

Set the certificate property: Certificates metadata.

LoadTest setDescription(String description)

Set the description property: The test description.

LoadTest setDisplayName(String displayName)

Set the displayName property: Display name of a test.

LoadTest setEngineBuiltInIdentityIds(List<String> engineBuiltInIdentityIds)

Set the engineBuiltInIdentityIds property: Resource Ids of the managed identity built in to load test engines.

LoadTest setEngineBuiltInIdentityType(LoadTestingManagedIdentityType engineBuiltInIdentityType)

Set the engineBuiltInIdentityType property: Type of the managed identity built in load test engines.

LoadTest setEnvironmentVariables(Map<String,String> environmentVariables)

Set the environmentVariables property: Environment variables which are defined as a set of <name,value> pairs.

LoadTest setKeyvaultReferenceIdentityId(String keyvaultReferenceIdentityId)

Set the keyvaultReferenceIdentityId property: Resource Id of the managed identity referencing the Key vault.

LoadTest setKeyvaultReferenceIdentityType(String keyvaultReferenceIdentityType)

Set the keyvaultReferenceIdentityType property: Type of the managed identity referencing the Key vault.

LoadTest setKind(LoadTestKind kind)

Set the kind property: Kind of test.

LoadTest setLoadTestConfiguration(LoadTestConfiguration loadTestConfiguration)

Set the loadTestConfiguration property: The load test configuration.

LoadTest setMetricsReferenceIdentityId(String metricsReferenceIdentityId)

Set the metricsReferenceIdentityId property: Resource Id of the managed identity referencing the metrics.

LoadTest setMetricsReferenceIdentityType(LoadTestingManagedIdentityType metricsReferenceIdentityType)

Set the metricsReferenceIdentityType property: Type of the managed identity referencing the metrics.

LoadTest setPassFailCriteria(PassFailCriteria passFailCriteria)

Set the passFailCriteria property: Pass fail criteria for a test.

LoadTest setPreferences(TestPreferences preferences)

Set the preferences property: Preferences for the test.

LoadTest setPublicIpDisabled(Boolean publicIpDisabled)

Set the publicIpDisabled property: Inject load test engines without deploying public IP for outbound access.

LoadTest setSecrets(Map<String,TestSecret> secrets)

Set the secrets property: Secrets can be stored in an Azure Key Vault or any other secret store.

LoadTest setSubnetId(String subnetId)

Set the subnetId property: Subnet ID on which the load test instances should run.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

LoadTest

public LoadTest()

Creates an instance of LoadTest class.

Method Details

fromJson

public static LoadTest fromJson(JsonReader jsonReader)

Reads an instance of LoadTest from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getAutoStopCriteria

public AutoStopCriteria getAutoStopCriteria()

Get the autoStopCriteria property: Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window.

Returns:

the autoStopCriteria value.

getBaselineTestRunId

public String getBaselineTestRunId()

Get the baselineTestRunId property: Id of the test run to be marked as baseline to view trends of client-side metrics from recent test runs.

Returns:

the baselineTestRunId value.

getCertificate

public TestCertificate getCertificate()

Get the certificate property: Certificates metadata.

Returns:

the certificate value.

getCreatedBy

public String getCreatedBy()

Get the createdBy property: The user that created.

Returns:

the createdBy value.

getCreatedDateTime

public OffsetDateTime getCreatedDateTime()

Get the createdDateTime property: The creation datetime(RFC 3339 literal format).

Returns:

the createdDateTime value.

getDescription

public String getDescription()

Get the description property: The test description.

Returns:

the description value.

getDisplayName

public String getDisplayName()

Get the displayName property: Display name of a test.

Returns:

the displayName value.

getEngineBuiltInIdentityIds

public List<String> getEngineBuiltInIdentityIds()

Get the engineBuiltInIdentityIds property: Resource Ids of the managed identity built in to load test engines. Required if engineBuiltInIdentityType is UserAssigned.

Returns:

the engineBuiltInIdentityIds value.

getEngineBuiltInIdentityType

public LoadTestingManagedIdentityType getEngineBuiltInIdentityType()

Get the engineBuiltInIdentityType property: Type of the managed identity built in load test engines.

Returns:

the engineBuiltInIdentityType value.

getEnvironmentVariables

public Map<String,String> getEnvironmentVariables()

Get the environmentVariables property: Environment variables which are defined as a set of <name,value> pairs.

Returns:

the environmentVariables value.

getEstimatedVirtualUserHours

public Double getEstimatedVirtualUserHours()

Get the estimatedVirtualUserHours property: Estimated virtual user hours for the test.

Returns:

the estimatedVirtualUserHours value.

getInputArtifacts

public TestInputArtifacts getInputArtifacts()

Get the inputArtifacts property: The input artifacts for the test.

Returns:

the inputArtifacts value.

getKeyvaultReferenceIdentityId

public String getKeyvaultReferenceIdentityId()

Get the keyvaultReferenceIdentityId property: Resource Id of the managed identity referencing the Key vault.

Returns:

the keyvaultReferenceIdentityId value.

getKeyvaultReferenceIdentityType

public String getKeyvaultReferenceIdentityType()

Get the keyvaultReferenceIdentityType property: Type of the managed identity referencing the Key vault.

Returns:

the keyvaultReferenceIdentityType value.

getKind

public LoadTestKind getKind()

Get the kind property: Kind of test.

Returns:

the kind value.

getLastModifiedBy

public String getLastModifiedBy()

Get the lastModifiedBy property: The user that last modified.

Returns:

the lastModifiedBy value.

getLastModifiedDateTime

public OffsetDateTime getLastModifiedDateTime()

Get the lastModifiedDateTime property: The last Modified datetime(RFC 3339 literal format).

Returns:

the lastModifiedDateTime value.

getLoadTestConfiguration

public LoadTestConfiguration getLoadTestConfiguration()

Get the loadTestConfiguration property: The load test configuration.

Returns:

the loadTestConfiguration value.

getMetricsReferenceIdentityId

public String getMetricsReferenceIdentityId()

Get the metricsReferenceIdentityId property: Resource Id of the managed identity referencing the metrics.

Returns:

the metricsReferenceIdentityId value.

getMetricsReferenceIdentityType

public LoadTestingManagedIdentityType getMetricsReferenceIdentityType()

Get the metricsReferenceIdentityType property: Type of the managed identity referencing the metrics.

Returns:

the metricsReferenceIdentityType value.

getPassFailCriteria

public PassFailCriteria getPassFailCriteria()

Get the passFailCriteria property: Pass fail criteria for a test.

Returns:

the passFailCriteria value.

getPreferences

public TestPreferences getPreferences()

Get the preferences property: Preferences for the test.

Returns:

the preferences value.

getSecrets

public Map<String,TestSecret> getSecrets()

Get the secrets property: Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE.

Returns:

the secrets value.

getSubnetId

public String getSubnetId()

Get the subnetId property: Subnet ID on which the load test instances should run.

Returns:

the subnetId value.

getTestId

public String getTestId()

Get the testId property: Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.

Returns:

the testId value.

isPublicIpDisabled

public Boolean isPublicIpDisabled()

Get the publicIpDisabled property: Inject load test engines without deploying public IP for outbound access.

Returns:

the publicIpDisabled value.

setAutoStopCriteria

public LoadTest setAutoStopCriteria(AutoStopCriteria autoStopCriteria)

Set the autoStopCriteria property: Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window.

Parameters:

autoStopCriteria - the autoStopCriteria value to set.

Returns:

the LoadTest object itself.

setBaselineTestRunId

public LoadTest setBaselineTestRunId(String baselineTestRunId)

Set the baselineTestRunId property: Id of the test run to be marked as baseline to view trends of client-side metrics from recent test runs.

Parameters:

baselineTestRunId - the baselineTestRunId value to set.

Returns:

the LoadTest object itself.

setCertificate

public LoadTest setCertificate(TestCertificate certificate)

Set the certificate property: Certificates metadata.

Parameters:

certificate - the certificate value to set.

Returns:

the LoadTest object itself.

setDescription

public LoadTest setDescription(String description)

Set the description property: The test description.

Parameters:

description - the description value to set.

Returns:

the LoadTest object itself.

setDisplayName

public LoadTest setDisplayName(String displayName)

Set the displayName property: Display name of a test.

Parameters:

displayName - the displayName value to set.

Returns:

the LoadTest object itself.

setEngineBuiltInIdentityIds

public LoadTest setEngineBuiltInIdentityIds(List<String> engineBuiltInIdentityIds)

Set the engineBuiltInIdentityIds property: Resource Ids of the managed identity built in to load test engines. Required if engineBuiltInIdentityType is UserAssigned.

Parameters:

engineBuiltInIdentityIds - the engineBuiltInIdentityIds value to set.

Returns:

the LoadTest object itself.

setEngineBuiltInIdentityType

public LoadTest setEngineBuiltInIdentityType(LoadTestingManagedIdentityType engineBuiltInIdentityType)

Set the engineBuiltInIdentityType property: Type of the managed identity built in load test engines.

Parameters:

engineBuiltInIdentityType - the engineBuiltInIdentityType value to set.

Returns:

the LoadTest object itself.

setEnvironmentVariables

public LoadTest setEnvironmentVariables(Map<String,String> environmentVariables)

Set the environmentVariables property: Environment variables which are defined as a set of <name,value> pairs.

Parameters:

environmentVariables - the environmentVariables value to set.

Returns:

the LoadTest object itself.

setKeyvaultReferenceIdentityId

public LoadTest setKeyvaultReferenceIdentityId(String keyvaultReferenceIdentityId)

Set the keyvaultReferenceIdentityId property: Resource Id of the managed identity referencing the Key vault.

Parameters:

keyvaultReferenceIdentityId - the keyvaultReferenceIdentityId value to set.

Returns:

the LoadTest object itself.

setKeyvaultReferenceIdentityType

public LoadTest setKeyvaultReferenceIdentityType(String keyvaultReferenceIdentityType)

Set the keyvaultReferenceIdentityType property: Type of the managed identity referencing the Key vault.

Parameters:

keyvaultReferenceIdentityType - the keyvaultReferenceIdentityType value to set.

Returns:

the LoadTest object itself.

setKind

public LoadTest setKind(LoadTestKind kind)

Set the kind property: Kind of test.

Parameters:

kind - the kind value to set.

Returns:

the LoadTest object itself.

setLoadTestConfiguration

public LoadTest setLoadTestConfiguration(LoadTestConfiguration loadTestConfiguration)

Set the loadTestConfiguration property: The load test configuration.

Parameters:

loadTestConfiguration - the loadTestConfiguration value to set.

Returns:

the LoadTest object itself.

setMetricsReferenceIdentityId

public LoadTest setMetricsReferenceIdentityId(String metricsReferenceIdentityId)

Set the metricsReferenceIdentityId property: Resource Id of the managed identity referencing the metrics.

Parameters:

metricsReferenceIdentityId - the metricsReferenceIdentityId value to set.

Returns:

the LoadTest object itself.

setMetricsReferenceIdentityType

public LoadTest setMetricsReferenceIdentityType(LoadTestingManagedIdentityType metricsReferenceIdentityType)

Set the metricsReferenceIdentityType property: Type of the managed identity referencing the metrics.

Parameters:

metricsReferenceIdentityType - the metricsReferenceIdentityType value to set.

Returns:

the LoadTest object itself.

setPassFailCriteria

public LoadTest setPassFailCriteria(PassFailCriteria passFailCriteria)

Set the passFailCriteria property: Pass fail criteria for a test.

Parameters:

passFailCriteria - the passFailCriteria value to set.

Returns:

the LoadTest object itself.

setPreferences

public LoadTest setPreferences(TestPreferences preferences)

Set the preferences property: Preferences for the test.

Parameters:

preferences - the preferences value to set.

Returns:

the LoadTest object itself.

setPublicIpDisabled

public LoadTest setPublicIpDisabled(Boolean publicIpDisabled)

Set the publicIpDisabled property: Inject load test engines without deploying public IP for outbound access.

Parameters:

publicIpDisabled - the publicIpDisabled value to set.

Returns:

the LoadTest object itself.

setSecrets

public LoadTest setSecrets(Map<String,TestSecret> secrets)

Set the secrets property: Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE.

Parameters:

secrets - the secrets value to set.

Returns:

the LoadTest object itself.

setSubnetId

public LoadTest setSubnetId(String subnetId)

Set the subnetId property: Subnet ID on which the load test instances should run.

Parameters:

subnetId - the subnetId value to set.

Returns:

the LoadTest object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to