0% found this document useful (0 votes)
20 views15 pages

Dev Ops

The document discusses the importance of build systems in DevOps, highlighting their key functions such as compilation, dependency management, testing, packaging, and deployment. It also covers Jenkins as a popular automation tool for continuous integration and delivery, along with best practices for managing build dependencies. Additionally, the document outlines various types of software testing, including manual and automation testing, and emphasizes the significance of JavaScript testing and REPL-driven development in ensuring code quality.

Uploaded by

artdemios73
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views15 pages

Dev Ops

The document discusses the importance of build systems in DevOps, highlighting their key functions such as compilation, dependency management, testing, packaging, and deployment. It also covers Jenkins as a popular automation tool for continuous integration and delivery, along with best practices for managing build dependencies. Additionally, the document outlines various types of software testing, including manual and automation testing, and emphasizes the significance of JavaScript testing and REPL-driven development in ensuring code quality.

Uploaded by

artdemios73
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

UNIT - 4

Build System

Build systems

A build system is a key component in DevOps, and it plays an important role in the software
development and delivery process.

Here are some of the key functions performed by a build system:

Compilation: The build system compiles the source code into a machine-executable format, such as a
binary or an executable jar file.

Dependency Management: The build system ensures that all required dependencies are available
and properly integrated into the build artifact. This can include external libraries, components, and
other resources needed to run the application.

Testing: The build system runs automated tests to ensure that the code is functioning as intended,
and to catch any issues early in the development process.

Packaging: The build system packages the compiled code and its dependencies into a single,
deployable artifact, such as a Docker image or a tar archive.

Version Control: The build system integrates with version control systems, such as Git, to track
changes to the code and manage releases.

Continuous Integration: The build system can be configured to run builds automatically whenever
changes are made to the code, allowing for fast feedback and continuous integration of new code
into the main branch.

Deployment: Supports automated deployment to production environments.

In DevOps, it's important to have a build system that is fast, reliable, and scalable, and that can
integrate with other tools and processes in the software development and delivery pipeline.
Jenkins build server

What is Jenkin?

Jenkins is a tool that is used for automation. It is mainly an open-source server that allows all the
developers to build, test and deploy software. It is written in Java and runs on java only. By using
Jenkins we can make a continuous integration of projects(jobs) or end-to-endpoint automation

Jenkins facilitates the automation of several stages of the software development lifecycle, including
application development, testing, and deployment

Continuous delivery (CD) and integration (CI) pipelines can be created and managed with Jenkins.

Jenkins dramatically improves the efficiency of the development process

Operating within servlet containers like Apache Tomcat, the technology is server-based.

1. Jenkins is flexible.

2. You can add the n no.of plugins you want to add to the jenkins.

3. You can automate the processes of CI/CD pipelines of all the projects.
Jenkins build server

Managing build dependencies

Managing build dependencies is an important aspect of continuous integration and continuous


delivery (CI/CD) pipelines. In software development, dependencies refer to external libraries, tools,
or resources that a project relies on to build, test, and deploy. Proper management of dependencies
can ensure that builds are repeatable and that the build environment is consistent and up-to-date.

Dependency Management Tools: Utilize tools such as Maven, Gradle, or npm to manage
dependencies and automate the process of downloading and installing required dependencies for a
build.

Version Pinning: Specify exact versions of dependencies to ensure builds are consistent and
repeatable.

Caching: Cache dependencies locally on the build server to improve build performance and reduce
the time it takes to download dependencies.

Continuous Monitoring: Regularly check for updates and security vulnerabilities in dependencies to
ensure the build environment is secure and up-to-date.

Automated Testing: Automated testing can catch issues related to dependencies early in the
development process.

By following these practices, you can effectively manage build dependencies and maintain the
reliability and consistency of your CI/CD pipeline.

Build Phases of Jenkins

In DevOps, there are several phases in the build process, including:

Planning: Define the project requirements, identify the dependencies, and create a build plan.

