Continuous Integration Beginner Quiz
30 questions on Continuous Integration.
Question 1: What is the main goal of Continuous Integration (CI)?
- A. Reduce internet speed
- B. Frequently integrate code changes automatically into a shared repository β (correct answer)
- C. Design graphics
- D. Create databases
Explanation: CI encourages developers to merge small code changes constantly, rather than waiting months for a massive, error-prone merge.
Question 2: What typically happens immediately after a developer pushes code to the shared repository in a CI workflow?
- A. The server shuts down
- B. An automated build and testing pipeline is triggered β (correct answer)
- C. The code is deleted
- D. The developer gets paid
Explanation: The core of CI is automated verification. Pushing code triggers a CI server (like Jenkins or GitHub Actions) to compile the code and run tests.
Question 3: What is "Integration Hell"?
- A. A video game level
- B. The chaotic, error-filled process of trying to merge weeks of isolated code changes from multiple developers all at once β (correct answer)
- C. A database error
- D. A firewall configuration
Explanation: CI was specifically invented to prevent Integration Hell by forcing developers to merge daily or hourly.
Question 4: In CI/CD, what does CD stand for?
- A. Compact Disc
- B. Continuous Delivery (or Continuous Deployment) β (correct answer)
- C. Code Development
- D. Continuous Debugging
Explanation: CI is about building and testing. CD is the next step: automatically delivering that tested code to a staging or production environment.
Question 5: Which of the following is a popular CI/CD tool?
- A. Adobe Photoshop
- B. Jenkins β (correct answer)
- C. Microsoft Excel
- D. Mozilla Firefox
Explanation: Jenkins, GitHub Actions, GitLab CI, and CircleCI are all popular tools used to create CI pipelines.
Question 6: Why is Automated Testing crucial for Continuous Integration?
- A. It makes the computer run faster
- B. Without it, you are just continuously integrating broken code faster; tests provide the safety net β (correct answer)
- C. It generates documentation
- D. It writes the code for you
Explanation: If a developer pushes code that breaks a feature, the automated tests will fail, and the CI server will reject the build.
Question 7: What is a "Build Artifact"?
- A. An ancient computer part
- B. The compiled, deployable output generated by the CI process (e.g., a
.zip file, a .jar, or a Docker image) β (correct answer)
- C. The source code
- D. A text editor
Explanation: The goal of the CI pipeline is to turn raw source code into a finished artifact that can be deployed to a server.
Question 8: What does "Failing the Build" mean?
- A. The developer gets fired
- B. The CI pipeline stops and reports an error because the code did not compile or failed its automated tests β (correct answer)
- C. The server crashed permanently
- D. The internet disconnected
Explanation: A broken build is a red alert for the team. The top priority becomes fixing the code so the build passes (turns green) again.
Question 9: What is a Unit Test?
- A. A test of the user interface
- B. An automated test that checks the smallest individual piece of code (like a single function) in isolation β (correct answer)
- C. A test of the server hardware
- D. A security test
Explanation: Unit tests are the fastest and most abundant tests in a CI pipeline, providing instant feedback if a developer breaks a calculation.
Question 10: What is Static Code Analysis?
- A. Analyzing code while it is running on a server
- B. Using automated tools (like SonarQube or ESLint) to inspect the source code for bugs, security flaws, and formatting issues without executing it β (correct answer)
- C. Writing code on paper
- D. Analyzing database performance
Explanation: Static analysis acts like an automated code reviewer, catching bad practices before the code is even compiled.
Question 11: What is the difference between Continuous Delivery and Continuous Deployment?
- A. They are exactly the same
- B. Continuous Delivery prepares the code for release but requires a human to click "Deploy"; Continuous Deployment is 100% automated all the way to production β (correct answer)
- C. Delivery is for web, Deployment is for mobile
- D. Delivery is faster
Explanation: Most enterprise companies use Continuous Delivery because management usually wants final approval before a Friday afternoon release.
Question 12: How does a CI server know when to start a build?
- A. You have to email the server
- B. It uses Webhooks connected to the Version Control System (like Git) to instantly trigger a build on every commit/push β (correct answer)
- C. It guesses randomly
- D. It waits for the weekend
Explanation: Webhooks ensure that the feedback loop is immediate. You push code, and seconds later the build starts.
Question 13: What is a "Pipeline" in CI?
- A. A plumbing pipe
- B. A defined series of sequential automated stages (e.g., Compile β Test β Package β Deploy) that code must pass through β (correct answer)
- C. A network cable
- D. A user manual
Explanation: Pipelines are visualized graphically so teams can see exactly which stage of the process failed.
Question 14: What is Code Coverage?
- A. How much code is hidden
- B. A metric measuring the percentage of your source code that is executed during the automated testing phase β (correct answer)
- C. How many developers wrote the code
- D. The length of the file
Explanation: If your CI pipeline reports 20% code coverage, it means 80% of your code has no automated tests verifying that it works.
Question 15: Why is it a best practice for a CI pipeline to run in an isolated environment (like a fresh Docker container)?
- A. It looks cooler
- B. It ensures the build is reproducible and avoids the "it works on my machine" problem caused by lingering files or custom local settings β (correct answer)
- C. It saves electricity
- D. It requires less code
Explanation: A clean, ephemeral (temporary) environment guarantees that all dependencies are explicitly defined in the code.
Question 16: What is "Branch Protection" in relation to CI?
- A. Encrypting the code
- B. A Git setting that prevents developers from merging code into the main branch unless the CI pipeline (tests and builds) has passed successfully β (correct answer)
- C. Deleting old branches
- D. Backing up the repository
Explanation: Branch protection enforces quality. You cannot bypass the automated tests just because you are in a hurry.
Question 17: What does a "Red Build" indicate in CI dashboards?
- A. The build completed successfully
- B. The pipeline encountered a failure (e.g., compilation error or failed test) β (correct answer)
- C. The build is currently running
- D. The server is updating
Explanation: Traffic light colors are standard in DevOps. Green means success, Red means failure, and Blue/Yellow usually means in-progress.
Question 18: In a typical CI pipeline, which stage should run FIRST?
- A. Deploy to Production
- B. Heavy End-to-End browser testing
- C. Static Code Analysis (Linting) and Unit Tests β (correct answer)
- D. Database migration
Explanation: You want to "Fail Fast." There is no point spending 30 minutes running heavy browser tests if a simple syntax error will fail the unit tests in 2 seconds.
Question 19: What is a "Blue/Green Deployment"?
- A. Changing the website colors
- B. A deployment strategy that runs two identical production environments; new code is deployed to the inactive one, tested, and then traffic is instantly switched over β (correct answer)
- C. Deploying only on eco-friendly servers
- D. A security protocol
Explanation: This strategy ensures zero-downtime deployments. If the new (Green) environment crashes, you instantly route traffic back to the old (Blue) one.
Question 20: What is "Canary Release"?
- A. Releasing software to birds
- B. Deploying the new version of the software to a tiny subset of users (e.g., 5%) to monitor for errors before rolling it out to everyone β (correct answer)
- C. A sound alert on the CI server
- D. Deleting the old software first
Explanation: If the 5% of users experience crashes, the CI/CD system automatically rolls back the deployment before the other 95% are affected.
Question 21: What is the role of a "Staging Environment"?
- A. A stage for presentations
- B. An exact replica of the production environment used to test the final artifact before it goes live to real users β (correct answer)
- C. The developer's laptop
- D. A database backup
Explanation: If it works in Staging, you have high confidence it will work in Production.
Question 22: What does "Pipeline as Code" mean?
- A. Writing the pipeline configuration in a text file (like YAML) stored in version control, rather than clicking through a web UI β (correct answer)
- B. Writing code using a pipe symbol
|
- C. Programming a physical pipe
- D. Keeping the pipeline a secret
Explanation: Tools like GitHub Actions (YAML) and Jenkins (Jenkinsfile) use Pipeline as Code. It allows teams to review and version their build process just like app code.
Question 23: What is End-to-End (E2E) Testing in a CI pipeline?
- A. Testing the internet speed
- B. Simulating a real user clicking through the entire application in an automated browser to ensure all systems (frontend, backend, database) work together β (correct answer)
- C. Checking for syntax errors
- D. Testing a single function
Explanation: E2E tests (using tools like Cypress or Selenium) are very slow and are usually run at the very end of the pipeline.
Question 24: Why is fast build time critical in Continuous Integration?
- A. It saves internet bandwidth
- B. Developers wait for the build to finish before moving on to new tasks; a slow build drastically reduces team productivity and feedback loops β (correct answer)
- C. Fast builds use less memory
- D. Slow builds crash the server
Explanation: If a build takes 2 hours, developers will only integrate their code once a day, entirely defeating the purpose of "Continuous" integration.
Question 25: How can you speed up a slow CI pipeline?
- A. Run stages in parallel (simultaneously) instead of sequentially β (correct answer)
- B. Delete the code
- C. Turn off the server
- D. Use a slower computer
Explanation: If Unit Tests take 5 minutes and Linting takes 5 minutes, running them in parallel means the whole process only takes 5 minutes instead of 10.
Question 26: What is "Trunk-Based Development"?
- A. A woodworking technique
- B. A version control management practice where all developers merge their changes into a central "trunk" (main branch) multiple times a day β (correct answer)
- C. Using many long-lasting feature branches
- D. Writing code without version control
Explanation: Trunk-based development is a prerequisite for true CI. Long-lived feature branches lead straight back to Integration Hell.
Question 27: What is a "Feature Toggle" (or Feature Flag)?
- A. A light switch
- B. A technique allowing developers to merge incomplete features into the main branch safely by hiding them from users in production behind a configuration toggle β (correct answer)
- C. A setting to change the UI color
- D. A security vulnerability
Explanation: This allows developers to practice CI (merging daily) without accidentally releasing half-finished buttons to the public.
Question 28: What does it mean to "Shift Left" in DevOps and CI?
- A. Moving the monitors to the left
- B. Moving testing, security, and quality checks earlier (to the left) in the software development lifecycle, right at the coding stage β (correct answer)
- C. Using left-handed keyboards
- D. Skipping the testing phase
Explanation: Catching a security flaw in the IDE or early CI pipeline is 100x cheaper and easier than catching it in Production.
Question 29: What is a "Rollback" in continuous deployment?
- A. Deleting the database
- B. The automated process of instantly reverting an application to the previous, stable version if the newly deployed version fails health checks β (correct answer)
- C. Starting the project over
- D. Rolling a physical server back
Explanation: Automation isn't just for deploying; it's also for recovering from bad deployments faster than a human could type the commands.
Question 30: What is the difference between an Immutable and Mutable infrastructure deployment?
- A. Immutable deployments update existing servers; Mutable deployments replace them entirely
- B. Mutable deployments update existing servers in place; Immutable deployments completely replace old servers with fresh new ones containing the new code β (correct answer)
- C. There is no difference
- D. Immutable is only for databases
Explanation: Immutable deployments (like destroying old Docker containers and spinning up new ones) prevent "Configuration Drift" and guarantee consistency.