Before diving into the solutions, I’d like to summarize that Azure Load Testing (which I believe is what you’re referring to as “Azure Cloud Native Test Runner”) evaluates test success differently than standalone JMeter. Your test failures are likely related to either test script compatibility issues or unmet test criteria. Let’s explore how to fix this and how to use that Test Run ID for further diagnostics.

Why Your JMeter Test Shows as “Failed” in Azure

Azure Load Testing uses two distinct indicators to determine the outcome of a load test[13]:

  1. Test status: Indicates if the load test started successfully and ran to completion
  2. Test result: Indicates if the test passed all defined test fail criteria

Your test might be showing as “Failed” due to one of these common reasons:

  • Your JMeter script contains errors or features unsupported by Azure Load Testing
  • The test script references files or plugins unavailable on the test engine instance
  • The autostop functionality interrupted the test because too many requests failed
  • One or more test fail criteria were not met during the test execution[13]

Adapting Exit Conditions in JMeter for Azure

Yes, you likely need to adapt the exit conditions for your test to work properly in Azure Load Testing. Here are some adjustments to consider:

1. Review Test Completion Rules

If your JMeter test is running but showing as failed, you may need to modify how your test determines completion:

  • Consider using a While Controller for operations that need to complete before the test ends[1]
  • Ensure all asynchronous operations are properly terminated at test completion
  • Check that all threads properly exit at the end of the test execution[8]

2. Check for Ongoing Processes

Azure Load Testing may mark a test as failed if there are still processes running after the main test completes. In JMeter, this can happen if:

  • Background threads are still active
  • Connections aren’t being properly closed
  • Timers or listeners continue to run after the test should complete[8]

Using the Test Run ID for Diagnostics

The Test Run ID (UUID) you’re receiving is extremely valuable for diagnostics. Here’s how you can use it:

1. Azure Portal Diagnostics

In the Azure portal:

  1. Navigate to your load testing resource
  2. Select Tests in the left pane
  3. Find and select your test from the list
  4. Locate your test run using the ID
  5. Review the detailed dashboard and error information[13]

2. REST API Access

You can use the Test Run ID with the Azure Load Testing REST API to:

  • Get detailed test run information
  • Download test logs and results
  • Stop a running test if needed[17]

Example API call to stop a test run:

POST https://{endpoint}/test-runs/{testRunId}:stop?api-version=2022-11-01

Application Insights Integration

Regarding Application Insights integration:

While Azure Load Testing doesn’t automatically create an Application Insights instance for each test, you can configure integration to get deeper insights:

  1. Monitor Application Components: You can add app components to monitor server-side metrics and identify performance bottlenecks in your application endpoints[13]

  2. Custom Application Insights Setup: You can set up Application Insights for your application being tested, then use the Test Run ID to correlate load test data with application telemetry[11]

  3. Log Analysis: If you’ve configured Application Insights, you can run queries against the logs data to analyze test performance:

    traces | extend customdims = parse_json(customDimensions) 
    | where customDimensions['TestRunId'] == "your-test-run-id"
    | order by timestamp desc
    

To resolve your issue:

  1. Download and analyze test logs from the Azure portal to identify specific JMeter script issues[13]

  2. Review the test fail criteria in the load test dashboard to understand which criteria aren’t being met[13]

  3. Examine client-side metrics to identify potential issues with specific requests[13]

  4. Check for features unsupported by Azure Load Testing that may be in your JMeter script

  5. Verify test engine health metrics to identify possible resource contention on the test engines[13]

By following these steps, you should be able to determine why your tests are failing and make the necessary adjustments to ensure successful test runs in Azure Load Testing.

Sample Script for JMeter Load Testing in Azure

https://github.com/Azure-Samples/azure-load-testing-samples/tree/main/jmeter-basic-endpoint

Conclusion

The difference between running JMeter locally versus in Azure Load Testing often comes down to how test completion and success criteria are determined. By adapting your exit conditions and properly analyzing test results using the Test Run ID, you can troubleshoot and resolve the “Failed” status. While Application Insights isn’t automatically created for each test, you can integrate it with your application for deeper insights into performance issues during load testing.

