Search Tutorials


AZ-400 Practice Test 3 | Designing and Implementing Microsoft DevOps Solutions | JavaInUse

AZ-400 Designing and Implementing Microsoft DevOps Solutions - Practice Test 3

Your Progress

0 / 50
Question 1 MEDIUM
You want to enforce that all commits to the main branch in Azure Repos include a reference to a work item. Which branch policy should you enable?
The "Check for linked work items" branch policy requires that pull requests have one or more associated work items before they can be completed. This ensures traceability between code changes and requirements. Reviewers require human approval. Build validation triggers CI. Comment resolution requires all PR comments to be resolved. See more: Design and Implement Source Control
Question 2 EASY
Which command initializes a new Git repository in the current directory?
"git init" creates a new Git repository in the current directory by creating a .git subdirectory with the repository structure. "git clone" copies an existing remote repository. "git start" and "git new" are not valid Git commands. See more: Design and Implement Source Control
Question 3 HARD
Your YAML pipeline needs to conditionally run a deployment stage only when the source branch is 'refs/heads/main' and the build reason is 'IndividualCI'. Which expression should you use?
The "and()" function combines multiple conditions that must all be true. Here, both the source branch must be 'refs/heads/main' AND the build reason must be 'IndividualCI'. The first option only checks the branch. The "or()" function requires only one condition to be true. "always()" runs regardless of conditions. See more: Design and Implement Build Pipelines
Question 4 MEDIUM
You want to automatically restart a failed job in your Azure Pipeline without rerunning the entire pipeline. Which feature supports this?
Azure Pipelines allows you to rerun only the failed jobs in a multi-stage pipeline without rerunning successful stages. This saves time and resources when a transient failure occurs. Triggers start pipelines automatically. Caching stores dependencies. Templates provide reusable pipeline definitions. See more: Design and Implement Build Pipelines
Question 5 MEDIUM
You need to implement Azure Automation to run a PowerShell script weekly to clean up unused resources. Which Azure Automation component schedules this execution?
A schedule linked to a runbook in Azure Automation triggers the runbook at specified intervals (e.g., weekly). The runbook contains the PowerShell script logic. A runbook alone is the script definition without scheduling. Webhooks trigger runbooks via HTTP. DSC configurations manage desired state, not scheduled scripts. See more: Design and Implement Infrastructure as Code
Question 6 EASY
In Azure DevOps Boards, which view shows work items organized in columns representing different stages of work (e.g., To Do, Doing, Done)?
The Kanban board in Azure Boards displays work items in columns that represent workflow stages. Teams can customize columns, set WIP limits, and drag items between stages. Sprint backlog shows items assigned to a sprint. Queries return filtered work item lists. Delivery Plans show timeline views across teams. See more: Configure Processes and Communications
Question 7 HARD
You are using Terraform with Azure Pipelines and need to ensure that the Terraform state is not corrupted by concurrent pipeline runs. What mechanism does the Azure backend use to prevent this?
The Terraform azurerm backend uses Azure Blob Storage lease-based locking. When a Terraform operation begins, it acquires a lease on the state blob, preventing other operations from modifying it simultaneously. This prevents state corruption from concurrent access. Table Storage locks, pipeline restrictions, and ARM resource locks are not used for this purpose. See more: Design and Implement Infrastructure as Code
Question 8 MEDIUM
You need to create an Azure DevOps dashboard widget that displays the build success rate over the last 30 days. Which widget type should you add?
The Build history chart widget displays the pass/fail rate of builds over a configurable time period. It shows trends in build health and success rates. Query tile shows work item counts. Burndown chart tracks remaining work in a sprint. Velocity chart shows completed work per sprint over time. See more: Configure Processes and Communications
Question 9 MEDIUM
Your release pipeline deploys to Azure App Service using deployment slots. You want the swap to happen automatically after the staging slot warms up. Which feature should you enable?
Auto-swap in Azure App Service automatically swaps a deployment slot to production after the slot finishes warming up. You enable it on the staging slot and deploy there; once warm-up completes, Azure swaps it to production. Manual swap requires human action. Traffic routing sends a percentage of traffic. Swap with preview requires confirmation before completing. See more: Deployments, Packages and Test Plans
Question 10 EASY
Which Azure DevOps feature integrates with Microsoft Teams to send notifications about pipeline builds and releases?
Azure DevOps provides official Teams apps (Azure Boards, Azure Pipelines, Azure Repos) that integrate directly with Microsoft Teams channels. These apps send notifications for builds, releases, work item updates, and pull requests. Webhooks require custom integration. REST API requires custom code. Monitor alerts are for infrastructure. See more: Configure Processes and Communications
Question 11 MEDIUM
You need to implement a container job in Azure Pipelines that runs build steps inside a Docker container on the agent. How do you specify this in YAML?
In YAML pipelines, you add a "container" property to a job definition specifying the Docker image. All steps within that job then run inside the container. The syntax is: container: image: ubuntu:20.04. Docker@2 is for building/pushing images. KubernetesManifest deploys to AKS. Self-hosted agents aren't specifically container jobs. See more: Design and Implement Release Pipelines
Question 12 HARD
Your organization requires that Azure Pipelines service connections can only be used by specific pipelines. How do you restrict usage?
Service connections in Azure DevOps have pipeline permissions that control which pipelines can use them. You can restrict access to specific pipelines from the service connection's security settings. RBAC controls Azure resource access, not pipeline access. Separate tenants or organizations are unnecessary for this requirement. See more: Develop a Security and Compliance Plan
Question 13 MEDIUM
You want to publish code coverage results from unit tests in your Azure Pipeline. Which task should you use after running tests?
The PublishCodeCoverageResults task publishes code coverage data (Cobertura, JaCoCo formats) to the pipeline build summary. This produces coverage reports visible in the Azure DevOps UI. PublishTestResults publishes test results, not coverage. PublishBuildArtifacts and PublishPipelineArtifact store build outputs. See more: Design and Implement Build Pipelines
Question 14 MEDIUM
You need to deploy an ARM template that references secrets from Azure Key Vault. Which ARM template feature allows you to securely reference Key Vault secrets at deployment time?
ARM template parameter files support Key Vault references that retrieve secrets at deployment time without exposing them. The syntax references the Key Vault resource ID and secret name. The secret value is never stored in the template or parameter file. Variables are static. Nested templates are for modularity. Outputs return deployment results. See more: Design and Implement Infrastructure as Code
Question 15 EASY
What is the primary purpose of Azure Load Balancer in the context of deployments?
Azure Load Balancer distributes incoming network traffic across multiple backend servers to ensure high availability and reliability during deployments. It supports rolling deployments by removing/adding instances from the backend pool. It doesn't store artifacts, manage DNS, or encrypt traffic (that's the role of other services). See more: Deployments, Packages and Test Plans
Question 16 MEDIUM
You want to analyze application performance and detect failures using telemetry data sent by your web application. Which Azure service should you use?
Application Insights is an application performance management (APM) service that collects telemetry data from web applications, including request rates, response times, failure rates, dependency calls, and exceptions. Log Analytics queries log data. Service Health tracks Azure platform status. Advisor provides optimization recommendations. See more: Implement an Instrumentation Strategy
Question 17 HARD
You need to implement OWASP security checks in your pipeline. Which TWO approaches can you use? (Choose two)
Select exactly 2 answers
OWASP ZAP (Zed Attack Proxy) performs dynamic application security testing (DAST) by scanning running applications for vulnerabilities. OWASP Dependency Check scans project dependencies for known vulnerabilities (CVEs). Both can be integrated as pipeline tasks. Azure Policy checks resource compliance, not application security. NSGs are network-level controls. See more: Develop a Security and Compliance Plan
Question 18 MEDIUM
You are using GitHub and want to automatically create pull requests to update package versions when security vulnerabilities are found. Which feature should you configure?
Dependabot security updates automatically create pull requests to update vulnerable dependencies to the minimum secure version. It monitors dependency files and the GitHub Advisory Database. GitHub Actions runs workflows. Code Scanning finds code vulnerabilities. Secret Scanning detects committed secrets. See more: Develop a Security and Compliance Plan
Question 19 EASY
What does CI stand for in the DevOps context?
CI stands for Continuous Integration, the practice of frequently merging code changes into a shared repository and automatically building and testing the code. This helps detect integration issues early. It is a fundamental DevOps practice paired with Continuous Delivery/Deployment (CD). See more: Design and Implement Build Pipelines
Question 20 MEDIUM
You need to configure Azure Pipelines to run integration tests against a SQL database that is provisioned as part of the pipeline. Which approach provides an isolated database for each pipeline run?
Service containers in Azure Pipelines spin up a Docker container (e.g., SQL Server image) alongside the job, providing an isolated database for each pipeline run. The container is destroyed after the job completes. Shared databases have concurrency issues. LocalDB may not be available on all agents. Azure SQL with availability is overkill for testing. See more: Design and Implement Build Pipelines
Question 21 MEDIUM
You have a VM Scale Set (VMSS) and need to apply a configuration script to every new instance automatically. Which Azure feature should you use?
The Custom Script Extension added to the VMSS model definition runs automatically on every new instance when it is provisioned. This is part of the scale set's instance template. Automation runbooks require separate trigger setup. Policy remediation addresses compliance. Event Grid handles event routing, not configuration. See more: Design and Implement Infrastructure as Code
Question 22 EASY
Which Git merge strategy creates a new merge commit that combines the histories of two branches?
A no-fast-forward merge (--no-ff) always creates a new merge commit, preserving the branch history and showing where the branch was merged. Fast-forward simply moves the branch pointer without a merge commit. Squash combines all branch commits into one. Rebase replays commits on top of the target branch. See more: Design and Implement Source Control
Question 23 HARD
You have a complex release pipeline with multiple environments. You need to ensure the staging environment passes a health check for at least 10 minutes before the production deployment starts. Which feature should you configure?
Pre-deployment gates can include Azure Monitor alert queries that are evaluated repeatedly over a sampling interval. You configure a minimum duration (10 minutes) and the gate must pass consistently for that period. Approvals require manual action. Scheduled triggers are time-based. Post-deployment conditions run after deployment, not before the next. See more: Design and Implement Release Pipelines
Question 24 MEDIUM
You want to package versioned npm modules for internal consumption within your Azure DevOps organization. Where should you publish them?
Azure Artifacts provides npm feeds for publishing and consuming npm packages within your organization. Feeds support scoping, upstream sources (proxying npmjs.com), and retention policies. Blob Storage doesn't provide npm registry features. GitHub Packages is a GitHub-specific registry. Public npmjs.com exposes packages to everyone. See more: Deployments, Packages and Test Plans
Question 25 MEDIUM
Your company uses Azure Monitor alerts but receives too many false positives for metric-based alerts. Which feature uses machine learning to automatically set thresholds based on historical patterns?
Dynamic threshold alerts use machine learning to analyze historical metric data and automatically determine what constitutes normal vs. anomalous behavior. They adapt to seasonal patterns, reducing false positives compared to static thresholds. Static thresholds require manual values. Log search alerts query log data. Smart detection is specifically for Application Insights anomalies. See more: Implement an Instrumentation Strategy
Question 26 MEDIUM
You need to grant a pipeline access to Azure resources without storing credentials. The pipeline runs on a self-hosted agent VM in Azure. Which authentication method eliminates credential management?
A system-assigned managed identity on the self-hosted agent VM eliminates the need to store any credentials. Azure manages the identity lifecycle and token issuance. The pipeline tasks use the managed identity to authenticate to Azure resources. Service principals require stored secrets or certificates. PATs are user-scoped tokens. See more: Develop a Security and Compliance Plan
Question 27 EASY
What does the acronym TFVC stand for in Azure DevOps?
TFVC stands for Team Foundation Version Control, a centralized version control system in Azure DevOps. Unlike Git (distributed), TFVC uses a single server repository with check-in/check-out semantics. It supports workspace mappings and exclusive file locks. Git is now the recommended option for new projects. See more: Design and Implement Source Control
Question 28 MEDIUM
Your pipeline deploys an Azure Function App and you need to run functional tests against it before swapping to production. Which deployment slot approach should you use?
Deploying to a staging slot first allows you to run functional tests against the new version without affecting production. Once tests pass, you swap the staging slot to production. Direct production deployment risks user impact. Feature flags don't address deployment validation. A separate App Service plan is unnecessary overhead. See more: Deployments, Packages and Test Plans
Question 29 HARD
You need to run Terraform in Azure Pipelines and want to use a service connection for authentication. Which environment variables does the AzureRM provider expect when using a service principal?
The Terraform AzureRM provider uses the environment variables ARM_CLIENT_ID, ARM_CLIENT_SECRET, ARM_SUBSCRIPTION_ID, and ARM_TENANT_ID for service principal authentication. These map to the Azure service connection credentials. TF_VAR_ prefix is for Terraform variables, not provider auth. The AZURE_ prefixed variables are for the Azure SDK, not Terraform. See more: Design and Implement Infrastructure as Code
Question 30 MEDIUM
You need to set up notifications in Azure DevOps so that a team is emailed when a work item is assigned to them. Where do you configure this?
Notification subscriptions are configured under Project settings > Notifications (or personal notifications in user settings). You can create team-level subscriptions that trigger emails based on events like work item assignment. Organization security manages permissions. Pipeline triggers start builds. Board columns manage workflow stages. See more: Configure Processes and Communications
Question 31 MEDIUM
You have a Jenkins build server that you want to integrate with Azure DevOps Pipelines for triggering builds. Which integration method should you use?
Azure DevOps supports Jenkins service connections that enable Azure Pipelines to trigger Jenkins jobs, download Jenkins artifacts, and integrate Jenkins build results. This provides seamless integration between the two platforms. An agent on Jenkins doesn't help. Webhooks require custom setup. Azure Functions add unnecessary complexity. See more: Design and Implement Build Pipelines
Question 32 EASY
Which Azure DevOps Boards feature allows you to create custom queries to find work items matching specific criteria?
Azure Boards Queries allow you to create flat, tree, or direct-links queries using clauses (field, operator, value) to find work items matching specific criteria. Queries can be shared across the team and used in dashboard widgets. Sprints show iteration work. Backlogs show prioritized lists. Dashboards display widgets. See more: Configure Processes and Communications
Question 33 MEDIUM
You are deploying a containerized microservices application. Which orchestration platform provides built-in service discovery, load balancing, and rolling updates?
Azure Kubernetes Service (AKS) is a managed Kubernetes platform that provides built-in service discovery (DNS-based), load balancing (via Services), rolling updates, self-healing, and horizontal scaling. ACI is for single container groups without orchestration. ACR stores images. App Service for Containers runs single containers. See more: Design and Implement Release Pipelines
Question 34 HARD
You need to implement a Git hook that prevents commits with secrets (API keys, passwords) from being pushed to the remote repository. Which type of hook should you configure?
A pre-commit hook runs before a commit is created, allowing you to scan staged files for secrets and reject the commit if found. Tools like git-secrets or gitleaks use pre-commit hooks. Post-commit runs after the commit (too late to prevent it). Post-receive runs on the server after push. Pre-rebase runs before rebasing. See more: Develop a Security and Compliance Plan
Question 35 MEDIUM
You want to view a real-time map showing how your application's components communicate with each other and their dependencies. Which Azure Monitor feature should you use?
Application Insights Application Map provides a visual, real-time diagram of your application's components and their dependencies, showing communication patterns, response times, and failure rates between components. Metrics shows time-series data. Alerts notify on conditions. Network Watcher monitors network connectivity. See more: Implement an Instrumentation Strategy
Question 36 MEDIUM
Your team is adopting Azure Repos and needs to prevent direct pushes to the main branch, requiring all changes to go through pull requests. What should you configure?
Enabling branch policies on the main branch automatically requires that changes go through pull requests. When any branch policy is enabled, direct pushes are blocked. Denying "Contribute" would prevent all changes including PRs. Organization policies are broader-scoped. Git hooks run locally and can be bypassed. See more: Design and Implement Source Control
Question 37 MEDIUM
You need to configure Azure Pipelines to automatically build when changes are pushed to a fork and a pull request is created. Which trigger type handles this?
The PR trigger (pull request trigger) in Azure Pipelines automatically builds when a pull request is created or updated, including from forked repositories. CI triggers run on push events, not PRs. Scheduled triggers run at specific times. Pipeline resource triggers run when upstream pipelines complete. See more: Design and Implement Build Pipelines
Question 38 EASY
What is the purpose of the "terraform init" command?
"terraform init" initializes the Terraform working directory by downloading required providers, modules, and configuring the backend for state storage. It must be run before any other Terraform command. "terraform apply" applies changes. "terraform plan" shows the execution plan. "terraform destroy" removes infrastructure. See more: Design and Implement Infrastructure as Code
Question 39 HARD
You have an Azure DevOps pipeline that deploys to multiple Azure regions. You need the deployment to proceed region by region, waiting for approval after each region. How should you structure the pipeline?
Using multiple stages (one per region), each deploying to a separate environment with approval checks, provides region-by-region deployment with approval gates. Stage dependencies ensure sequential execution. A single stage can't have mid-job approvals. Deployment groups deploy to machines, not regions. Parallel strategy deploys simultaneously. See more: Design and Implement Release Pipelines
Question 40 MEDIUM
You need to configure upstream sources in an Azure Artifacts feed so developers can install public npm packages through the feed. What does this feature do?
Upstream sources in Azure Artifacts proxy requests to public registries (npmjs.com, nuget.org, etc.) and cache packages as they are consumed. This provides a single feed URL for both internal and public packages. It doesn't mirror the entire registry, block access, or publish to public registries. See more: Deployments, Packages and Test Plans
Question 41 MEDIUM
Your team is planning a sprint in Azure DevOps. You need to set the capacity for each team member to track their available hours. Where do you configure this?
The Capacity tab within a sprint view allows you to set each team member's capacity in hours per day, their days off, and activity types. This data powers the burndown chart and over/under allocation indicators. Backlogs show prioritized items. Team settings configure team membership. Velocity shows historical completed work. See more: Configure Processes and Communications
Question 42 MEDIUM
You need to ensure that Azure Pipelines agents can resolve private DNS names within your corporate network. What type of agent configuration is required?
Self-hosted agents on VMs within your corporate network can resolve private DNS names because they use the network's DNS servers. Microsoft-hosted agents run in Microsoft's infrastructure without access to private DNS. Deployment groups deploy to servers, they don't run builds. Proxy configurations handle HTTP traffic, not DNS resolution. See more: Design and Implement Build Pipelines
Question 43 HARD
You are implementing GitOps for Kubernetes deployments. The desired state of the cluster is stored in a Git repository, and an agent on the cluster syncs changes. Which tool is commonly used for this pattern?
Flux and Argo CD are GitOps operators that run inside the Kubernetes cluster, continuously synchronizing the cluster state with the desired state defined in a Git repository. Azure Pipelines is a CI/CD platform (push-based). Helm is a package manager for Kubernetes. Jenkins is a general CI/CD server. See more: Design and Implement Release Pipelines
Question 44 EASY
What is the main difference between a Universal Package in Azure Artifacts and a NuGet package?
Universal Packages in Azure Artifacts are a general-purpose package type that can contain any files or folders, regardless of language or framework. NuGet is specifically designed for .NET packages with dependency resolution. Universal Packages don't require Docker and have no framework restrictions. See more: Deployments, Packages and Test Plans
Question 45 MEDIUM
You need to create an Azure Monitor action group that sends an SMS notification and creates an ITSM incident when an alert fires. How many action types should the action group contain?
An action group can contain multiple action types. In this case, you need 2 actions: an SMS notification action and an ITSM connector action. Action groups support combining email, SMS, voice, push, webhook, Logic App, Azure Function, Automation runbook, and ITSM actions. Email is not required. See more: Implement an Instrumentation Strategy
Question 46 MEDIUM
You want to scan for exposed secrets (like API keys and tokens) in commits pushed to a GitHub repository. Which GitHub Advanced Security feature should you enable?
GitHub Secret Scanning automatically detects tokens, API keys, and other secrets that have been committed to the repository. It alerts repository administrators and can block pushes containing secrets with push protection. Dependabot checks dependencies. Code scanning finds code vulnerabilities. Branch protection enforces PR rules. See more: Develop a Security and Compliance Plan
Question 47 HARD
You have a Terraform module that provisions an AKS cluster. You want to test the module in isolation before using it in the main configuration. Which testing approach is most appropriate?
Creating a test directory with a minimal root configuration that calls the module with test inputs is the standard approach for testing Terraform modules in isolation. You can run plan/apply and verify outputs. Validate only checks syntax. Manual review is error-prone. Console tests individual expressions, not full modules. See more: Design and Implement Infrastructure as Code
Question 48 MEDIUM
Your Azure DevOps project has multiple teams, and you want each team to have their own backlog and board while sharing the same project. How should you configure this?
Azure DevOps supports multiple teams within a single project, each with their own area path, backlog, board, and sprint views. This allows teams to work independently while sharing repos, pipelines, and other project resources. Separate projects or organizations create unnecessary isolation. Tags don't provide separate backlogs. See more: Configure Processes and Communications
Question 49 MEDIUM
You are implementing a pipeline that uses Helm to deploy applications to AKS. Which task should you use to install or upgrade a Helm chart?
The HelmDeploy task (Helm@0 or HelmDeploy@0) in Azure Pipelines installs, upgrades, or rolls back Helm charts on Kubernetes clusters. It handles chart repositories, values files, and release management. KubernetesManifest deploys raw manifests. Docker@2 builds images. AzureCLI runs Azure CLI commands. See more: Design and Implement Release Pipelines
Question 50 HARD
You need to implement a strategy where Azure Monitor automatically scales the number of Application Insights sampling to reduce telemetry volume during peak traffic. Which feature handles this?
Adaptive sampling in Application Insights automatically adjusts the sampling rate based on telemetry volume. During high traffic, it increases sampling (reduces data sent) to control costs while maintaining statistical accuracy. Fixed-rate uses a constant percentage. Ingestion sampling occurs at the server. Data collection rules configure Log Analytics ingestion. See more: Implement an Instrumentation Strategy

← Back to all AZ-400 Practice Tests


Popular Posts