Udostępnij za pośrednictwem


LoadTestRunClient.GetTestRunFile(String, String, RequestContext) Method

Definition

Get test run file by file name.

public virtual Azure.Response GetTestRunFile (string testRunId, string fileName, Azure.RequestContext context = default);
abstract member GetTestRunFile : string * string * Azure.RequestContext -> Azure.Response
override this.GetTestRunFile : string * string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetTestRunFile (testRunId As String, fileName As String, Optional context As RequestContext = Nothing) As Response

Parameters

testRunId
String

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

fileName
String

Test run file name with file extension.

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

testRunId or fileName is null.

testRunId or fileName 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 GetTestRunFile with required parameters and parse the result.

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

Response response = client.GetTestRunFile("<testRunId>", "<fileName>");

JsonElement result = JsonDocument.Parse(response.ContentStream).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 the response payload.

Response Body:

Schema for FileInfo:

{
  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