0% found this document useful (0 votes)
22 views

Automation Tools

Study material for software testing

Uploaded by

salmanbeg0102
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)
22 views

Automation Tools

Study material for software testing

Uploaded by

salmanbeg0102
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/ 11

Selenium

What is Selenium Framework?


The Selenium Framework is a code structure that makes code maintenance easy and efficient. Without
frameworks, users may place the “code” and “data” at the same location which is neither reusable nor
readable. Frameworks produce beneficial outcomes like increased code reusability, higher portability,
reduced cost of script maintenance, better code readability, etc.

There are mainly three type of frameworks created by Selenium WebDriver to automate manual test
cases

 Data Driven Test Framework

 Keyword Driven Test Framework

 Hybrid Test Framework

Data Driven Framework in Selenium


Is a method of separating data sets from the test case. Once the data sets are separated from the test
case, it can be easily modified for a specific functionality without changing the code. It is used to fetch
test cases and suites from external files like Excel, .csv, .xml or some database tables.

Keyword Driven Framework in Selenium


Keyword Driven Framework in Selenium is a method used for speeding up automated testing by
separating keywords for common set of functions and instructions. All the operations and instructions to
be performed are written in some external file like an Excel sheet. Users can easily control and specify
the functionalities they want to test.
Hybrid Framework
Hybrid Framework in Selenium is a concept where we are using the advantage of both Keyword driven
framework as well as Data driven framework. It is an easy to use framework which allows manual testers
to create test cases by just looking at the keywords, test data and object repository without coding in
the framework.

Here for keywords, we will use Excel files to maintain test cases, and for test data, we can use data,
provider of Testing framework.

Tools

CI/CD
Continuous Integration, Continuous Delivery or Continuous Deployment

“CI/CD stands for Continuous Integration and Continuous Delivery (or Continuous Deployment), it is
about how an Integrated code on a shared repository is used to release software to production multiple
times a day with the help of automation.”
Continuous integration
CI is a software engineering practice in which frequent, isolated changes are immediately tested
and reported on when they are added to a larger codebase

Continuous Deployment
Every change goes through an automated pipeline and a working version of the application is
automatically pushed to production.

Automatically push changes to production

Continuous Delivery
Helps to build a verified version of the software by continuously implementing fixes and
feedback until finally, you decide to push it out to production.

Manual step is required to push changes to production

Continuous Delivery --------> IRCTC closes its server (under maintenance) for upgrade

Continuous Deployment ---------->Amazon service which works all around the hour
Jenkins
Jenkins is an open source continuous integration/continuous delivery and deployment (CI/CD)
automation software DevOps tool written in the Java programming language. It is used to implement
CI/CD workflows, called pipelines

Installation Video : https://www.youtube.com/watch?v=woMAXn4e8NA


Git

Git is a DevOps tool used for source code management. It is a free and open-source version control
system used to handle small to very large projects efficiently. Git is used to tracking changes in the
source code, enabling multiple developers to work together on non-linear development
Commands

1. Git clone
Git clone is a command for downloading existing source code from a remote repository (like Github, for
example). In other words, Git clone basically makes an identical copy of the latest version of a project in
a repository and saves it to your computer.

There are a couple of ways to download the source code, but mostly I prefer the clone with https way:

git clone <https://name-of-the-repository-link>

2. Git branch
Branches are highly important in the git world. By using branches, several developers are able to work in
parallel on the same project simultaneously. We can use the git branch command for creating, listing
and deleting branches.

Creating a new branch:

git branch <branch-name>

This command will create a branch locally. To push the new branch into the remote repository, you
need to use the following command:

git push -u <remote> <branch-name>


Viewing branches:

git branch or git branch --list

Deleting a branch:

git branch -d <branch-name>

3. Git checkout
This is also one of the most used Git commands. To work in a branch, first you need to switch to it. We
use git checkout mostly for switching from one branch to another. We can also use it for checking out
files and commits.

git checkout <name-of-your-branch>

There are some steps you need to follow for successfully switching between branches:

 The changes in your current branch must be committed or stashed before you switch

 The branch you want to check out should exist in your local

There is also a shortcut command that allows you to create and switch to a branch at the same time:

git checkout -b <name-of-your-branch>

This command creates a new branch in your local (-b stands for branch) and checks the branch out to
new right after it has been created.

4. Git status
The Git status command gives us all the necessary information about the current branch.

git status