Code development: Write the code and implement features, fixing bugs along the way.

Continuous Integration (CI): Automatically build and test the code as it is committed to a version
control system.

Continuous Delivery (CD): Automatically deploy code changes to a testing environment, where they
can be tested and validated.

Deployment: Deploy the code changes to a production environment, after they have passed testing
in a pre-production environment.

Monitoring: Continuously monitor the system to ensure that it is functioning as expected, and to
detect and resolve any issues that may arise.
Maintenance: Continuously maintain and update the system, fixing bugs, adding new features, and
ensuring its stability.

These phases help to ensure that the build process is efficient, reliable, and consistent, and that code
changes are validated and deployed in a controlled manner. Automation is a key aspect of DevOps,
and it helps to make these phases more efficient and less prone to human error.

In continuous integration (CI), this is where we build the application for the first time. The build stage
is the first stretch of a CI/CD pipeline, and it automates steps like downloading dependencies,
installing tools, and compiling.

Besides building code, build automation includes using tools to check that the code is safe and
follows best practices. The build stage usually ends in the artifact generation step, where we create a
production-ready package. Once this is done, the testing stage can begin.

Alternative build servers

There are several alternative build servers in DevOps, including:

Jenkins - an open-source, Java-based automation server that supports various plugins and
integrations.

Travis CI - a cloud-based, open-source CI/CD platform that integrates with Github.

CircleCI - a cloud-based, continuous integration and delivery platform that supports multiple
languages and integrates with several platforms.

GitLab CI/CD - an integrated CI/CD solution within GitLab that allows for complete project and
pipeline management.

Bitbucket Pipelines - a CI/CD solution within Bitbucket that allows for pipeline creation and
management within the code repository.

AWS CodeBuild - a fully managed build service that compiles source code, runs tests, and produces
software packages that are ready to deploy.

Azure Pipelines - a CI/CD solution within Microsoft Azure that supports multiple platforms and
programming languages.
UNIT – 5

Types of testing

Various types of testing

Software testing involves various activities like defining a strategy, setting objectives, and creating
test deliverables to identify defects in the software.

Testing types help ensure the Application Under Test (AUT) meets requirements.

The software testing mainly divided into two parts, which are as follows:

o Manual Testing

o Automation Testing

What is Manual Testing?

Testing any software or an application according to the client's needs without using any automation
tool is known as manual testing.

Classification of Manual Testing

In software testing, manual testing can be further classified into three different types of testing,
which are as follows:
o White Box Testing

o Black Box Testing

o Grey Box Testing

White Box Testing

In white-box testing, the developer will inspect every line of code before handing it over to
the testing team or the concerned test engineers.

White box testing is also known as open box testing, glass box testing, structural testing, clear box
testing, and transparent box testing.

Black Box Testing

Another type of manual testing is black-box testing. In this testing, the test engineer will analyze the
software against requirements, identify the defects or bug, and sends it back to the development
team.

The main objective of implementing the black box testing is to specify the business needs or the
customer's requirements.

Types of Black Box Testing

Black box testing further categorizes into two parts, which are as discussed below:

o Functional Testing

o Non-function Testing
Grey Box Testing

Another part of manual testing is Grey box testing. It is a collaboration of black box and
white box testing.

Automation Testing

The most significant part of Software testing is Automation testing. It uses specific tools to
automate manual design test cases without any human interference.

Automation testing is the best way to enhance the efficiency, productivity, and coverage of
Software testing.

It is used to re-run the test scenarios, which were executed manually, quickly, and repeatedly.
Automation testing pros and cons,

Automation of testing Pros and cons

Some other types of Software Testing

In software testing, we also have some other types of testing that are not part of any above
discussed testing, but those testing are required while testing any software or an application.

o Smoke Testing

o Sanity Testing

o Regression Testing

o User Acceptance Testing

o Exploratory Testing

o Adhoc Testing

