LoadTestRun Class

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

Implements

public final class LoadTestRun
implements JsonSerializable<LoadTestRun>

Load test run model.

Constructor Summary

Constructor Description
LoadTestRun()

Creates an instance of LoadTestRun class.

Method Summary

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

Reads an instance of LoadTestRun from the JsonReader.

AutoStopCriteria getAutoStopCriteria()

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

TestCertificate getCertificate()

Get the certificate property: Certificates metadata.

String getCreatedBy()

Get the createdBy property: The user that created.

CreatedByType getCreatedByType()

Get the createdByType property: The type of the entity that created the test run.

String getCreatedByUri()

Get the createdByUri property: The URI pointing to the entity that created the test run.

OffsetDateTime getCreatedDateTime()

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

String getDescription()

Get the description property: The test run description.

String getDisplayName()

Get the displayName property: Display name of a testRun.

Long getDuration()

Get the duration property: Test run duration in milliseconds.

OffsetDateTime getEndDateTime()

Get the endDateTime property: The test run end DateTime(RFC 3339 literal format).

Map<String,String> getEnvironmentVariables()

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

List<ErrorDetails> getErrorDetails()

Get the errorDetails property: Error details if there is any failure in load test run.

Double getEstimatedVirtualUserHours()

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

OffsetDateTime getExecutedDateTime()

Get the executedDateTime property: Test run initiated time.

OffsetDateTime getExecutionEndDateTime()

Get the executionEndDateTime property: The test run execution end DateTime(RFC 3339 literal format).

OffsetDateTime getExecutionStartDateTime()

Get the executionStartDateTime property: The test run execution start DateTime(RFC 3339 literal format).

LoadTestKind getKind()

Get the kind property: Type 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.

PassFailCriteria getPassFailCriteria()

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

String getPortalUrl()

Get the portalUrl property: Portal url.

Map<String,TestRunStatistics> getRegionalStatistics()

Get the regionalStatistics property: Regional statistics.

RequestDataLevel getRequestDataLevel()

Get the requestDataLevel property: Request data collection level for test run.

Map<String,TestSecret> getSecrets()

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

OffsetDateTime getStartDateTime()

Get the startDateTime property: The test run start DateTime(RFC 3339 literal format).

TestRunStatus getStatus()

Get the status property: The test run status.

String getSubnetId()

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

TestRunArtifacts getTestArtifacts()

Get the testArtifacts property: Collection of test run artifacts.

String getTestId()

Get the testId property: Associated test Id.

PassFailTestResult getTestResult()

Get the testResult property: Test result for pass/Fail criteria used during the test run.

String getTestRunId()

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

Map<String,TestRunStatistics> getTestRunStatistics()

Get the testRunStatistics property: Test run statistics.

Double getVirtualUserHours()

Get the virtualUserHours property: Virtual user hours consumed by the test run.

Integer getVirtualUsers()

Get the virtualUsers property: Number of virtual users, for which test has been run.

Boolean isDebugLogsEnabled()

Get the debugLogsEnabled property: Enable or disable debug level logging.

Boolean isPublicIpDisabled()

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

LoadTestRun setAutoStopCriteria(AutoStopCriteria autoStopCriteria)

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

LoadTestRun setCertificate(TestCertificate certificate)

Set the certificate property: Certificates metadata.

LoadTestRun setCreatedByType(CreatedByType createdByType)

Set the createdByType property: The type of the entity that created the test run.

LoadTestRun setDebugLogsEnabled(Boolean debugLogsEnabled)

Set the debugLogsEnabled property: Enable or disable debug level logging.

LoadTestRun setDescription(String description)

Set the description property: The test run description.

LoadTestRun setDisplayName(String displayName)

Set the displayName property: Display name of a testRun.

LoadTestRun setEnvironmentVariables(Map<String,String> environmentVariables)

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

LoadTestRun setPassFailCriteria(PassFailCriteria passFailCriteria)

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

LoadTestRun setRequestDataLevel(RequestDataLevel requestDataLevel)

Set the requestDataLevel property: Request data collection level for test run.

LoadTestRun setSecrets(Map<String,TestSecret> secrets)

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

LoadTestRun setTestId(String testId)

Set the testId property: Associated test Id.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

LoadTestRun

public LoadTestRun()

Creates an instance of LoadTestRun class.

Method Details

fromJson

public static LoadTestRun fromJson(JsonReader jsonReader)

Reads an instance of LoadTestRun from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of LoadTestRun 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.

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.

getCreatedByType

public CreatedByType getCreatedByType()

Get the createdByType property: The type of the entity that created the test run. (E.x. User, ScheduleTrigger, etc).

Returns:

the createdByType value.

getCreatedByUri

public String getCreatedByUri()

Get the createdByUri property: The URI pointing to the entity that created the test run.

Returns:

the createdByUri 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 run description.

Returns:

the description value.

getDisplayName

public String getDisplayName()

Get the displayName property: Display name of a testRun.

Returns:

the displayName value.

getDuration

public Long getDuration()

Get the duration property: Test run duration in milliseconds.

Returns:

the duration value.

getEndDateTime

public OffsetDateTime getEndDateTime()

Get the endDateTime property: The test run end DateTime(RFC 3339 literal format).

Returns:

the endDateTime 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.

getErrorDetails

public List<ErrorDetails> getErrorDetails()

Get the errorDetails property: Error details if there is any failure in load test run.

Returns:

the errorDetails value.

getEstimatedVirtualUserHours

public Double getEstimatedVirtualUserHours()

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

Returns:

the estimatedVirtualUserHours value.

