exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 9 question 58 discussion

Actual exam question from Microsoft's AZ-400
Question #: 58
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
Dankho
3 months, 4 weeks ago
Selected Answer: B
Not sure how you can satisfy these 2 requirements below if you don't have a test task with the appropriate conditions. You can't include conditions in for the test task in the publish results task, it just doesn't make sense! • The pipeline must fail if any tests fail. (not this one) • The test results must be published to the pipeline. • The test for every pipeline run must be triggered unless the pipeline is cancelled.
upvoted 2 times
...
Gooldmember
5 months, 2 weeks ago
Selected Answer: A
Yes Answer is correct
upvoted 2 times
...
MrAZ105
6 months ago
Selected Answer: A
The line failTaskOnFailedTests: true ensures that the task will fail if any tests fail. This meets the first requirement. Publish Test Results: The task: PublishTestResults@2 indicates that the test results will be published to the pipeline. This meets the second requirement. Trigger Tests on Every Run: The condition: not(canceled()) line is used to prevent the task from running if the pipeline is canceled.
upvoted 3 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