Condividi tramite


LoadTestAdministrationClient.GetTestFiles Method

Definition

Overloads

Name Description
GetTestFiles(String, CancellationToken)

Get all test files.

GetTestFiles(String, RequestContext)

[Protocol Method] Get all test files.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.

GetTestFiles(String, CancellationToken)

Source:
LoadTestAdministrationClient.cs

Get all test files.

public virtual Azure.Pageable<Azure.Developer.LoadTesting.TestFileInfo> GetTestFiles(string testId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetTestFiles : string * System.Threading.CancellationToken -> Azure.Pageable<Azure.Developer.LoadTesting.TestFileInfo>
override this.GetTestFiles : string * System.Threading.CancellationToken -> Azure.Pageable<Azure.Developer.LoadTesting.TestFileInfo>
Public Overridable Function GetTestFiles (testId As String, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of TestFileInfo)

Parameters

testId
String

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

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

testId is null.

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

Service returned a non-success status code.

Applies to

GetTestFiles(String, RequestContext)

Source:
LoadTestAdministrationClient.cs
Source:
LoadTestAdministrationClient.cs

[Protocol Method] Get all test files.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.Pageable<BinaryData> GetTestFiles(string testId, Azure.RequestContext context = default);
public virtual Azure.Pageable<BinaryData> GetTestFiles(string testId, Azure.RequestContext context);
abstract member GetTestFiles : string * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetTestFiles : string * Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetTestFiles (testId As String, Optional context As RequestContext = Nothing) As Pageable(Of BinaryData)
Public Overridable Function GetTestFiles (testId As String, context As RequestContext) As Pageable(Of BinaryData)

Parameters

testId
String

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

context
RequestContext

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

Returns

The response returned from the service.

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 GetTestFiles and parse the result.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);

foreach (BinaryData item in client.GetTestFiles("<testId>"))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.ToString());
}

This sample shows how to call GetTestFiles with all parameters and parse the result.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
LoadTestAdministrationClient client = new LoadTestAdministrationClient(endpoint, credential);

foreach (BinaryData item in client.GetTestFiles("<testId>"))
{
    JsonElement result = JsonDocument.Parse(item.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