Condividi tramite


LoadTestAdministrationClient.UploadTestFileAsync Method

Definition

Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as application/octet-stream.

public virtual System.Threading.Tasks.Task<Azure.Developer.LoadTesting.FileUploadResultOperation> UploadTestFileAsync (Azure.WaitUntil waitUntil, string testId, string fileName, Azure.Core.RequestContent content, TimeSpan? timeSpan = default, string fileType = default, Azure.RequestContext context = default);
abstract member UploadTestFileAsync : Azure.WaitUntil * string * string * Azure.Core.RequestContent * Nullable<TimeSpan> * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Developer.LoadTesting.FileUploadResultOperation>
override this.UploadTestFileAsync : Azure.WaitUntil * string * string * Azure.Core.RequestContent * Nullable<TimeSpan> * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Developer.LoadTesting.FileUploadResultOperation>
Public Overridable Function UploadTestFileAsync (waitUntil As WaitUntil, testId As String, fileName As String, content As RequestContent, Optional timeSpan As Nullable(Of TimeSpan) = Nothing, Optional fileType As String = Nothing, Optional context As RequestContext = Nothing) As Task(Of FileUploadResultOperation)

Parameters

waitUntil
WaitUntil

Defines how to use the LRO, if passed WaitUntil.Completed then waits for complete file validation

testId
String

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

fileName
String

Unique name for test file with file extension like : App.jmx.

content
RequestContent

The content to send as the body of the request. Details of the request body schema are in the Remarks section below.

timeSpan
Nullable<TimeSpan>

pollingInterval for poller class, default value or null value is treated as 5 secs

fileType
String

File type. Allowed values: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS".

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service. Details of the response body schema are in the Remarks section below.

Exceptions

testId, fileName or content is null.

testId or fileName is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to