你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

LoadTestingModelFactory.LoadTest Method

Definition

Initializes a new instance of LoadTest.

public static Azure.Developer.LoadTesting.LoadTest LoadTest(Azure.Developer.LoadTesting.PassFailCriteria passFailCriteria = default, Azure.Developer.LoadTesting.AutoStopCriteria autoStopCriteria = default, System.Collections.Generic.IDictionary<string,Azure.Developer.LoadTesting.TestSecret> secrets = default, Azure.Developer.LoadTesting.TestCertificate certificate = default, System.Collections.Generic.IDictionary<string,string> environmentVariables = default, Azure.Developer.LoadTesting.LoadTestConfiguration loadTestConfiguration = default, string baselineTestRunId = default, Azure.Developer.LoadTesting.TestInputArtifacts inputArtifacts = default, string testId = default, string description = default, string displayName = default, string subnetId = default, Azure.Developer.LoadTesting.LoadTestKind? kind = default, bool? publicIpDisabled = default, string keyvaultReferenceIdentityType = default, string keyvaultReferenceIdentityId = default, Azure.Developer.LoadTesting.LoadTestingManagedIdentityType? metricsReferenceIdentityType = default, string metricsReferenceIdentityId = default, Azure.Developer.LoadTesting.LoadTestingManagedIdentityType? engineBuiltInIdentityType = default, System.Collections.Generic.IEnumerable<string> engineBuiltInIdentityIds = default, DateTimeOffset? createdDateTime = default, string createdBy = default, DateTimeOffset? lastModifiedDateTime = default, string lastModifiedBy = default);
static member LoadTest : Azure.Developer.LoadTesting.PassFailCriteria * Azure.Developer.LoadTesting.AutoStopCriteria * System.Collections.Generic.IDictionary<string, Azure.Developer.LoadTesting.TestSecret> * Azure.Developer.LoadTesting.TestCertificate * System.Collections.Generic.IDictionary<string, string> * Azure.Developer.LoadTesting.LoadTestConfiguration * string * Azure.Developer.LoadTesting.TestInputArtifacts * string * string * string * string * Nullable<Azure.Developer.LoadTesting.LoadTestKind> * Nullable<bool> * string * string * Nullable<Azure.Developer.LoadTesting.LoadTestingManagedIdentityType> * string * Nullable<Azure.Developer.LoadTesting.LoadTestingManagedIdentityType> * seq<string> * Nullable<DateTimeOffset> * string * Nullable<DateTimeOffset> * string -> Azure.Developer.LoadTesting.LoadTest
Public Shared Function LoadTest (Optional passFailCriteria As PassFailCriteria = Nothing, Optional autoStopCriteria As AutoStopCriteria = Nothing, Optional secrets As IDictionary(Of String, TestSecret) = Nothing, Optional certificate As TestCertificate = Nothing, Optional environmentVariables As IDictionary(Of String, String) = Nothing, Optional loadTestConfiguration As LoadTestConfiguration = Nothing, Optional baselineTestRunId As String = Nothing, Optional inputArtifacts As TestInputArtifacts = Nothing, Optional testId As String = Nothing, Optional description As String = Nothing, Optional displayName As String = Nothing, Optional subnetId As String = Nothing, Optional kind As Nullable(Of LoadTestKind) = Nothing, Optional publicIpDisabled As Nullable(Of Boolean) = Nothing, Optional keyvaultReferenceIdentityType As String = Nothing, Optional keyvaultReferenceIdentityId As String = Nothing, Optional metricsReferenceIdentityType As Nullable(Of LoadTestingManagedIdentityType) = Nothing, Optional metricsReferenceIdentityId As String = Nothing, Optional engineBuiltInIdentityType As Nullable(Of LoadTestingManagedIdentityType) = Nothing, Optional engineBuiltInIdentityIds As IEnumerable(Of String) = Nothing, Optional createdDateTime As Nullable(Of DateTimeOffset) = Nothing, Optional createdBy As String = Nothing, Optional lastModifiedDateTime As Nullable(Of DateTimeOffset) = Nothing, Optional lastModifiedBy As String = Nothing) As LoadTest

Parameters

passFailCriteria
PassFailCriteria

Pass fail criteria for a test.

autoStopCriteria
AutoStopCriteria

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

secrets
IDictionary<String,TestSecret>

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.

certificate
TestCertificate

Certificates metadata.

environmentVariables
IDictionary<String,String>

Environment variables which are defined as a set of <name,value> pairs.

loadTestConfiguration
LoadTestConfiguration

The load test configuration.

baselineTestRunId
String

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

inputArtifacts
TestInputArtifacts

The input artifacts for the test.

testId
String

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

description
String

The test description.

displayName
String

Display name of a test.

subnetId
String

Subnet ID on which the load test instances should run.

kind
Nullable<LoadTestKind>

Kind of test.

publicIpDisabled
Nullable<Boolean>

Inject load test engines without deploying public IP for outbound access.

keyvaultReferenceIdentityType
String

Type of the managed identity referencing the Key vault.

keyvaultReferenceIdentityId
String

Resource Id of the managed identity referencing the Key vault.

metricsReferenceIdentityType
Nullable<LoadTestingManagedIdentityType>

Type of the managed identity referencing the metrics.

metricsReferenceIdentityId
String

Resource Id of the managed identity referencing the metrics.

engineBuiltInIdentityType
Nullable<LoadTestingManagedIdentityType>

Type of the managed identity built in load test engines.

engineBuiltInIdentityIds
IEnumerable<String>

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

createdDateTime
Nullable<DateTimeOffset>

The creation datetime(RFC 3339 literal format).

createdBy
String

The user that created.

lastModifiedDateTime
Nullable<DateTimeOffset>

The last Modified datetime(RFC 3339 literal format).

lastModifiedBy
String

The user that last modified.

Returns

A new LoadTest instance for mocking.

Applies to