# How do I test an Azure ML online deployment before giving it live traffic?

Exam: AI-300 — Operationalizing Machine Learning and Generative AI Solutions
Knowledge domain: Implement machine learning model lifecycle and operations
Updated: 2026-11-25T04:35:31.40918+00:00
HTML: https://learningpathx.com/faq/AI-300/ai300-direct-test-azure-ml-online-candidate.html

## Also asked as

- How can I invoke a new Azure Machine Learning deployment directly at zero live traffic?
- How do I get a candidate deployment response without changing Azure ML endpoint routing?

Create the candidate deployment with no live allocation and read back the endpoint's traffic settings. Use an authorized client with access to the intended endpoint. With Azure Machine Learning CLI v2, use `az ml online-endpoint invoke` with `--name` for the endpoint, `--deployment-name` for the candidate, and a reviewed `--request-file`. The response comes from that named deployment without a traffic split or shadow copy.

Verify the candidate's representative outputs, errors and latency, and send ordinary requests without the deployment override to confirm the baseline still serves them. On a failed direct test, keep the candidate at zero while investigating its initialization, input or dependency failure.

### Microsoft Learn

* [Safe rollout for online endpoints - Azure Machine Learning](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-safely-rollout-online-endpoints?view=azureml-api-2)
* [Online endpoints for real-time inference - Azure Machine Learning](https://learn.microsoft.com/en-us/azure/machine-learning/concept-endpoints-online?view=azureml-api-2)

Source: [AI-300: Lab: Testing, Rolling Out, and Reverting an Online Model](https://learningpathx.com/news/ai-300-lab-testing-rolling-out-and-reverting-an-online-model.html)
