exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 7 question 42 discussion

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

You need to execute inline testing of an Azure DevOps pipeline that uses a Docker deployment model. The solution must prevent the results from being published to the pipeline.
What should you use for the inline testing?

  • A. a single stage Dockerfile
  • B. an Azure Kubernetes Service (AKS) pod
  • C. a multi-stage Dockerfile
  • D. a Docker Compose file
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
yhredil
Highly Voted 4 years, 6 months ago
It should be C. a multi-stage Dockerfile "Build and test with a multi-stage Dockerfile: build and tests execute inside the container using a multi-stage Docker file, as such test results are not published back to the pipeline." https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=trx%2Cyaml
upvoted 82 times
...
Tealon
Highly Voted 4 years, 5 months ago
For Docker based apps there are many ways to build your application and run tests: Build and test in a build pipeline: build and tests execute in the pipeline and test results are published using the Publish Test Results task. Build and test with a multi-stage Dockerfile: build and tests execute inside the container using a multi-stage Docker file, as such test results are not published back to the pipeline. Build, test, and publish results with a Dockerfile: build and tests execute inside the container and results are published back to the pipeline. See the example below. --> So multi-stage docker file. https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=trx%2Cyaml
upvoted 12 times
rdemontis
3 years, 1 month ago
agree with you
upvoted 1 times
...
...
Gooldmember
Most Recent 6 months, 3 weeks ago
Selected Answer: C
The link, still provides a good argumentation for selecting C https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-test-results-v2?view=azure-pipelines&viewFallbackFrom=azure-devops&tabs=trx%2Ctrxattachments%2Cyaml#docker
upvoted 1 times
...
FeriAZ
1 year, 2 months ago
Selected Answer: C
Inline Testing Requirements: The goal is to execute tests within the pipeline without impacting the final image or published test results. We want to isolate the testing environment from the build process. Separation of Concerns No Test Result Publication
upvoted 1 times
...
vsvaid
1 year, 5 months ago
Selected Answer: C
Multi Stage Dockerfile. We can build and test in the pipeleine
upvoted 1 times
...
ObiWan500
1 year, 6 months ago
Selected Answer: D
To prevent the test results from being published to the pipeline, you can use the --exit-code-from option when running the docker-compose up command.
upvoted 1 times
...
yana_b
1 year, 7 months ago
Selected Answer: C
Build and test in a build pipeline: builds and tests execute in the pipeline and test results are published using the Publish Test Results task. Build and test with a multi-stage Dockerfile: builds and tests execute inside the container using a multi-stage Docker file, as such test results are not published back to the pipeline. Build, test, and publish results with a Dockerfile: builds and tests execute inside the container, and results are published back to the pipeline. See the example below. https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-test-results-v2?view=azure-pipelines&viewFallbackFrom=azure-devops&tabs=trx%2Ctrxattachments%2Cyaml#docker
upvoted 1 times
...
Pamban
1 year, 11 months ago
Selected Answer: D
this question appeared on today's (20/06/23) exam.selected D. scored 955. should be correct! cheers
upvoted 3 times
...
rahul51it
2 years, 3 months ago
C. a multi-stage Dockerfile
upvoted 1 times
...
syu31svc
2 years, 9 months ago
Selected Answer: C
B and D are wrong for sure Between A and C, C is the answer Multi-stage builds are preferred
upvoted 1 times
...
Manjubk
2 years, 10 months ago
Selected Answer: C
Build and test in a build pipeline v/s Build and test with a multi-stage Dockerfile: v/s Build, test, and publish results with a Dockerfile: So, Build and test with a multi-stage Dockerfile: satisfy this.
upvoted 1 times
...
UnknowMan
3 years ago
Selected Answer: C
Multistage is right answer
upvoted 2 times
...
Whirly
3 years, 1 month ago
Exam Question April 1st 2022, went with Multi-Stage.
upvoted 2 times
...
rdemontis
3 years, 1 month ago
Selected Answer: C
IMHO the answer is C https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=trx%2Cyaml#docker
upvoted 1 times
...
tatdatpham
3 years, 2 months ago
Selected Answer: C
Multistage is right answer "Build and test with a multi-stage Dockerfile: build and tests execute inside the container using a multi-stage Docker file, as such test results are not published back to the pipeline." https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=trx%2Cyaml
upvoted 2 times
...
Whirly
3 years, 2 months ago
Selected Answer: D
IHOP, Answer is D, because the question mentions "Prevent the results from being published to the pipeline" if you need to publish results then it is multi-stage.
upvoted 1 times
...
Mev4953
3 years, 2 months ago
Build and test WITHOUT publishing ==> multi-stage
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