exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 9 question 4 discussion

Actual exam question from Microsoft's AZ-400
Question #: 4
Topic #: 9
[All AZ-400 Questions]

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You need to use an Azure Pipelines pipeline to test an app. The solution meet the following requirements:

• The pipeline must fail if any tests fail.
• The test results must be published to the pipeline.
• The test for every pipeline run must be triggered unless the pipeline is cancelled.

Solution: You include the following elements in the YAML definition of the pipeline.



Does this meet the goal?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Christian_garcia_martin
Highly Voted 8 months, 2 weeks ago
YES The test for every pipeline run must be triggered unless the pipeline is cancelled: This is accomplished by the "condition: always()" clause which ensures the tests are run regardless of the pipeline's state unless it's cancelled. The pipeline must fail if any tests fail: This is ensured by the "failTaskOnMissingResultsFile: true" clause which will fail the task if the results file is not found. However, this will only cause a failure if the results file is missing, not if tests within it fail. It would be more directly relevant if you are using the task to fail the pipeline if the test results indicate failed tests. The test results must be published to the pipeline: The "PublishTestResults@2" task is specifically designed for this purpose and will publish the results found in the specified 'junit.xml' file to the pipeline.
upvoted 5 times
...
areait
Most Recent 1 month, 4 weeks ago
Selected Answer: A
I think it's a yes for me
upvoted 1 times
...
Dankho
4 months, 2 weeks ago
There is no test task PERIOD. You can't publish jack if there's test run or fail pipeline, etc. etc..
upvoted 1 times
...
geoan13
4 months, 3 weeks ago
Selected Answer: B
Even if a previous dependency fails, and even if the run is canceled. Use always() in the YAML for this condition. https://learn.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops#conditions-under-which-a-stage-job-or-step-runs
upvoted 2 times
...
c5cc2ae
5 months, 1 week ago
Selected Answer: A
The answer is YES
upvoted 1 times
...
ahmedMN
5 months, 3 weeks ago
Selected Answer: B
GPT says no : The question on the linked page involves verifying whether a YAML pipeline configuration for Azure Pipelines meets specific requirements: running tests unconditionally unless canceled, failing the pipeline on test failures, and publishing test results. The solution provided seems to partially meet the requirements, particularly with "PublishTestResults@2" for publishing results, but fails to address clear handling of test failures as expected.
upvoted 2 times
...
Mattt
7 months ago
Selected Answer: A
It should be yes
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago