nerdexam
Cisco

300-910 · Question #81

An IT team at a SaaS company has this CI/CD pipeline Developers push code to the central repository by using Git. The code is packaged and sent by an automated process to the staging environment where

The correct answer is C. Run unit tests before build and stage testing. To improve a CI/CD pipeline, integrating unit tests early in the process, specifically before the build and deployment to staging, catches defects faster and reduces the cost of fixing them.

CI/CD Pipelines

Question

An IT team at a SaaS company has this CI/CD pipeline Developers push code to the central repository by using Git. The code is packaged and sent by an automated process to the staging environment where the tests are executed again automatically. If the automated tests pass in staging the code is pushed to production. Which change improves the CI/CD pipeline?

Options

  • AQA must also run the tests manually in the staging environment
  • BOperators must test in another environment before production
  • CRun unit tests before build and stage testing
  • DThe developers run the unit tests manually instead of the QA team

How the community answered

(16 responses)
  • A
    6% (1)
  • B
    13% (2)
  • C
    81% (13)

Why each option

To improve a CI/CD pipeline, integrating unit tests early in the process, specifically before the build and deployment to staging, catches defects faster and reduces the cost of fixing them.

AQA must also run the tests manually in the staging environment

Adding manual QA testing in staging would introduce a manual gate, slowing down the pipeline and contradicting the goal of continuous delivery, rather than improving automation and speed.

BOperators must test in another environment before production

Introducing another environment and manual testing by operators before production would also add delays and increase complexity, similar to manual QA, rather than making the pipeline more efficient.

CRun unit tests before build and stage testingCorrect

Unit tests are fast, targeted tests that verify individual components or functions of the code. Running unit tests *before* the build and deployment to staging ensures that basic code functionality is correct at the earliest possible stage. This 'shift-left' approach catches bugs immediately after code changes, significantly reducing the time and cost of defect resolution compared to finding them later in staging or production.

DThe developers run the unit tests manually instead of the QA team

Developers running unit tests manually is expected practice, but the question asks how to improve the CI/CD pipeline, implying automation. Automating unit tests within the pipeline is the improvement, not manual execution.

Concept tested: CI/CD best practices (shift-left testing)

Source: https://learn.microsoft.com/en-us/azure/devops/learn/what-is-ci-cd#ci

Topics

#CI/CD pipeline optimization#Unit testing#Shift-left testing#Automated testing

Community Discussion

No community discussion yet for this question.

Full 300-910 Practice