TESTING
TESTING
TESTING
com
MANUAL TESTING
1.What is testing?
The process or method of finding error/s in a software application or program so that
the application functions according to the end user's requirement is called software
testing.
Or
The process of evaluating a system or its components with the intention to find
whether it satisfies the specified/required requirements or no. In other words,
testing is executing a system to identify any gaps, errors, or missing requirements in
contract of the actual requirements.
2.Explain SDLC?
SDLC is a systematic process for building software that ensures the quality and
correctness of the software built. SDLC process aims to produce high-quality software
that meets customer expectations. The system development should be complete in
the pre-defined time frame and cost. SDLC consists of a detailed plan which explains
how to plan, build, and maintain specific software. Every phase of the SDLC life Cycle
has its process and deliverables that feed into the next phase. SDLC stands for
Software Development Life Cycle and is also referred to as the Application
Development life-cycle
It includes everything which should be designed and developed during the project
life cycle.
Design:
In this phase, the system and software design documents are prepared as per the
requirement
specification document. This helps define the overall system design.
This design phase serves as the input for the next phase of the model.
There are two types of design documents developed in this phase:
High-Level Design (HLD)
An outline of the functionalities of every module and the
Interface relationship and dependencies between modules
Database tables identified along with their key elements
Complete design diagrams along with technology details
Low-Level Design (LLD)
Functional logic of the modules
Database tables, which include type and size
Complete detail of the interface
Addresses all types of dependency issues
Complete input and outputs for every module
Coding:
Once the system design phase gets over, the next phase is coding. In this phase,
developers begin building the entire system by writing code using the chosen
programming language. In this phase, tasks are divided into units and assigned to
the various developers.
In this phase, the developer needs to follow certain predefined coding guidelines.
They also need to use programming tools compiler, interpreter, and debugger to
generate and implement the code.
Testing:
Once the software is complete, it is deployed into a testing environment. The
testing team starts testing the functionalities of the entire system. This is done to
ensure that the entire application works according to the customer's
requirement.
Quality Assurance and testing team may find some bugs/defects which they
communicate to developers. The development team fixes the bug and sends it back
to QA for a re-test. This process is performed until the
Page | 2 #Code with KodNest
www.kodnest.com
software is bug-free, stable, and working according to the business needs of that
system.
Installation/Deployment:
Once the testing phase is over and no bugs or errors are left in the system then the
final deployment process begins. Based on the inputs given by the project head, the
final software is released and checked for deployment issues if any.
Maintenance:
Once the system is installed, and customers start using the developed software, the
following activities occurs.
Bug fixing - bugs are reported because of some scenarios which are not tested at all
Upgrade - Upgrading the application to the newer versions of the Software
Enhancement - Adding some new features to the existing software
Feasibility Study: The main goal of this study is to determine whether it would
be financially and technically feasible to develop the software.
The feasibility study involves understanding the problem and then determining
the various possible strategies to solve the problem. The best solution is chosen
and all the other phases are carried out as per this solution strategy.
Design: The design phase aims to transform the requirements specified in the
SRS document into a structure that is suitable for implementation in some
programming languages. In this software design is translated into source code
using any suitable programming language. Thus, each designed module is coded.
Advantages
Simple and easy to understand
completed all at once.
Works well for smaller projects where requirements are very well understood.
Clearly defined stages.
Easy to arrange tasks.
Process and results are well documented.
Disadvantages
A high amount of risk
is involved.
Not suited for large and object-oriented projects.
Poor model for long and ongoing projects.
Table of Contents
Introduction..............................................................................................................................4 1.1
Purpose ......................................................................................................................................4 1.2
Scope ...........................................................................................................................................4 1.3
Product perspective .............................................................................................................4 1.4
Product functions...................................................................................................................5 1.5
User characteristics .............................................................................................................5 1.6
Limitations ...............................................................................................................................5 1.7
Assumptions and dependencies......................................................................................5 1.8
Definitions.................................................................................................................................5 1.9
Acronyms and abbreviations............................................................................................5 2.
Requirements..........................................................................................................................6 2.1
External interfaces................................................................................................................6 2.2
Functions...................................................................................................................................6 2.3
Usability requirements.......................................................................................................12 2.4
Performance requirements...............................................................................................12 2.5
Logical database requirements.......................................................................................12 2.6
Design constraints.................................................................................................................12 2.7
Standards compliance.........................................................................................................12 2.8
Software system attributes ..............................................................................................12 3.
Verification .............................................................................................................................13 4.
Supporting information......................................................................................................13 5.
References................................................................................................................................13 1.
Introduction
1.1 Purpose The main purpose of this document is to provide a working example of a
Software Requirements Specification (SRS)
1.2 Scope This document specifies requirements for a simple application for
requirements management of software and system products. The application allows
users to: • Capture requirements specifications • Manage requirements using custom
attributes • Set up requirements traceability • Browse the requirements traceability
matrix • Comment and review requirements • Filter and search requirements •
Import requirements from MS Word or Excel • Export requirements to DOCX, XLSX,
PDF, HTML, or CSV • Analyse requirements coverage and impact of changes • Print
requirements specifications The application stores documents as human-readable
files with open file format. The application runs offline without connection to any
server. Check all advanced requirements management features it offers now.
1.3 Product perspective 1.3.1 System interfaces the application runs in the latest
version of Chrome or Firefox browser on Windows, Linux and Mac. 1.3.2 User
interfaces the application GUI provides menus, toolbars, buttons, panes, containers,
grids allowing for easy control by a keyboard and a mouse.1.3.3 Hardware
[DEMO-SRS-61] The application shall allow users to create a document template file
from the opened document.
[DEMO-SRS-89] The application shall allow users to show and hide requirements
table columns except the ID column.
[DEMO-SRS-90] The application shall allow users to sort all requirements table
columns except the Discussion and Links columns by ascending or descending
order. 2.2.2.3 Detailed Information
[DEMO-SRS-92] The application shall allow users to show and hide a pane
displaying detailed information about custom attributes, discussion, traceability
links or history of changes of the selected requirement.
[DEMO-SRS-93] While the custom attributes pane is shown, the application shall
display values of all assigned custom attributes for the selected requirement.
[DEMO-SRS-94] While the discussion pane is shown, the application shall display
all comments for the selected requirement ordered by date and time.
[DEMO-SRS-96] While the discussion pane is shown, the application shall allow
users to expand or collapse a selected comment or all displayed comments.
[DEMO-SRS-97] While a displayed discussion comment is expanded, then the
application shall display the date, time, author and description of the comment.
[DEMO-SRS-98] While a displayed discussion comment is collapsed, then the
application shall display the date, time and author of the comment.
[DEMO-SRS-99] While the links pane is shown, the application shall display all
traceability links starting in or leading to the selected requirement grouped by link
types and ordered by ID of the linked object.
[DEMO-SRS-142] When user clicks on a traceability link then the application shall
focus the linked requirement. 2.2.3 Edit Document 2.2.3.1 Document Structure.
[DEMO-SRS-106] The application shall allow users to create a new requirement
and place it in any document section.
[DEMO-SRS-107] When users create a new requirement the application shall
assign it a unique ID which cannot be changed.
[DEMO-SRS-108] The application shall allow users to copy selected requirements
or document sections within the document.
[DEMO-SRS-109] The application shall allow users to move selected requirements
or document sections within the document.
[DEMO-SRS-110] The application shall allow users to mark selected requirements
or document sections as deleted.
4. Supporting information
5. References [DEMO-NEEDS]: User Needs [DEMO-TESTS]:
Verification Tests
It is a combination of the waterfall model and the and iterative model. Spiral Model
helps us to adopt software development elements of multiple process models for
the software project based on unique risk patterns ensuring efficient development
process.
The development process in the Spiral model, starts with a small set of
requirements and goes through each development phase for those sets of
requirements. The software engineering team adds functionalities for the
additional requirements increasing spirals until the application is ready for the
production phase.
Advantages
Additional functionality or changes can be done at a later stage
Continuous or repetition development helps in risk management
Development is fast and features are added systematically in Spiral development
There is always a space for customer inputs and feedback
Disadvantages
Risk of not meeting the schedule or budget within deadlines
Spiral development works best only for large projects and also demands risk
assessment expertise
Spiral software development is not advisable for a small project, it might cost them a
lot
Disadvantages
Prototyping is a slow and time taking process.
The cost for developing a prototype would cost more and it is inefficient as the
prototype is ultimately thrown away.
Prototyping may encourage excessive change requests.
Sometimes customers may not be willing to participate in the iteration cycle for
longer time duration.
There may be too many variations in software requirements when each time the
prototype is evaluated by the customer.
It is very difficult for software developers to accommodate all the changes
demanded by the customer.
The client may lose interest in the final product when he or she is not happy with
the initial prototype.
Developers who want to build prototypes quickly may end up with building sub-
standard development solutions.
Advantages
Easy to Understand.
Testing Methods like planning, and test design goes well before coding.
Saves a lot of time. Hence the chance of success over the waterfall model.
Works well for small projects where requirements are easily understood.
Disadvantages
Very rigid and least flexible.
Not good for a large project.
Software is developed during the implementation stage, so no early prototypes of the
software are produced.
If any changes happen in the process, then the test documents along with the required
documents has to be updated.
What is Scrum?
Scrum is a framework that helps agile teams to work together. Using this, the
team members can deliver and sustain the complex product. It encourages the
team to learn through practice and self-organize while working on the problem.
Scum is work done through the framework and continuously shipping values to
the customers.
Its principle and lessons can be applied to all kinds of teamwork. Scrum describes
a set of tools, meetings, and roles that help the team structure.
Scrum and agile are not the same thing because Scrum focused on continuous
improvement, which is a core foundation of agile. Scrum framework focuses mainly
on getting work done.
Sprints are a short time period for the Scrum team that works to complete amount of
work. Sprints are the main component of Scrum and agile methodology. The right
sprints will help the agile team to ship better software.
AGILE TESTING
Agile testing is a software testing that follows the best practices of Agile
development
.
8.What Does an Agile Tester Do?
Quality Assurance is everyone's responsibility in Agile. So, Agile testers and
developers need to work together.
Agile development is often driven by tests. Developers use Agile testing
methods like test-driven development to write the test first. Then they write
the code that will be verified by the developers and Agile testers should
collaborate before user stories (e.g., requirements) are set.
Tests come first in Agile development. When we create a user story, we need to
define the acceptance criteria. This drives the testing and validation of the user
stories.
D)Exploratory Testing
Exploratory testing is a kind of testing that lets testers follow their thinking
— rather than a predefined path. It's typically manual testing. We record
what we're doing and save it as a test. And we figure out what exactly it is
that we are testing as we go.
Exploratory testing is typically used to find the hidden risks within a
product. These would be defects that are missed in functional tests done in
TDD.
Benefits of Agile Test Methodology
Agile testing improves the product quality and enables development teams
to release software in shorter cycles.
We'll find and fix errors faster. So, we can lower the risk of finding a bug at
the very end of testing and missing a deadline.
TYPES OF TESTING
1. BLACK BOX TESTING
2. WHITE BOX TESTING
3. GREY BOX TESTING
In this kind of integration testing approach, most of the developed modules are
coupled together to form a complete software system (a major part of the system)
which is then used for integration testing. This method is effective in saving time
in integration testing process. However, if the test cases and their results are not
properly recorded, the entire integration process will be complicated and may
prevent the testing team in getting their targeted goals or results of integration
testing.
ADVANTAGES
Helps testers in saving integration testing time.
Here all components of the software are integrated at once.
Convenient for small systems.
Beta Testing:
Beta testing is used to assess the product by exposing it to the real end-users, usually
called beta testers in their environment. Feedback is collected from the users and
the defects are fixed. Also, this helps in enhancing the product to give a rich user
experience.
14.What is Re-Testing?
Re-testing the application means verifying whether the defects have been fixed or not.
STLC Phases
There are following six major phases in every Software Testing Life Cycle Model
(STLC Model):
Requirement Analysis
Test Planning
Test case development
Test Environment setup
Test Execution
Test execution report
Requirement Analysis:
Requirement Analysis is the first step of Software Testing Life Cycle (STLC). In this
phase quality assurance team understands the requirements like what is to be
tested. If anything is missing or not understandable then quality assurance team
meets with the stakeholders to better understand the detail knowledge of
requirement.
Test Planning:
Test Planning is most efficient phase of software testing life cycle where all testing
plans are defined. In this phase manager of the testing team calculates estimated
effort and cost for the
testing work. This phase gets started once the requirement gathering phase is
completed.
Test Design:
The test team starts with test case development activity here in this phase. Testers
prepares test cases, test scripts (if automation), and test data.
Once the test cases are ready then these test cases are reviewed by peer members or
team lead.
Test Execution:
The test team starts executing the test cases based on the planned test cases. If a test
case result is Pass/Fail then the same should be updated in the test cases.
The defect report should be prepared for failed test cases and should be reported to
the Development Team through a bug tracking tool for fixing the defects.
Defect Tracking
Defect tracking is the process of identifying, isolating and managing the defects.
The bug life cycle is also known as the Defect life cycle. In the Software
Development Process, the bug has a life cycle. The bug should go through the life cycle
to be closed.
New
When a tester finds a new defect. He should provide a proper Defect document to
the Development team to reproduce and fix the defect. In this state, the status of
the defect posted by the tester is “New”
Assigned
Defects that are in the status of New will be approved (if valid) and assigned to the
development team by Test Lead/Project Lead/Project Manager. Once the defect is
assigned then the status of the bug changes to “Assigned”
Open
The development team starts analyzing and works on the defect fix
Fixed
When a developer makes the necessary code change and verifies the change, then
the status of the bug will be changed as “Fixed” and the bug is passed to the testing
team.
Test
If the status is “Test”, it means the defect is fixed and ready to do test whether it is
fixed or not.
Verified
The tester re-tests the bug after it got fixed by the developer. If there is no bug
detected in the software, then the bug is fixed and the status assigned is “verified.”
Closed
After verified the fix, if the bug is no longer exits then the status of the bug will be
assigned as “Closed.”
Reopen
If the defect remains the same after the retest, then the tester posts the defect using
the defect retesting document and changes the status to “Reopen”. Again, the bug goes
through the life cycle to be fixed.
Duplicate
If the defect is repeated twice or the defect corresponds to the same concept of the
bug, the status is changed to “duplicate” by the development team.
Deferred
In some cases, the Project Manager/Lead may set the bug status as deferred.
If the bug found during the end of the release and the bug is minor or not important
to fix immediately.
If the bug is not related to the current build.
If it is expected to get fixed in the next release.
The customer is thinking to change the requirement.
In such cases the status will be changed as “deferred” and it will be fixed in the next
release.
Rejected
If the system is working according to specifications and the bug is just due to some
misinterpretation (such as referring to old requirements or extra features) then the
Team lead or developers can mark such bugs as “Rejected”.
44.When should you go for manual testing over the automation testing?
There are a lot of cases when manual testing is best suited over automation testing,
like:
Short-time projects: Automation testing aims at saving time and resources yet it takes
time and resources to design and maintain them. For example, if you are building a
small promotional website, it can be much more efficient to rely on manual testing.
Ad-hoc Testing: In ad-hoc testing, there will not be any specific approach. Ad-hoc
testing is a totally unplanned method of testing where the understanding and
insight of the tester is the only important factor. This can be achieved using
manual testing.
Exploratory Test: This type of testing requires the test engineer’s knowledge,
experience, analytical, logical skills, creativity, and intuition. So human
involvement is important in exploratory testing.
Usability Testing: When performing usability testing, the test engineer needs to
measure how user-friendly, efficient, or convenient the software or product is for
the end-users. Human observation is the most important factor, so manual testing
more appropriate here.
49.When will you consider using Automation Testing Over Manual Testing?
When tests require periodic execution
When Tests include repetitive steps
When Tests need to be executed in a standard runtime environment
When you have less time to complete the testing phase
When there is a lot of code that needs to be repeatedly tested
When Reports are required for every execution
52.What is quality assurance, and what are the various actions that go into it?
A key component of quality assurance is the path-driven method, which examines
whether the product was developed in the right way and in accordance with all
applicable standards. It is also regarded as a safety precaution. It does so by revealing
a flaw in the software development process. It entails specific tasks like document
review, test case review, inspection etc.
53.What is Quality Control and what are the different types of testing involved in
Quality Control?
Quality control is a product-driven approach that verifies that the developed product
conforms to all the specified requirements. It is considered to be a corrective measure
as it tests the built product to find the defects. It constitutes different types of testing
like functional testing, performance testing, usability testing and so on.
57.Give an illustration of a fault with a low priority and low severity, a low
priority and high severity, a high priority and high severity.
Following are some instances of various priority and severity combinations:
Low priority, low severity: a spelling error on a page that isn't commonly visited
by users.
Application crashing in a very extreme corner case
Low priority, High severity: Changes to the colour of the logo or a misspelling
of the company name
high priority but low severity.
Issue with login functionality is of high priority and severity.
business analysts, and other stakeholders participate in the defect triage meeting to
determine the importance of correcting the bugs.
69.Defect cascading?
And. When one fault is brought on by another, this is known as defect cascade. It
occurs when a flaw that leads to another flaw is not discovered by the testing team.
70.In a white box testing, what all the parameters you verify?
In white box testing following parameters are verified.
73.While monitoring the project what all things do you have to consider?
The things that have to be taken into considerations are:
inputs result in different actions being taken, this can be more difficult to show using
equivalence partitioning and boundary value analysis, which tend to be more focused
on the user interface. The other two specification-based techniques, decision tables,
and state transition testing are more focused on business logic or business rules. A
decision table is a good way to deal with combinations of things (e.g., inputs). This
technique is sometimes also referred to as a cause-effect’ table. The reason for this is
that there is an associated logic diagramming technique called cause-effect graphing’
which was sometimes used to help derive the decision table
75.You have designed test cases to provide 100% statement and 100% decision
coverage for the following fragment of code. if width > length then biggest
dimension = width else biggest dimension = length endif the following has
been added to the bottom of the code fragment above. print “Biggest
dimension is” &biggest_dimensionprint “Width:” & width print “Length:” &
length How many more test cases are required?
None, the existing test cases can be used.
77.Given the following code, which statement is true about the minimum number
of test cases required for full statement and branch coverage?
Read p
Read q
IF p+q> 100
ENDIF
IF p > 50
ENDIF
1 test for statement coverage, 2 for branch coverage
80.Describe a workflow.
Workflow is described as the progression of a bug or issue through several stages
of its life cycle.
• Open/Created
• WIP (Work in Progress)
• Completed/Closed
Issues of the epic and story variety are connected to it. To do this, select the "Epic
link" field to be included in the issue creation screen under "Configure Fields" on
the "Create Issue" page.
Alternately, you might create a core User story and list many sub-tasks under it
to create a product backlog.
3)GOOGLE SEARCH
Verify that the response fetched for a particular keyword is correct and related to the
keyword, containing links to the particular webpage
Verify that the response is sorted by relevancy in descending order i.e., most relevant
result for the keyword is displayed on top
Verify that response for multi word keyword is correct
Verify that response for keywords containing alphanumeric and special characters is
correct
Verify that the link title, URL and description have the keyword highlighted in the
response
Verify auto-suggestion in Google e.g., providing input as 'fac' should give suggestions
like 'Facebook', 'Facebook messenger', 'Facebook chat' etc.
Verify that response fetched on selecting the suggested keyword and on providing
the keyword directly should be same
Verify that the suggestion provided by Google are sorted by most popular/relevant
suggestions
Verify that user can make search corresponding to different categories - web, images,
videos, news, books etc and response should correspond to the keyword in that
category only
Verify that misspelled keyword should get corrected and response corresponding to
the correct keyword should get displayed
Verify that multi word misspelled keywords also get corrected
Verify the performance of search- check if the time taken to fetch the response is
within the ballpark
Verify that total number of results fetched for a keyword
Verify that the search response should be localized that is response should be more
relevant to the country/area from which the search request is initiated
Verify Google calculator service- make any arithmetic request, calculator should get
displayed with correct result
Verify Google converter service- make request like- 10USD in INR and check if the
result is correct
Verify search response for a large but valid strings
Verify that incorrect keywords - keywords not having related result should lead to
"did not match any documents" response
Verify that user can make search using different languages
Verify that for a keyword, some related search terms are also displayed to aid user's
search
Verify that for number of results more than the limit on a single page, pagination
should be present, clicking on which user can navigate to subsequent page's result
Verify Google's advanced search options like- searching within a website, searching
for files of specific extension
Verify if the search is case-insensitive or not
Verify the functionality of "I'm feeling Lucky" search- the top most search result
should get directly returned (but as of now google doodle page link is displayed)
4)LIFT
Verify the dimensions of the lift
Verify the type of door of the lift is as per the specification
Verify the type of metal used in the lift interior and exterior
Verify the capacity of the lift in terms of total weight
Verify the buttons in the lift to close and open the door and numbers as per the
number of floors
Verify that lift moves to the particular floor as the button of the floor is clicked
Verify that lift stops when up/down buttons at particular floor are pressed
Verify if there is any emergency button to contact officials in case of any mishap
Verify the performance of the floor - time taken to go to a floor
Verify that in case of power failure, lift doesn't free-fall and get halted in the particular
floor
Verify lifts working in case button to open the door is pressed before reaching the
destination floor
Verify that in case door is about to close and an object is placed between the doors, if
the doors sense the object and again open or not
Verify the time duration for which door remain open by default
Verify if lift interior is having proper air ventilation
Verify lighting in the lift
Verify that at no point lifts door should open while in motion
Verify that in case of power loss, there should be a backup mechanism to safely get
into a floor or a backup power supply
Verify that in case multiple floor number button are clicked, lift should stop at each
floor
Verify that in case capacity limit is reached users are prompted with warning alert-
audio/visual
Verify that inside lift users are prompted with current floor and direction information
the lift is moving towards- audio/visual prompt.
5)LOGIN
Verify that the login screen is having option to enter username and password with
submit button and option of forgot password
Verify that user is able to login with valid username and password
Verify that user is not able to login with invalid username and password
Verify that validation message gets displayed in case user leaves username or
password field as blank
Verify that validation message is displayed in case user exceeds the character limit of
the user’s name and password fields
Verify that there is reset button to clear the field's text
Verify if there is checkbox with label "remember password" in the login page
Verify that the password is in encrypted form when entered
Verify that there is limit on the total number of unsuccessful attempts
For security point of view, in case of in correct credentials user is
displayed the message like "incorrect username or password" instead of exact
message pointing at the field that is incorrect. As message like "incorrect username"
will aid hacker in brute forcing the fields one by one
Verify the timeout of the login session
Verify if the password can be copy-pasted or not
Verify that once logged in, clicking back button doesn't logout user
7)MOBILE PHONE
Although there can be numerous test cases for mobile and considering smart phones,
there can be even more test cases. But in this document, we will focus mainly on-
Calling, SMS and directory features.
Verify that all the required buttons- numbers 0-9, calling buttons etc are present-
Verify that user can make a call by pressing numbers and hitting calling(green) button
Verify that user can make a call by selecting contact person from phone directory
Verify that user can reject an incoming call
Verify that user can receive an SMS
Verify that user can type and send an SMS
Verify that the dimension of the mobile is as per specification
Verify the screen size of the mobile
8)PEN
Verify the type of pen- whether it is ball point pen, ink pen or gel pen
Verify the outer body of the pen- whether it should be metallic, plastic or any other
material as per the specification
Verify that length, breadth and other size specifications of the pen
Verify the weight of the pen
Verify if the pen is with cap or without cap
Verify if the pen has rubber grip or not
Verify the color of the ink of the pen
Verify the odor of the pen
Verify the size of the tip of the pen
Verify the company name or logo of the maker is correct and at desired place
Verify if the pen is smooth
Verify if the pen's ink gets leaked in case it is tilted upside down
Verify if the pen's gets leaked at higher altitude
Verify the type of surfaces the pen can write at
Verify if the text written by pen is erasable or not
Verify pens and its ink condition at extreme temperature is as per the specification
Verify the pressure up to which the pen's tip can resist and work correctly
Verify the pen is breakable or not at a certain height as the specification
Verify text written by pen doesn't get faded before a certain time as per the
specification
Verify the effect of water, oil and other liquid on the text written by pen
Verify the condition of ink after long period of time is as per permissible
specification or not
Verify the total amount of text that can be written by the pen at one go
Verify the pen's ink is waterproof or not
Verify if the pen is able to write when used against the gravity- upside down
Verify that in case of ink pen, the pen's ink can be refilled again
9) CREDIT CARD
Test card numbers using the correct length and range and card numbers that are
outside the correct length and range.
Test valid expiry dates, invalid expiry dates and invalid date formats.
Test valid CVV numbers, mismatched CVV numbers and blank CVV numbers.
Entering AVS details for configured numeric or alphanumeric formats.
Test swiping of cards from both sides and chips.
Verify that captured card numbers are properly encrypted and decrypted.
Test that the correct amount is being authorized.
Test that merchant and customer copies of the receipts and any vouchers print
properly.
Check that the receipts are printing the proper date, time, card details, authorized
amount etc.
Test that the correct response codes are being returned for approved, declined, on
hold and all other transactions.
Test that you can reprint the receipt for a closed transaction.
Check that you can void a payment before posting it and that after posting a payment
voiding is not allowed.
All information regarding each credit card transaction should be reflected in reports.
Any adjustments made in closed checks should be reflected in the report.
AUTOMATION TESTING
1. What is Automation Testing?
Automation testing or Test Automation is a process of automating the manual process
to test the application/system under test. Automation testing involves the use of a
separate testing tool which lets you create test scripts which can be executed
repeatedly and doesn’t require any manual intervention.
3. What is Selenium?
Selenium is one of the most popular automated testing tool/suites. Selenium is
designed to perform automation testing of web-based applications and a wide range
of browsers and platforms. Due to its existence in the open-source community, it has
become one of the most accepted tools amongst the testing professionals.
Chrome Driver
WebDriver
IE Driver Opera Driver
Gecko Driver
Syntax:
List<WebElement>elementList=
driver.findElements(By.Locator(Locator_address));
IMPORTANT METHODS TO
REMEMBER.
Method Name Description
get(String url) This method will launch a new browser and opens the
given URL in the browser instance.
findElement() This method finds the first element within the current
web page by using given locator.
Syntax:
WebElement element =
driverObject.findElement(By.locator(“value”));
Selenium IDE:
Step 2: Click on Add External Jar File => add the selenium jar => apply => Ok
Step 1: Download AutoIt Script and Script Editor from the link given below.
https://www.autoitscript.com/site/autoit/downloads/
Keyboard actions
A representation of any key input device for interacting with a web page.
Keyboard represents a KeyBoard event. KeyBoard actions are performed by using
low-level interface which allows us to provide virtualized device input to the web
browser.
Keys
In addition to the keys represented by regular Unicode, Unicode values have been
assigned to other keyboard keys for use with Selenium. Each language has its own way
to reference these keys.
Example:
//Enter “webdriver” text and perform “ENTER” keyboard action
driver.findElement(By.name(“q”)).sendKeys(“webdriver” + Keys.ENTER);
Mouse actions
A representation of any pointer device for interacting with a web page. Example:
//Store ‘google seaarch’ button web element
WebElement searchBtn = driver.findElement(By.linkText(“Sign in”)); Actions act =
new Actions(driver);
//Perform click-and-hold on the element
act.clickAndHold(searchBtn).build().perform();
Waits in WebDriver.
Why Do You Need Waits In Selenium?
Most of the modern applications front-end is built on either Ajax or JavaScript,
followed by popular frameworks like Angular, React, or any other, which takes some
time for loading elements on the web page. Hence, in such a case, Selenium throws an
'ElementNotVisibleException' or 'NoSuchElementException' message when you tend to
locate an element present in your script which is still not loaded on the web page.
To overcome this problem between the browser and your WebDriver script, waits are
applied on WebDriver.
Types of waits:
Implicit Waits
The main function of implicit Wait is to tell the web driver to wait for some time
before throwing a "No Such Element Exception". Its default setting is knocked at zero.
Once the time is set, the driver automatically will wait for the amount of time defined
by you before throwing the above-given exception.
Syntax: driver.manage().timeouts().implicitlyWait(TimeOut,TimeUnit.SECONDS);
Example:
WebDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitWait(Duration.ofSeconds(10));
Note: Implicit Wait is globally applied. It is readily available for driver instance. It also
means that if the driver is having interaction with One thousand elements in the
meantime, the implicit Wait will be applicable only for those 1000 elements. It cannot
go beyond that.
Explicit Waits
Explicit Waits also known as Dynamic Waits because it is highly specific conditioned.
Suppose a web page consisting of a login form that takes input and loads the Home or
Main page content. This page is dynamic because of the time constraints and network
frequency, sometimes taking 10 seconds or maybe 15 seconds to load completely.
Explicit Wait comes in handy in such cases and allows you to wait until the page is not
present to display.
Syntax:
WebDriverWait wait=new WebDriverWait(WebDriveReference,TimeOut);
Example:
//Initialize and wait till element(link) became clickable – timeout in 10 sec
WebElement fr = new WebDriverWait(driver, Duration.ofSeconds(10))
fr.until(ExpectedConditions.elementToBeClikcable(By.xpath(“//a/h3”)));
Automation Scenarios:
Automating for opening Amazon page and searching for laptop products.
Steps:
Open Google Chrome
Navigate to Amazon webpage
Locate amazon search button
Type “Laptop” and submit.
Code:
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
// Submitting
search_box.submit();
}
}
Page | 66 #Code with KodNest
www.kodnest.com
Create select class object for automating drop down box in webpage
Locate on Month drop down
Select month
Locate on date drop down
select date
Locate on year drop down
select year
Locate on next button
Code:
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.Select;
driver.manage().window().maximize();
//TypingRaj100101_Sharma@gmail.com
email.sendKeys("Raj100101_Sharma@gmail.com");
// Typing Raj
name.sendKeys("Raj");
// Locating on Password
WebElement password = driver.findElement(By.name("password"));
//Typing password
password.sendKeys("Raj1234");
WebElement sign_up=
driver.findElement(By.xpath("/html/body/div[1]/section/main/div/div/div[1]/div
/form/div[7]/ div/button"));
//Locating month
WebElement month =
driver.findElement(By.xpath("/html/body/div[1]/section/main/div/div/div[1]/div
/div[4]/div/di v/span/span[1]/select"));
// click next.click();
}
}
Automation to print all the links present in Kodnest webpage and search for link text
“Online Courses”. If the link text contains “Online Courses” then click on it.
Steps:
Open Google Chrome
Navigate to Kodnest page
Locate all the links and collect it
Printing total number of links
Print all link text present in Kodnest page
find link text "Online Courses" and click on it
Code:
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
// Locating all the links and collecting the links List<WebElement> list =
driver.findElements(By.tagName("a"));
}
}
}
}
Automation and Testing to navigate to “Google” page and print all the links
present in Google page, after printing check if “Gmail” link is present in the
webpage. Generate the test report for the above automation.
Steps:
Add all the required tools to the project to perform automation testing.
Launch the browser
Navigate to “Google” webpage
Locate all the links present in Google webpage and collect it
Printing total number of links
Print all link text present in Google webpage
find if “Gmail” is present in the webpage .
Generate the Test Report using TestNg Framework.
Code:
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.Assert;
import org.testng.annotations.Test;
public class AutoTest { @Test
public void google_test()
{
//Text to search
String driver_title = "Gmail";
// Locating all the links and collecting the links List<WebElement> list =
driver.findElements(By.tagName("a"));
if(s==driver_title)
{
}
}
driver.close();
}
}
Test Report
??????
??????
About Advertising Business
How Search works Privacy
Terms
PASSED: google_test
===============================================
Default test
Tests run: 1, Failures: 0, Skips: 0
===============================================
===============================================
Default suite
Total tests run: 1, Failures: 0, Skips: 0