You are on page 1of 12

Software Testing

Software testing is a process, to evaluate the functionality of a software application


with an intent to find whether the developed software met the specified requirements
or not and to identify the defects to ensure that the product is defect free in order to
produce the quality product Also to assess the feature of A software item. Software
testing is a process that should be done during the development process. In other
words software testing is a verification and validation process. According
to ANSI/IEEE 1059 standard – A process of analyzing a software item to detect the
differences between existing and required coditions and to evaluate the features of the
software item.

Software Testing Types:

Manual Testing: Manual testing is the process of testing the software manually to find
the defects. Tester should have the perspective of end users and to ensure all the
features are working as mentioned in the requirement document. In this process,
testers execute the test cases and generate the reports manually without using any
automation tools.

Automation Testing: Automation testing is the process of testing the software using
an automation tool to find the defects. In this process, testers execute the test scripts
and generate the test results automatically by using automation tools. Some of the
famous automation testing tools for functional testing are QTP/UFT and Selenium.

Manual Testing Automation Testing

Time consuming and tedious Speed

Heavy investment on human resource Single time investment

Detection of bugs may not be accurate Reliable

100% cannot be trustable 100% trustable


Testing Methods:

1. Static Testing
2. Dynamic Testing

Static Testing: It is also known as Verification in Software Testing. Verification is a


static method of checking documents and files. Verification is the process, to ensure
that whether we are building the product right i.e., to verify the requirements which
we have and to verify whether we are developing the product accordingly or not.

Dynamic Testing: It is also known as Validation in Software Testing. Validation is a


dynamic process of testing the real product. Validation is the process, whether we are
building the right product to validate the product which we have developed is right or
not.

Software testing is very important because of the following reasons:


1. Software testing is really required to point out the defects and errors that were
made during the development phases.
 Example: Programmers may make a mistake during the
implementation of the software. There could be many reasons for this
like lack of experience of the programmer, lack of knowledge of the
programming language, insufficient experience in the domain,
incorrect implementation of the algorithm due to complex logic or
simply human error.
2. It’s essential since it makes sure that the customer finds the organization
reliable and their satisfaction in the application is maintained.
 If the customer does not find the testing organization reliable or is not
satisfied with the quality of the deliverable, then they may switch to a
competitor organization.
 Sometimes contracts may also include monetary penalties with respect
to the timeline and quality of the product. In such cases, if proper
software testing may also prevent monetary losses.
3. It is very important to ensure the Quality of the product. Quality product
delivered to the customers helps in gaining their confidence. (Know more
about Software Quality)
 As explained in the previous point, delivering good quality product on
time builds the customers confidence in the team and the organization.
4. Testing is necessary in order to provide the facilities to the customers like the
delivery of high quality product or software application which requires lower
maintenance cost and hence results into more accurate, consistent and reliable
results.
 High quality product typically has fewer defects and requires lesser
maintenance effort, which in turn means reduced costs.
5. Testing is required for an effective performance of software application or
product.
6. It’s important to ensure that the application should not result into
any failures because it can be very expensive in the future or in the later
stages of the development.
 Proper testing ensures that bugs and issues are detected early in the life
cycle of the product or application.
 If defects related to requirements or design are detected late in the life
cyle, it can be very expensive to fix them since this might require
redesign, re-implementation and retesting of the application.
7. It’s required to stay in the business.
 Users are not inclined to use software that has bugs. They may not
adopt a software if they are not happy with the stability of the
application.
 In case of a product organization or startup which has only one
product, poor quality of software may result in lack of adoption of the
product and this may result in losses which the business may not
recover from.

Failure in software testing

If under certain environment and situation defects in the application or product get
executed then the system will produce the wrong results causing a failure.

Not all defects result in failures, some may stay inactive in the code and we may
never notice them. Example: Defects in dead code will never result in failures.

It is not just defects that give rise to failure. Failures can also be caused because of the
other reasons also like:

 Because of the environmental conditions as well like a radiation burst, a strong


magnetic field, electronic field or pollution could cause faults in hardware or
firmware. Those faults might prevent or change the execution of software.
 Failures may also arise because of human error in interacting with the
software, perhaps a wrong input value being entered or an output being
misinterpreted.
 Finally failures may also be caused by someone deliberately trying to cause a