o Security Testing

o Globalization Testing

o In smoke testing, we will test an application's basic and critical features before doing
one round of deep and rigorous testing.

Sanity Testing

o It is used to ensure that all the bugs have been fixed and no added issues come into
existence due to these changes. Sanity testing is unscripted, which means we cannot
documented it. It checks the correctness of the newly added features and components.

Regression Testing

o Regression testing is the most commonly used type of software testing. Here, the
term regression implies that we have to re-test those parts of an unaffected
application.

o Regression testing is the most suitable testing for automation tools. As per the project
type and accessibility of resources, regression testing can be similar to Retesting.

User Acceptance Testing

o The User acceptance testing (UAT) is done by the individual team known as domain
expert/customer or the client. And knowing the application before accepting the final
product is called as user acceptance testing.
Exploratory Testing

o Whenever the requirement is missing, early iteration is required, and the testing team
has experienced testers when we have a critical application. New test engineer entered
into the team then we go for the exploratory testing.

Adhoc Testing

o Testing the application randomly as soon as the build is in the checked sequence is
known as Adhoc testing.

Security Testing

o It is an essential part of software testing, used to determine the weakness, risks, or


threats in the software application.

Globalization Testing

o Another type of software testing is Globalization testing. Globalization testing is


used to check the developed software for multiple languages or not. Here, the
words globalization means enlightening the application or software for various
languages.

Automation of testing Pros and cons

Pros of Automated Testing:

Automated Testing has the following advantages:

1. Automated testing improves the coverage of testing as automated execution of test


cases is faster than manual execution.

2. Automated testing reduces the dependability of testing on the availability of the test
engineers.

3. Automated testing provides round the clock coverage as automated tests can be run all
time in 24*7 environment.

4. Automated testing takes far less resources in execution as compared to manual


testing.

5. It helps to train the test engineers to increase their knowledge by producing a


repository of different tests.
6. It helps in testing which is not possible without automation such as reliability testing,
stress testing, load and performance testing.

7. It includes all other activities like selecting the right product build, generating the
right test data and analyzing the results.

8. It acts as test data generator and produces maximum test data to cover a large number
of input and expected output for result comparison.

9. Automated testing has less chances of error hence more reliable.

10. As with automated testing test engineers have free time and can focus on other
creative tasks.

Cons of Automated Testing :

Automated Testing has the following disadvantages:

1. Automated testing is very much expensive than the manual testing.

2. It also becomes inconvenient and burdensome as to decide who would automate and
who would train.

3. It has limited to some organisations as many organisations not prefer test automation.

4. Automated testing would also require additionally trained and skilled people.

5. Automated testing only removes the mechanical execution of testing process, but
creation of test cases still required testing professionals.
Selenium features,

Selenium is one of the most widely used open source Web UI (User Interface) automation testing
suite. It was originally developed by Jason Huggins in 2004 as an internal tool at Thought Works.
Selenium supports automation across different browsers, platforms and programming languages.

Selenium can be easily deployed on platforms such as Windows, Linux, Solaris and Macintosh.
Moreover, it supports OS (Operating System) for mobile applications like iOS, windows mobile and
android.

Selenium Features

o Selenium is an open source and portable Web testing Framework.

o Selenium IDE provides a playback and record feature for authoring tests without the need to
learn a test scripting language.

o It can be considered as the leading cloud-based testing platform which helps testers to
record their actions and export them as a reusable script with a simple-to-understand and
easy-to-use interface.

o Selenium supports various operating systems, browsers and programming languages.


Following is the list:

o Programming Languages: C#, Java, Python, PHP, Ruby, Perl, and JavaScript

o Operating Systems: Android, iOS, Windows, Linux, Mac, Solaris.

o Browsers: Google Chrome, Mozilla Firefox, Internet Explorer, Edge, Opera, Safari, etc.

o It also supports parallel test execution which reduces time and increases the efficiency of
tests.