We can gather information like:

 Whether the current branch is up to date

 Whether there is anything to commit, push or pull

 Whether there are files staged, unstaged or untracked

 Whether there are files created, modified or deleted

Git status gives information about the branch & files

5. Git add
When we create, modify or delete a file, these changes will happen in our local and won't be included in
the next commit (unless we change the configurations).

We need to use the git add command to include the changes of a file(s) into our next commit.

To add a single file:

git add <file>


To add everything at once:

git add -A

When you visit the screenshot above in the 4th section, you will see that there are file names that are
red - this means that they're unstaged files. The unstaged files won't be included in your commits.

Important: The git add command doesn't change the repository and the changes are not saved until
we use git commit.

6. Git commit
This is maybe the most-used command of Git. Once we reach a certain point in development, we want
to save our changes (maybe after a specific task or issue).

Git commit is like setting a checkpoint in the development process which you can go back to later
if needed.

We also need to write a short message to explain what we have developed or changed in the source
code.

git commit -m "commit message"

Important: Git commit saves your changes only locally.

7. Git push
After committing your changes, the next thing you want to do is send your changes to the remote
server. Git push uploads your commits to the remote repository.

git push <remote> <branch-name>

However, if your branch is newly created, then you also need to upload the branch with the following
command:

git push --set-upstream <remote> <name-of-your-branch>

or

git push -u origin <branch_name>

Important: Git push only uploads changes that are committed.

8. Git pull
The git pull command is used to get updates from the remote repo. This command is a combination
of git fetch and git merge which means that, when we use git pull, it gets the updates from remote
repository (git fetch) and immediately applies the latest changes in your local (git merge).

git pull <remote>

This operation may cause conflicts that you need to solve manually.
9. Git revert
Sometimes we need to undo the changes that we've made. There are various ways to undo our changes
locally or remotely (depends on what we need), but we must carefully use these commands to avoid
unwanted deletions.

A safer way that we can undo our commits is by using git revert. To see our commit history, first we
need to use git log -- oneline:

commit history of my master branch

Then we just need to specify the hash code next to our commit that we would like to undo:

git revert 3321844

After this, you will see a screen like below - just press shift + q to exit:

The advantage of using git revert is that it doesn't touch the commit history. This means that you can
still see all of the commits in your history, even the reverted ones.

Another safety measure here is that everything happens in our local system unless we push them to the
remote repo. That's why git revert is safer to use and is the preferred way to undo our commits.

10. Git merge


When you've completed development in your branch and everything works fine, the final step is
merging the branch with the parent branch (dev or master). This is done with the git merge command.

Git merge basically integrates your feature branch with all of its commits back to the dev (or master)
branch. It's important to remember that you first need to be on the specific branch that you want to
merge with your feature branch.

For example, when you want to merge your feature branch into the dev branch:

First you should switch to the dev branch:

git checkout dev

Before merging, you should update your local dev branch:

git fetch

Finally, you can merge your feature branch into dev:

git merge <branch-name>

Hint: Make sure your dev branch has the latest version before you merge your branches, otherwise
you may face conflicts or other unwanted problems.
Docker
Docker is platform used to containerize your software, using which you can easily build your
application, package them with dependencies required for your application into the container and
futher, these containers are easily shipped to run on other machines.

Why Docker is important?


The Docker goal is to ease the creation, deploy and the delivery of an application using the so called
Containers. The Docker Containers allow the developer/sysadmin to bundle an application with all
needed components (libraries and other resources) and to deliver it as an independent and single
package. Docker is hotter than hot because it makes it possible to get far more apps running on the
same old servers and it also makes it very easy to package and ship programs. Docker is a tool designed
to make it easier to create, deploy, and run applications by using containers. Containers allow a
developer to package up an application with all of the parts it needs, such as libraries and other
dependencies, and ship it all out as one package.

Kubernetes

Kubernetes is a container management system developed in the Google platform. It helps you to
manage a containerized application in various types of physical, virtual, and cloud environment.

Why Kubernetes is important?


Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and
services, that facilitates both declarative configuration and automation. It has a large, rapidly growing
ecosystem. Kubernetes services, support, and tools are widely available. As an orchestrator, it handles
the work of scheduling containers on a cluster and also manages the workloads to ensure they run as
you intended. Originally developed by Google, Kubernetes is an open-source container orchestration
platform designed to automate the deployment, scaling, and management of containerized applications.

You might also like