failure in the system.
objectives and purpose

 Finding defects which may get created by the programmer while developing
the software.
 Gaining confidence in and providing information about the level of quality.
 To prevent defects.
 To make sure that the end result meets the business and user requirements.
 To ensure that it satisfies the BRS that is Business Requirement Specification
and SRS that is System Requirement Specifications.
 To gain the confidence of the customers by providing them a quality product.

Software testing helps in finalizing the software application or product against


business and user requirements. It is very important to have good test coverage in
order to test the software application completely and make it sure that it’s performing
well and as per the specifications.
Software testing makes sure that the testing is being done properly and hence the
system is ready for use. Good coverage means that the testing has been done to cover
the various areas like functionality of the application, compatibility of the application
with the OS, hardware and different types of browsers, performance testing to test the
performance of the application and load testing to make sure that the system is
reliable and should not crash or there should not be any blocking issues. It also
determines that the application can be deployed easily to the machine and without any
resistance. Hence the application is easy to install, learn and use.
Testing Tools:
Tools from a software testing context can be defined as a product that supports one
or more test activities right from planning, requirements, creating a build, test
execution, defect logging and test analysis.

Classification of Tools
Tools can be classified based on several parameters. They include:
 The purpose of the tool
 The Activities that are supported within the tool
 The Type/level of testing it supports
 The Kind of licensing (open source, freeware, commercial)
 The technology used

Software Testing Tools

Manufacturer Testing Tools


 Silk Test
Segue • Silk Performer
• Silk Central

IBM/ Rational • RequirementPro


• Robot
• ClearCase

Mercury • WinRunner
Interactive
• LoadRunner
• TestDirector

Compuware • Reconcile
• QALoad
• QARun
WinRunner Automation Tool

It is a powerful automated testing tool developed by Mercury Interactive Company


since it is basically used for functional regression testing. Also, It automates the
testing process. Hence, to ensure that the applications performing as we expected or
Not. It records operations as you perform them manually in your applications build
and generates a test with required observation as checkpoints. In addition, you can run
your test on application build and analyze the result manually with respect to the
corresponding manual test case. Then, WinRunner enables you to adapt and reuse
your tests for regression and protecting your effort in test creation.

When you finish any test in WinRunner, WinRunner displays the results in a report
format.
The report logs the general information about the test run.ie, date, operator mode and
total run time. Also, the report details all the major events that occurred during the
run, such as checkpoints, error messages, system messages, or user messages.
A mismatch can be found in the report panel by seeing the actual result and the expected
result. If a test run fails due to a defect in the application being tested, you can report
information about the defect directly from the Test Results window. This information is
sent via e-mail to the quality assurance manager, who tracks the defect until it is fixed.

features of WinRunner

 WinRunner is a functional testing tool.


 As a result, it supports various technologies like VB, JAVA, Power
Builder, DotNet, VC++, HTML, Delphi, Activex and ERP/Siebel
technologies for automated functional testing.
 It runs on a windows family operating systems only.
 WinRunner converts our manual function tests into test script language
(TSL) programs.

Two types of recording in WinRunner:


1. Context Sensitive recording records the operations you perform on your
application by identifying Graphical User Interface (GUI) objects. Windrunner
identifies all the objects in your window you click like menus, windows, lists, buttons
and the type of operation you perform such as enable, move, select etc.
2. Analog recording records keyboard input, mouse clicks, and the precise x- and y-
coordinates traveled by the mouse pointer across the screen i.e Winrunner records
exact co-ordinates traveled by mouse.
WinRunner fails to identify an object in a GUI due to various
reasons:
1. The object is not a standard windows object.
2. If the browser used is not compatible with the WinRunner version, GUI Map Editor
will not be able to learn any of the objects displayed in the browser window.When
you click an object, WinRunner assigns the object a logical name, which is usually the
object’s text label. The logical name makes it easy for you to read the test script.
For Example, when you selected the Order No. checkbox, WinRunner recorded the
following statement in WinRunner TSL:
button_set (“Order No.”, ON);
“Order No.” is the object’s logical name.
An object’s logical name is determined by its class. In most cases, the logical name is
the label that appears on an object.
If the object does not have a name then the logical name could be the attached text.

The Win Runner testing process involves six main stages


