Guide For QA Engineer Interview - Git and CI - CD

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Guide for QA Engineer Interview: Git and CI/CD

1. Easy-to-understand notes on Git and CI/CD concepts:

Git:

● Version Control System (VCS): Git is a distributed version control system used to track
changes in code during software development.
● Repositories: These are like folders that store your project files and their history. There
are local repositories (on your computer) and remote repositories (usually on platforms
like GitHub or Bitbucket).
● Commits: Each commit represents a snapshot of your project at a specific point in time.
It includes changes made to files along with a commit message explaining those
changes.
● Branches: Branches allow you to work on different versions of your project
simultaneously. The main branch is usually called 'master' or 'main', and you can create
feature branches to work on specific tasks.

CI/CD (Continuous Integration/Continuous Delivery):

● Continuous Integration (CI): CI is the practice of frequently integrating code changes


into a shared repository. It involves automating the build and testing of the code every
time a team member commits changes.
● Continuous Delivery (CD): CD extends CI by automatically deploying all code changes
to a testing or production environment after the build stage. It ensures that software is
always in a deployable state.
● Pipeline: A CI/CD pipeline is a series of steps that code changes go through, from
development to deployment. These steps typically include building the code, running
tests, and deploying to various environments.
● Automation: CI/CD relies heavily on automation to streamline the software delivery
process, ensuring consistency and reliability.

2. Interview Questions on Git and CI/CD:

1. What is Git, and why is it used in software development?


2. Explain the concept of version control.
3. What is a repository in Git?
4. How do you create a new branch in Git?
5. What is a commit, and why is it important?
6. How do you push changes from your local repository to a remote repository?
7. What is a merge conflict, and how do you resolve it?
8. What is Continuous Integration (CI)?
9. Why is Continuous Integration important in software development?
10. What is a CI/CD pipeline?
11. Explain the difference between Continuous Integration and Continuous Delivery.
12. How do CI and CD benefit software development teams?
13. What are the key components of a CI/CD pipeline?
14. What is the purpose of automated testing in CI/CD?
15. How do you trigger a CI/CD pipeline?
16. What are some popular CI/CD tools?
17. How do you ensure the security of a CI/CD pipeline?
18. What is the difference between a build and a deployment in CI/CD?
19. How do you handle a failed build or test in a CI/CD pipeline?
20. What is blue-green deployment, and how does it work?
21. Explain the concept of canary deployment.
22. How do you roll back a deployment in a CI/CD pipeline?
23. What is infrastructure as code (IaC) in the context of CI/CD?
24. How do you monitor the performance of a CI/CD pipeline?
25. What are some best practices for managing Git repositories in a team environment?

3. Clear, concise, and accurate answers:

1. Git is a version control system used to track changes in code during software
development. It allows multiple developers to collaborate on a project efficiently.
2. Version control is the management of changes to documents, computer programs, large
websites, and other collections of information.
3. A repository in Git is like a folder that stores your project files and their history.
4. To create a new branch in Git, you use the command git checkout -b
branch_name.
5. A commit in Git is a snapshot of your project at a specific point in time. It includes
changes made to files along with a commit message explaining those changes.
6. To push changes from your local repository to a remote repository, you use the
command git push origin branch_name.
7. A merge conflict occurs when Git cannot automatically resolve differences between two
commits. You resolve it by manually editing the conflicting files and then committing the
changes.
8. Continuous Integration (CI) is the practice of frequently integrating code changes into a
shared repository. It involves automating the build and testing of the code every time a
team member commits changes.
9. CI is important because it helps identify and fix bugs earlier in the development process,
ensuring that the code is always in a working state.
10. A CI/CD pipeline is a series of steps that code changes go through, from development to
deployment.
11. Continuous Integration focuses on automating the build and testing of code changes,
while Continuous Delivery extends CI by automatically deploying all code changes to a
testing or production environment after the build stage.
12. CI and CD benefit software development teams by increasing efficiency, reducing errors,
and accelerating the delivery of software updates.
13. The key components of a CI/CD pipeline include source control, build automation,
automated testing, and deployment automation.
14. Automated testing in CI/CD ensures that code changes meet quality standards and do
not introduce regressions.
15. You trigger a CI/CD pipeline by committing code changes to the version control system.
16. Some popular CI/CD tools include Jenkins, Travis CI, CircleCI, and GitLab CI/CD.
17. Ensuring the security of a CI/CD pipeline involves implementing access controls,
encryption, and regular security audits.
18. A build compiles the code and runs automated tests, while a deployment makes the
code changes available in a testing or production environment.
19. You handle a failed build or test in a CI/CD pipeline by investigating the cause of the
failure, fixing the issue, and re-running the pipeline.
20. Blue-green deployment is a technique that involves running two identical production
environments (blue and green) and switching traffic between them during deployments.
21. Canary deployment is a technique that involves deploying a new version of an
application to a small subset of users to test its performance and reliability before rolling
it out to the entire user base.
22. You rollback a deployment in a CI/CD pipeline by reverting to a previous version of the
application or infrastructure.
23. Infrastructure as code (IaC) is the practice of managing and provisioning infrastructure
through machine-readable definition files.
24. You monitor the performance of a CI/CD pipeline by tracking metrics such as build
duration, test coverage, and deployment frequency.
25. Best practices for managing Git repositories in a team environment include using
branches for feature development, writing descriptive commit messages, and regularly
syncing changes with the remote repository.

You might also like