This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Download Microsoft Edge
More info about Internet Explorer and Microsoft Edge
Learn how to diagnose and troubleshoot errors while running a load test with Azure Load Testing. Download the Apache JMeter worker logs or load test results for detailed logging information. Alternately, you can configure server-side metrics to identify issues in specific Azure application components.
Azure Load Testing runs your Apache JMeter script on the
test engine instances
. During a load test run, errors might occur at different stages. For example, the JMeter test script could have an error that prevents the test from starting. Or there might be a problem to connect to the application endpoint, which results in the load test to have a large number of failed requests.
Azure Load Testing provides different sources of information to diagnose these errors:
Download the Apache JMeter worker logs
to investigate issues with JMeter and the test script execution.
Diagnose failing tests using test results
and analyze the response code and response message of each HTTP request.
Diagnose failing tests using server-side metrics
to identify issues with specific Azure application components.
Prerequisites
An Azure account with an active subscription. If you don't have an Azure subscription,
create a free account
before you begin.
An Azure load testing resource that has a completed test run. If you need to create an Azure load testing resource, see
Create and run a load test
.
Identify load test errors
You can identify errors in your load test in the following ways:
Azure portal
GitHub Actions
Azure Pipelines
The test run has a non-zero error percentage value.
If the test error percentage is below the default threshold, your test run shows as succeeded, even though there are errors. You can add
test fail criteria
based on the error percentage.
You can view the error percentage in the
Statistics
in the load test dashboard for your test run.
The errors chart in the client-side metrics in the load test dashboard shows errors.
The test run has a non-zero error percentage value.
If the test error percentage is below the default threshold, your test run shows as succeeded, even though there are errors. You can add
test fail criteria
based on the error percentage.
You can view the error percentage in GitHub Actions, in the workflow run logging information.
The test run log contains errors.
When there's a problem running the load test, the test run log might contain details about the root cause.
You can view the list of errors in GitHub Actions, on the workflow run
Summary
page, in the
Annotations
section. From this section, you can drill down into the workflow run details to view the error details.
The test run has a non-zero error percentage value.
If the test error percentage is below the default threshold, your test run shows as succeeded, even though there are errors. You can add
test fail criteria
based on the error percentage.
You can view the error percentage in Azure Pipelines, in the pipeline run logging information.
The test run log contains errors.
When there's a problem running the load test, the test run log might contain details about the root cause.
You can view the list of errors in Azure Pipelines, on the pipeline run
Summary
page, in the
Errors
section. From this section, you can drill down into the pipeline run details to view the error details.
Download Apache JMeter worker logs
When you run a load test, the Azure Load Testing test engines execute your Apache JMeter test script. During the load test, Apache JMeter stores detailed logging in the worker node logs. You can download these JMeter worker logs for each test run in the Azure portal. Azure Load Testing generates a worker log for each
test engine instance
.
For example, if there's a problem with your JMeter script, the load test status is
Failed
. In the worker logs you might find additional information about the cause of the problem.
To download the worker logs for an Azure Load Testing test run, follow these steps:
In the
Azure portal
, go to your Azure Load Testing resource.
Select
Tests
to view the list of tests, and then select your load test from the list.
Select a test run from the list to view the test run dashboard.
On the dashboard, select
Download
, and then select
Logs
.
The browser should now start downloading a zipped folder that contains the JMeter worker node log file for each
test engine instance
.
Diagnose failing tests using test results
To diagnose load tests that have failed requests, for example because the application endpoint is not available, the worker logs don't provide request details. You can use the test results to get detailed information about the individual application requests.
Follow these steps to
download the test results for a load test run
.
Open the test results
.csv
file in an editor of your choice.
Use the information in the
responseCode
and
responseMessage
fields to determine the root cause of failing application requests.
In the following example, the test run failed because the application endpoint was not available (
java.net.UnknownHostException
):
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect
1676471293632,13,Home page,Non HTTP response code: java.net.UnknownHostException,Non HTTP response message: backend.contoso.com: Name does not resolve,172.18.44.4-Thread Group 1-1,text,false,,2470,0,1,1,https://backend.contoso.com/blabla,0,0,13
1676471294339,0,Home page,Non HTTP response code: java.net.UnknownHostException,Non HTTP response message: backend.contoso.com,172.18.44.4-Thread Group 1-1,text,false,,2201,0,1,1,https://backend.contoso.com/blabla,0,0,0
1676471294346,0,Home page,Non HTTP response code: java.net.UnknownHostException,Non HTTP response message: backend.contoso.com,172.18.44.4-Thread Group 1-1,text,false,,2201,0,1,1,https://backend.contoso.com/blabla,0,0,0
1676471294350,0,Home page,Non HTTP response code: java.net.UnknownHostException,Non HTTP response message: backend.contoso.com,172.18.44.4-Thread Group 1-1,text,false,,2201,0,1,1,https://backend.contoso.com/blabla,0,0,0
1676471294354,0,Home page,Non HTTP response code: java.net.UnknownHostException,Non HTTP response message: backend.contoso.com,172.18.44.4-Thread Group 1-1,text,false,,2201,0,1,1,https://backend.contoso.com/blabla,0,0,0
Diagnose failing tests using server-side metrics
For Azure-hosted applications, you can configure your load test to monitor resource metrics for your Azure application components. For example, a load test run might produce failed requests because an application component, such as a database, is throttling requests.
Learn how you can monitor server-side application metrics in Azure Load Testing.
For application endpoints that you host on Azure App Service, you can use App Service Insights to get additional insights about the application behavior.
Next steps
Learn how to Export the load test result.
Learn how to Monitor server-side application metrics.
Learn how to Get detailed insights for Azure App Service based applications.
Learn how to Compare multiple load test runs.