i. Create GUI Map File so that WinRunner can recognize the GUI objects in the
application being tested
ii. Create test scripts by recording, programming, or a combination of both. While
recording tests, insert checkpoints where you want to check the response of the
application being tested.
iii. Debug Test: run tests in Debug mode to make sure they run smoothly
iv. Run Tests: run tests in Verify mode to test your application.
v. View Results: determines the success or failure of the tests.
vi. Report Defects: If a test run fails due to a defect in the application being tested,
you can report information about the defect directly from the Test Results window.
To open WinRunner:
Choose Programs > WinRunner > WinRunner on the Start menu.
The first time you start WinRunner, the Welcome to WinRunner window opens. You
can choose to run the RapidTest Script wizard, open an existing test, or create a new
test.
Spying on GUI Objects
To help you understand how WinRunner identifies GUI objects, examine the
objects in the sample Flight Reservation application.

1 Open the Flight Reservation application.


Choose Programs > WinRunner > Sample Applications > Flight 1A on the
Start menu. The Login window opens.

2 Start WinRunner.
Choose Programs > WinRunner > WinRunner on the Start menu. In the
Welcome
window, click the New Test button. If the Welcome window does not open,
choose File > New.
3 Open the GUI Spy. This tool lets you “spy” on the properties of GUI objects.
On the WinRunner Tools menu, choose GUI Spy. The GUI Spy opens.
Position
the GUI Spy on the desktop so that both the Login window and the GUI Spy
are clearly visible.
4 View the properties that provide a unique description of the OK button.
In the GUI Spy, click the Spy button. Move the pointer over objects in the
Login window. Notice that each object flashes as you move the pointer over it,
and the GUI Spy displays its properties. Place the pointer over the OK button
and press Ctrl Left + F3. This freezes the OK button’s description in the GUI
Spy.

5 Examine the properties of the OK button.


In the Description box, the property names are listed on the left; property
values are listed after the colon. For example, “label: OK” indicates that the
button has the text label “OK”, and “class: push_button” indicates that the
button belongs to the pushbutton object class. At the top of the dialog box, the
GUI Spy also displays the name of the window in which the object is located.
As you can see, WinRunner needs only a few properties to uniquely identify
the object.

6 Take a few minutes to view the properties of other GUI objects in the
Login window.
Click the Spy button and move the pointer over other GUI objects in the Login
window.If you would like to view an expanded list of properties for each
object, press Ctrl Left + F3 and then click All Properties in the Show in
Description box. Next, click the Spy button and move the pointer over the GUI
objects in the Login window.
Press Ctrl Left + F3 to freeze an object description in the GUI Spy.

7 Exit the GUI Spy.


Click Close.
To run the User Interface test:
1 Check that WinRunner and the Flight Reservation application are still
open
on your desktop.

2 Make sure that the UI test window is active in WinRunner.


Click the title bar of the UI test window.

3 Choose Run from Top.


Choose Run > Run from Top or click the Run from Top button. The Run Test dialog box
opens.

4 Choose a Test Run name.


Define the name of the directory in which WinRunner will store the results of
the test. Accept the default name “res1.”
Note that at the bottom of the dialog box is a Display Test Results at End of
Run check box. When this check box is selected, WinRunner automatically
displays the test results when the test run is completed. Make sure that this
check box is selected.

5 Run the UI test.


Click OK in the Run Test dialog box. WinRunner immediately begins running
the UI test. Watch how WinRunner opens each window in the Flight
Reservation application.

6 Review the test results.


When the test run is completed, the test results automatically appear in the
WinRunner Test Results window. See the next section to learn how to
analyze the test results.

Once a test run is completed, you can immediately review the test results in
the WinRunner Test Results window. WinRunner color-codes results (green =
passed, red = failed) so that you can quickly draw conclusions about the
success or failure of the test.

7 Make sure that the WinRunner Test Results window is open and
displays the results of the UI test.
If the WinRunner Test Results window is not currently open, first click the UI
test window to activate it, and then choose Tools > Test Results or click the
Test Results button.
8 Review the results and determine whether the Flight Reservation
application complies with the Microsoft user interface standards.

9 Close the Test Results window.


Choose File > Exit in the WinRunner Test Results window.

10 Close the UI test.


Choose File > Close.

11 Close the Flight Reservation application.


Choose File > Exit.

You might also like