Sources [1] How to conditionally exit in jmeter - Stack Overflow https://stackoverflow.com/questions/50740951/how-to-conditionally-exit-in-jmeter [2] Application Insights availability tests - Azure Monitor | Microsoft Learn https://learn.microsoft.com/en-us/azure/azure-monitor/app/availability [3] Monitor your Azure cloud estate - Cloud Adoption Framework https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/manage/monitor [4] Analyze system-generated logs using Application Insights https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/application-insights [5] How to get the first Test Run ID of the Test Case in Azure DevOps API https://stackoverflow.com/questions/57672415/how-to-get-the-first-test-run-id-of-the-test-case-in-azure-devops-api [6] Create a JMeter-based load test - Azure Load Testing | Microsoft Learn https://learn.microsoft.com/en-us/azure/load-testing/how-to-create-and-run-load-test-with-jmeter-script [7] Run manual tests - Azure Test Plans | Microsoft Learn https://learn.microsoft.com/en-us/azure/devops/test/run-manual-tests?view=azure-devops [8] Jest did not exit one second after the test run has completed using … https://stackoverflow.com/questions/53935108/jest-did-not-exit-one-second-after-the-test-run-has-completed-using-express [9] Visual Studio Cloud Load Testing & Error codes - Azure DevOps Blog https://devblogs.microsoft.com/devops/visual-studio-cloud-load-testing-error-codes/ [10] Understanding Azure Load Testing Service: A Comprehensive Guide https://www.linkedin.com/pulse/understanding-azure-load-testing-service-guide-twan-koot [11] Application Insights OpenTelemetry overview - Azure Monitor https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview [12] Running tests using device cloud services - AltTester https://alttester.com/docs/sdk/2.1.0/pages/alttester-with-cloud.html [13] Diagnose failing load tests - Azure Load Testing | Microsoft Learn https://learn.microsoft.com/en-us/azure/load-testing/how-to-diagnose-failing-load-test [14] Observability for Low-Code Tests - Mabl https://www.mabl.com/blog/observability-for-low-code-tests [15] Does azure force kill processes by itself? My nodeJS/Java … https://stackoverflow.com/questions/23005773/does-azure-force-kill-processes-by-itself-my-nodejs-java-processes-jmeter-are-f/23023449 [16] Guide to creating a cloud migration testing strategy - TechTarget https://www.techtarget.com/searchcloudcomputing/tip/Guide-to-creating-a-cloud-migration-testing-strategy [17] Stop Test Run - REST API (Azure Azure Load Testing) https://learn.microsoft.com/en-us/rest/api/loadtesting/dataplane/load-test-run/stop-test-run?view=rest-loadtesting-dataplane-2022-11-01 [18] Tutorial: Identify performance issues with load testing - Learn Microsoft https://learn.microsoft.com/en-us/azure/load-testing/tutorial-identify-bottlenecks-azure-portal [19] Performance Testing in the Cloud: Strategies, Tools & Best Practices https://www.testscenario.com/performance-testing-in-cloud/ [20] Integrate Azure Load Testing with CI/CD & JMeter-based Tests https://www.youtube.com/watch?v=Oo0XthhTuMQ [21] Test Result Shows “Not Applicable” When Running Azure Load Test … https://developercommunity.azure.com/t/Test-Result-Shows-Not-Applicable-When/10733829 [22] Component Reference - Apache JMeter - User’s Manual https://jmeter.apache.org/usermanual/component_reference.html [23] Create and configure Application Insights resources - Azure Monitor https://docs.azure.cn/en-us/azure-monitor/app/create-workspace-resource [24] application-insights-full-demo/Labs/Lab1 - AZ-203_05_lab.md at … https://github.com/enriquecatala/application-insights-full-demo/blob/master/Labs/Lab1%20-%20AZ-203_05_lab.md [25] c# - Application Insights - Unit testing, Azure - Stack Overflow https://stackoverflow.com/questions/39415647/application-insights-unit-testing-azure [26] Azure Application Insights Private Availability testing for Highly … https://www.soft-cor.com/azure-application-insights-private-availability-testing-for-highly-regulated-enterprises/ [27] Troubleshoot your Azure Application Insights availability tests https://docs.azure.cn/en-us/azure-monitor/app/troubleshoot-availability [28] Metrics in Application Insights - Azure Monitor - Learn Microsoft https://learn.microsoft.com/en-us/azure/azure-monitor/app/metrics-overview [29] Entwicklung und Tests in Azure | Microsoft Azure https://azure.microsoft.com/de-de/solutions/dev-test [30] Recommendations for optimizing scaling and partitioning https://learn.microsoft.com/en-us/azure/well-architected/performance-efficiency/scale-partition [31] How to exit a running unit test programmatically (with Visual Studio … https://stackoverflow.com/questions/56279504/how-to-exit-a-running-unit-test-programmatically-with-visual-studio-c-and-uni [32] Advanced Options for Browser Testing Steps - Datadog Docs https://docs.datadoghq.com/synthetics/browser_tests/advanced_options/ [33] System Integration Testing (SIT): A Comprehensive Guide With … https://www.lambdatest.com/learning-hub/system-integration-testing [34] Diagnose with live metrics - Application Insights - Azure Monitor https://learn.microsoft.com/en-us/azure/azure-monitor/app/live-stream [35] Automate the capturing of test results from Application Insights https://devblogs.microsoft.com/ise/automating-app-insights-test-results/ [36] Monitoring and Troubleshooting with Azure Application Insights https://www.youtube.com/watch?v=TV1u6UoBRwk [37] Azure Load Testing - Microsoft Developer Community https://developercommunity.azure.com/loadtesting [38] Security best practices for your Azure assets - Learn Microsoft https://learn.microsoft.com/en-us/azure/security/fundamentals/operational-best-practices [39] Validating Data in Synapse Using Data Flows and Pipelines https://devblogs.microsoft.com/ise/validating-data-in-synapse-using-data-flows-and-pipelines/ [40] Some test categories not getting executed in azure devops release … https://stackoverflow.com/questions/76045415/some-test-categories-not-getting-executed-in-azure-devops-release-pipeline/76226857 [41] Azure Load Testing - Visual Studio Developer Community https://developercommunity.visualstudio.com/loadtesting?ru=https%3A%2F%2Fdevelopercommunity.visualstudio.com%2Fidea%2F1148009%2Fcc-cannot-mark-the-wrong-declaration-order.html [42] Azure Load Testing - Visual Studio Developer Community https://developercommunity.visualstudio.com/loadtesting?scope=follow [43] Transaction Search and Diagnostics - Azure Monitor - Learn Microsoft https://learn.microsoft.com/en-us/azure/azure-monitor/app/transaction-search-and-diagnostics [44] Announcing the Tracetest Integration with Azure App Insights https://tracetest.io/blog/announcing-the-tracetest-integration-with-azure-app-insights [45] Guide to load testing in Node.js with Artillery - LogRocket Blog https://blog.logrocket.com/guide-load-testing-node-js-artillery/ [46] Self Hosted Azure Test Runners - Testable https://docs.testable.io/guides/self-hosted-azure.html [47] microsoft/JMeter-AKS-LoadTest: Automated ADO pipeline … - GitHub https://github.com/microsoft/JMeter-AKS-LoadTest [48] Microsoft.ApplicationInsights.2.10.0/lib … - PowerShell Gallery https://www.powershellgallery.com/packages/PSAppInsightsFix/0.9.6/Content/Microsoft.ApplicationInsights.2.10.0%5Clib%5Cnetstandard2.0%5CMicrosoft.ApplicationInsights.xml [49] Collect profiles with Grafana Pyroscope https://grafana.com/docs/grafana-cloud/testing/k6/analyze-results/integrate-with-grafana-pyroscope/