getExecutedDateTime

public OffsetDateTime getExecutedDateTime()

Get the executedDateTime property: Test run initiated time. This is legacy, new developments should use createdDateTime.

Returns:

the executedDateTime value.

getExecutionEndDateTime

public OffsetDateTime getExecutionEndDateTime()

Get the executionEndDateTime property: The test run execution end DateTime(RFC 3339 literal format).

Returns:

the executionEndDateTime value.

getExecutionStartDateTime

public OffsetDateTime getExecutionStartDateTime()

Get the executionStartDateTime property: The test run execution start DateTime(RFC 3339 literal format).

Returns:

the executionStartDateTime value.

getKind

public LoadTestKind getKind()

Get the kind property: Type 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.

getPassFailCriteria

public PassFailCriteria getPassFailCriteria()

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

Returns:

the passFailCriteria value.

getPortalUrl

public String getPortalUrl()

Get the portalUrl property: Portal url.

Returns:

the portalUrl value.

getRegionalStatistics

public Map<String,TestRunStatistics> getRegionalStatistics()

Get the regionalStatistics property: Regional statistics. Key is the Azure region name and value is the test run statistics. The region name should of format accepted by ARM, and should be a region supported by Azure Load Testing. For example, East US should be passed as "eastus". The region name must match one of the strings in the "Name" column returned from running the "az account list-locations -o table" Azure CLI command.

Returns:

the regionalStatistics value.

getRequestDataLevel

public RequestDataLevel getRequestDataLevel()

Get the requestDataLevel property: Request data collection level for test run.

Returns:

the requestDataLevel 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.

getStartDateTime

public OffsetDateTime getStartDateTime()

Get the startDateTime property: The test run start DateTime(RFC 3339 literal format).

Returns:

the startDateTime value.

getStatus

public TestRunStatus getStatus()

Get the status property: The test run status.

Returns:

the status value.

getSubnetId

public String getSubnetId()

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

Returns:

the subnetId value.

getTestArtifacts

public TestRunArtifacts getTestArtifacts()

Get the testArtifacts property: Collection of test run artifacts.

Returns:

the testArtifacts value.

getTestId

public String getTestId()

Get the testId property: Associated test Id.

Returns:

the testId value.

getTestResult

public PassFailTestResult getTestResult()

Get the testResult property: Test result for pass/Fail criteria used during the test run.

Returns:

the testResult value.

getTestRunId

public String getTestRunId()

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

Returns:

the testRunId value.

getTestRunStatistics

public Map<String,TestRunStatistics> getTestRunStatistics()

Get the testRunStatistics property: Test run statistics. Key is the sampler name and value is the set of statistics for performance metrics like response time, throughput, etc. from the load test run. The sampler name is the same as the name mentioned in the test script. Sampler name "Total" represents the aggregated statistics of all the samplers.

Returns:

the testRunStatistics value.

getVirtualUserHours

public Double getVirtualUserHours()

Get the virtualUserHours property: Virtual user hours consumed by the test run.

Returns:

the virtualUserHours value.

getVirtualUsers

public Integer getVirtualUsers()

Get the virtualUsers property: Number of virtual users, for which test has been run.

Returns:

the virtualUsers value.

isDebugLogsEnabled

public Boolean isDebugLogsEnabled()

Get the debugLogsEnabled property: Enable or disable debug level logging. True if debug logs are enabled for the test run. False otherwise.

Returns:

the debugLogsEnabled 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 LoadTestRun 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 LoadTestRun object itself.

setCertificate

public LoadTestRun setCertificate(TestCertificate certificate)

Set the certificate property: Certificates metadata.

Parameters:

certificate - the certificate value to set.

Returns:

the LoadTestRun object itself.

setCreatedByType

public LoadTestRun setCreatedByType(CreatedByType createdByType)

Set the createdByType property: The type of the entity that created the test run. (E.x. User, ScheduleTrigger, etc).

Parameters:

createdByType - the createdByType value to set.

Returns:

the LoadTestRun object itself.

setDebugLogsEnabled

public LoadTestRun setDebugLogsEnabled(Boolean debugLogsEnabled)

Set the debugLogsEnabled property: Enable or disable debug level logging. True if debug logs are enabled for the test run. False otherwise.

Parameters:

debugLogsEnabled - the debugLogsEnabled value to set.

Returns:

the LoadTestRun object itself.

setDescription

public LoadTestRun setDescription(String description)

Set the description property: The test run description.

Parameters:

description - the description value to set.

Returns:

the LoadTestRun object itself.

setDisplayName

public LoadTestRun setDisplayName(String displayName)

Set the displayName property: Display name of a testRun.

Parameters:

displayName - the displayName value to set.

Returns:

the LoadTestRun object itself.

setEnvironmentVariables

public LoadTestRun 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 LoadTestRun object itself.

setPassFailCriteria

public LoadTestRun setPassFailCriteria(PassFailCriteria passFailCriteria)

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

Parameters:

passFailCriteria - the passFailCriteria value to set.

Returns:

the LoadTestRun object itself.

setRequestDataLevel

public LoadTestRun setRequestDataLevel(RequestDataLevel requestDataLevel)

Set the requestDataLevel property: Request data collection level for test run.

Parameters:

requestDataLevel - the requestDataLevel value to set.

Returns:

the LoadTestRun object itself.

setSecrets

public LoadTestRun 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 LoadTestRun object itself.

setTestId

public LoadTestRun setTestId(String testId)

Set the testId property: Associated test Id.

Parameters:

testId - the testId value to set.

Returns:

the LoadTestRun object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to