Megosztás a következőn keresztül:


LoadTestAdministrationClient.GetTestFilesAsync(String, RequestContext) Method

Definition

Get all test files.

public virtual Azure.AsyncPageable<BinaryData> GetTestFilesAsync (string testId, Azure.RequestContext context = default);
abstract member GetTestFilesAsync : string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetTestFilesAsync : string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetTestFilesAsync (testId As String, Optional context As RequestContext = Nothing) As AsyncPageable(Of BinaryData)

Parameters

testId
String

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

context
RequestContext

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

Returns

The AsyncPageable<T> from the service containing a list of BinaryData objects. Details of the body schema for each item in the collection are in the Remarks section below.

Exceptions

testId is null.

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

Service returned a non-success status code.

Examples

This sample shows how to call GetTestFilesAsync with required parameters and parse the result.

var credential = new DefaultAzureCredential();
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new LoadTestAdministrationClient(endpoint, credential);

await foreach (var data in client.GetTestFilesAsync("<testId>"))
{
    JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("url").ToString());
    Console.WriteLine(result.GetProperty("fileName").ToString());
    Console.WriteLine(result.GetProperty("fileType").ToString());
    Console.WriteLine(result.GetProperty("expireDateTime").ToString());
    Console.WriteLine(result.GetProperty("validationStatus").ToString());
    Console.WriteLine(result.GetProperty("validationFailureDetails").ToString());
}

Remarks

Below is the JSON schema for one item in the pageable response.

Response Body:

Schema for FileInfoListValue:

{
  url: string, # Optional. File URL.
  fileName: string, # Optional. Name of the file.
  fileType: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS", # Optional. File type
  expireDateTime: string (ISO 8601 Format), # Optional. Expiry time of the file (ISO 8601 literal format)
  validationStatus: "NOT_VALIDATED" | "VALIDATION_SUCCESS" | "VALIDATION_FAILURE" | "VALIDATION_INITIATED" | "VALIDATION_NOT_REQUIRED", # Optional. Validation status of the file
  validationFailureDetails: string, # Optional. Validation failure error details
}

Applies to