Microsoft DevOps Engineer Expert AZ-400 Practice Question
You are standardizing the build pipelines for dozens of repositories that contain a mix of .NET Framework, .NET Core, and native C++ projects. You need a single YAML template that, when invoked after the build stage, will automatically locate all produced unit-test assemblies, execute the tests regardless of framework (MSTest, NUnit, or xUnit), and publish the results to the Tests tab without an extra publishing step. Which built-in Azure Pipelines task should you include in the template to meet these requirements?
The Visual Studio Test task (VisualStudioTest@2) can discover and run any test assemblies that use adapters supported by Visual Studio, including MSTest, NUnit, and xUnit tests compiled for .NET Framework, .NET Core, or native code. The task automatically publishes the results to Azure DevOps, so no additional PublishTestResults task is required.
DotNetCoreCLI@2 runs only .NET Core tests and does not handle native C++ tests. CTask@1 (CTest) is limited to CMake/CTest native projects and cannot run managed-code tests. PublishTestResults@2 merely uploads result files that have already been produced; it does not execute tests or discover assemblies, so it cannot satisfy the requirement by itself.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the Visual Studio Test task (VisualStudioTest@2)?
Open an interactive chat with Bash
How does VisualStudioTest@2 automatically publish test results in Azure DevOps?
Open an interactive chat with Bash
What makes VisualStudioTest@2 superior to DotNetCoreCLI@2 for multi-framework testing?
Open an interactive chat with Bash
Microsoft DevOps Engineer Expert AZ-400
Design and implement build and release pipelines
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .