Software Testing

JAVA

Java is a programming language and computing platform first released by Sun Microsystems
in 1995. Java is a high-level, class-based, object-oriented programming language that is designed to
have as few implementation dependencies as possible. It is a multi-platform, object-oriented, and
network-centric language that can be used as a platform in itself.

Objects

Objects have states and behaviors. An object is an instance of a class.Java is an object-oriented
programming language. Everything in Java is associated with classes and objects, along with its
attributes and methods.

Constructors

A constructor in Java is a special method that is used to initialize objects. The constructor is called
when an object of a class is created.

Basic Operators in Java

An operator is a symbol which operates on a variable or value. There are types of
operators like arithmetic, logical, conditional, relational, bitwise, assignment operators
etc.

Exception Handling Mechanisms

Java Exception Handling is a mechanism to handle runtime errors such as
ClassNotFoundException, IOException, SQLException, RemoteException, etc.
Exception is an unwanted or unexpected event, which occurs during the execution of a
program, i.e. at run time, that disrupts the normal flow of the program's instructions.

Exception handling in java is one of the powerful mechanisms to handle runtime errors. It plays
an important role in Software Development.

Test Automation Frameworks

A testing framework is a set of guidelines or rules used for creating and designing test cases.
Types of Test Automation Framework; #1) Module Based Testing Framework; #2) Library
Architecture Testing Framework; #3) Data Driven Testing Framework;

Selenium WebDriver Architecture

There are four basic components of WebDriver Architecture: Selenium Language
Bindings. JSON Wire Protocol. Browser Drivers.

Types of XPath

XPath is a powerful selector type for locating elements on a web page. · Types of XPath · Absolute
XPath · Relative XPath.

Interacting with Web Elements

Interacting with web elements ; click (applies to any element) ; send keys (only applies to text
fields and content editable elements)

Types of Waits in Selenium

Selenium WebDriver provides three commands to implement waits in tests.
ï‚· Implicit Wait.
ï‚· Explicit Wait.
ï‚· Fluent Wait.

Handling Multiple Windows and Multiple Tabs using Selenium WebDriver

A window handle stores the unique address of the browser windows. It is just a pointer
to a window whose return type is alphanumeric. The window handle in Selenium
helps in handling multiple windows and child windows. Each browser window has
a unique window handle value through which it can be identified.

Identifying an IFrame :

Right click on the element, If you find the option like 'This Frame' then it is an iframe. …
Right click on the page and click 'View Page Source' and Search with the 'iframe', if you
can find any tag name with the 'iframe' then it is meaning to say the page consisting an
iframe.

Select Class in Selenium WebDriver

The Select Class in Selenium is a method used to implement the HTML SELECT tag.
The html select tag provides helper methods to select and deselect the elements. The
Select class is an ordinary class so New keyword is used to create its object and it
specifies the web element location.

"What is Page Object Model?

Page Object Model, also known as POM, is a design pattern in Selenium that creates
an object repository for storing all web elements. It is useful in reducing code duplication
and improves test case maintenance.

Introduction to Data-Driven Test Framework

Data-driven testing is a software testing methodology that uses a table of conditions directly as test
inputs and verifiable outputs, and in which the test environment settings and control are not hard-
coded.

"Introduction to Hybrid Driven Test Framework

Hybrid Driven Framework is a mix of both the Data-Driven and Keyword Driven
frameworks. In this case, the keywords as well as the test data, are externalized.
Keywords are stored in a separate Java class file and test data can be maintained in a
Properties file or an Excel file.

Parameterization

Parameterization in TestNG allows you to perform data-driven testing in a more efficient manner.

Cucumber

Cucumber is a software tool that supports behavior-driven development. Central to the Cucumber
BDD approach is its ordinary language parser called Gherkin. It allows expected software behaviors
to be specified in a logical language that customers can understand.

Implementing BDD Framework using Cucumber

Implementing BDD Framework Using Cucumber is an effective solution as it enables
testers to perform and write automated test scripts in natural language, which makes it
easier for stakeholders and developers to have a better understanding of test cases.

Test Runner Class

TestRunner class is used to provide the link between the feature file and step definition
file.

Classes

A class is a blueprint for the object. Before we create an object, we first need to define the class.
Class are a set of instructions to build a specific type of object.

Methods

Method in Java or Java Method is a collection of statements that perform some specific task and
return the result to the caller. A method is a block of code that performs a specific task. The only
required elements of a method declaration are the method's return type, name, a pair of
parentheses, () , and a body between braces, {} .

Datatypes in Java

Data types are divided into two groups: Primitive data types – includes byte , short , int ,
long , float , double , boolean and char. Non-primitive data types – such as String ,
Arrays and Classes

Control Flow Statements

Statements that determine which statement to execute and when are known as decision-making
statements.
Control Flow Statements in Java · 1. Decision making statements: if, if else, nested if else · 2.
Looping statements: while, for, do-while

Object-oriented programming:
It aims to implement real-world entities like inheritance, hiding, polymorphism etc.
OOP stands for Object-Oriented Programming. Procedural programming is about writing procedures
or methods that perform operations on the data

Methods and Constructors

Constructors are special methods used to initialize objects whereas methods are used to execute
certain statements. The major difference between constructor and method is that constructor is
called when the creation of an instance of the object is done.

SELENIUM

Selenium is an open source umbrella project for a range of tools and libraries aimed at supporting
browser automation. It provides a playback tool for authoring functional tests across most modern
web browsers, without the need to learn a test scripting language.

Selenium vs. Other Testing Tools

Top 5 Selenium Alternatives For Test Automation · 1. Puppeteer · 2. Cypress · 3. WebdriverIO · 4.
Playwright · 5. Cucumber.
Selenium is an open-source automated testing tool for testing web applications across a
range of browsers. Selenium is the preferred technology for automating web application
testing, functional regression automation, and creating and managing automated test
suites.

Locating Web elements using various Locators

Selenium supports 8 different types of locators namely id, name, className, tagName,
linkText, partialLinkText, CSS selector and xpath.

Selenium Commands in WebDriver

The techniques used to run Selenium test automation scripts are known as Selenium
WebDriver commands. The Selenium Webdriver commands provide a number of
options for interacting with the Webdriver and performing various tasks. These methods
are accessed by calling "driver. methodName()" from a driver variable

Performing Actions on Web Elements:

Performs click-and-hold at the location of the source element, moves to the location of the target
element, then releases the mouse.
ï‚· doubleClick(): Performs double click on the element.
ï‚· clickAndHold(): Performs long click on the mouse without releasing it.
ï‚· dragAndDrop(): Drags the element from one point and drops to another.
ï‚· moveToElement(): Shifts the mouse pointer to the center of the element.

Handling Alerts in Selenium WebDriver

Handling Alert in Selenium
1. void dismiss() The void dismiss method is used to click on the 'Cancel' button of
the alert. …
2. void accept() The void accept method is used to click on the 'OK' button of the
alert. …

3. String getText() The void accept method is used to capture the alert message.. …
4. void sendKeys(String stringToSend)

Scrolling on a web page using JavaScriptExecutor

The JavaScriptExecutor provides an interface that enables QAs to run JavaScript
methods from Selenium scripts. Hence, to scroll up or down with Selenium, a
JavaScriptExecutor is a must. The scrollBy() method involves two parameters, x, and y,
that represent the horizontal and vertical pixel values, respectively.

Switching to IFrames using Selenium WebDriver

Using the Web element technique, you must first locate the web Element of the iFrame
using driver. findElement() then you can specify the element in driver. switchTo().
frame() command.

Selenium WebTables

Web tables or data tables are often used in scenarios where you need to display the
information in a tabular format. The data being displayed can either be static or dynamic
in nature.

What is Page Factory? :&quot

Page Factory is a class provided by Selenium WebDriver to implement the Page Object
Model. The Page Object Repository is separated from the Test Methods using the Page
Factory concept. Using it, you can initialize the Page Objects or directly instantiate
them.

Introduction to Keyword-Driven Test Framework

Keyword Driven Framework is a type of Functional Automation Testing Framework
which is also known as Table-Driven testing or Action Word based testing. The basic
working of the Keyword Driven Framework is to divide the Test Case into four different
parts.

TESTNG

TestNG makes automated tests more structured, readable, maintainable and user-
friendly. It provides powerful features and reporting. Its high-end annotations like
dataprovider, makes it easier to scale up, as you perform cross browser testing across
multiple devices, browsers, and their versions.

Parallel/Cross Browser Testing

Cross browser testing in Selenium can be carried out by parameterizing the browser
variable. For parameterizing the browser variable we can use the @Parameter
annotation of TestNG. Using the @Parameter annotation, we can pass different values
of browser to the test scripts from the testng. xml file.

Step Definition for Cucumber Feature File

Steps definition file stores the mapping between each step of the scenario defined in the
feature file with a code of function to be executed. So, now when Cucumber executes a
step of the scenario mentioned in the feature file, it scans the step definition file and
figures out which function is to be called.

Gherkin Syntax in Cucumber

Gherkin Reference. Cucumber syntax: Given, When, Then · Localisation. Languages in which you
can write

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
Click outside to hide the comparison bar
Compare

Get in touch

MAIL

info@bevyconsulting.com

PHONE

+703-249-2310

ADDRESS

25481 Exart Terrace, southridjng va

Contact form