o Selenium can be integrated with frameworks like Ant and Maven for source code
compilation.

o Selenium can also be integrated with testing frameworks like TestNG for application testing
and generating rseports.
o Selenium requires fewer resources as compared to other automation test tools.

o WebDriver API has been indulged in selenium whichis one of the most important
modifications done to selenium.

o Selenium web driver does not require server installation, test scripts interact directly with
the browser.

o Selenium commands are categorized in terms of different classes which make it easier to
understand and implement.
JavaScript testing

JavaScript testing is a crucial part of the software development process that helps ensure the quality
and reliability of code. The following are the key components of JavaScript testing:

Test frameworks: A test framework provides a structure for writing and organizing tests. Some
popular JavaScript test frameworks include Jest, Mocha, and Jasmine.

Assertion libraries: An assertion library provides a set of functions that allow developers to write
assertions about the expected behavior of the code. For example, an assertion might check that a
certain function returns the expected result.

Test suites: A test suite is a collection of related tests that are grouped together. The purpose of a
test suite is to test a specific aspect of the code in isolation.

Test cases: A test case is a single test that verifies a specific aspect of the code. For example, a test
case might check that a function behaves correctly when given a certain input.

Test runners: A test runner is a tool that runs the tests and provides feedback on the results. Test
runners typically provide a report on which tests passed and which tests failed.

Continuous Integration (CI): CI is a software development practice where developers integrate code
into a shared repository frequently. By using CI, developers can catch issues early and avoid
integration problems.

The goal of JavaScript testing is to catch bugs and defects early in the development cycle, before they
become bigger problems and impact the quality of the software. Testing also helps to ensure that the
code behaves as expected, even when changes are made in the future.

There are different types of tests that can be performed in JavaScript, including unit tests, integration
tests, and end-to-end tests. The choice of which tests to write depends on the specific requirements
and goals of the project.
REPL-driven development,

REPL-driven development (Read-Eval-Print Loop) is an interactive programming approach that allows


developers to execute code snippets and see their results immediately. This enables developers to
test their code quickly and iteratively, and helps them to understand the behavior of their code as
they work.

In a REPL environment, developers can type in code snippets, and the environment will immediately
evaluate the code and return the results. This allows developers to test small bits of code and quickly
see the results, without having to create a full-fledged application.

REPL-driven development is commonly used in dynamic programming languages such as Python,


JavaScript, and Ruby. Some popular REPL environments include the Python REPL, Node.js REPL, and
IRB (Interactive Ruby).

Benefits of REPL-driven development include:

Increased efficiency: The immediate feedback provided by a REPL environment allows developers to
test and modify their code quickly, without having to run a full-fledged application.

Improved understanding: By being able to see the results of code snippets immediately, developers
can better understand how the code works and identify any issues early on.

Increased collaboration: REPL-driven development makes it easy for developers to share code
snippets and collaborate on projects, as they can demonstrate the behavior of the code quickly and
easily.
code execution at the client,

In DevOps, code execution at the client refers to the process of executing code or scripts on client
devices or machines. This can be accomplished in several ways, including:

Client-side scripting languages: JavaScript, HTML, and CSS are commonly used client-side scripting
languages that run in a web browser and allow developers to create dynamic, interactive web pages.

Remote execution tools: Tools such as SSH, Telnet, or Remote Desktop Protocol (RDP) allow
developers to remotely execute commands and scripts on client devices.

Configuration management tools: Tools such as Ansible, Puppet, or Chef use agent-based or
agentless architectures to manage and configure client devices, allowing developers to execute code
and scripts remotely.

Mobile apps: Mobile applications can also run code on client devices, allowing developers to create
dynamic, interactive experiences for users.

These methods are used in DevOps to automate various tasks, such as application deployment,
software updates, or system configuration, on client devices. By executing code on the client side,
DevOps teams can improve the speed, reliability, and security of their software delivery process.

You might also like