Lecture 15
Lecture 15
Software Testing Techniques help you design better test cases. Since exhaustive testing is not
possible; Manual Testing Techniques help reduce the number of test cases to be executed while
increasing test coverage. They help identify test conditions that are otherwise difficult to
recognize.
It is generally seen that a large number of errors occur at the boundaries of the defined input
values rather than the center. It is also known as BVA and gives a selection of test cases that
exercise bounding values.
This black box testing technique complements equivalence partitioning. This software testing
technique base on the principle that, if a system works well for these particular values then it will
work perfectly well for all values which come between the two boundary values.
● If an input condition is restricted between values x and y, then the test cases should be
designed with values x and y as well as values which are above and below x and y.
Example:
Video:
https://www.youtube.com/watch?v=H6IRY98Gu44
Practice:
2. Assume we have to test a text field (Name) which accepts the length between 6-12
characters.
Equivalence Class Partitioning
Equivalent Class Partitioning allows you to divide a set of test conditions into a partition which
should be considered the same. This software testing method divides the input domain of a
program into classes of data from which test cases should be designed.
The concept behind this technique is that the test case of a representative value of each class is
equal to a test of any other value of the same class. It allows you to Identify valid as well as
invalid equivalence classes.
Example:
1 to 10 and 20 to 30
Video:
https://youtu.be/mb-I7Skf-zU?t=61
Decision Table Based Testing.
A decision table is also known as to Cause-Effect table. This software testing technique is used
for functions that respond to a combination of inputs or events. For example, a submit button
should be enabled if the user has entered all required fields.
The first task is to identify functionalities where the output depends on a combination of inputs.
If there are large input set of combinations, then divide it into smaller subsets which are helpful
for managing a decision table.
For every function, you need to create a table and list down all types of combinations of inputs
and their respective outputs. This helps to identify a condition that is overlooked by the tester.
Example: A submit button in a contact form is enabled only when all the inputs are entered by
the end-user.
Video:
https://www.youtube.com/watch?v=TSbIDrx_KVY&feature=emb_title
Practice:
1. The condition is simple if the user provides a correct username and password the user
will be redirected to the homepage. If any of the input is wrong, an error message will be
displayed.
2. Now consider a dialogue box which will ask the user to upload photo with certain
conditions like –
1. You can upload only '.jpg' format image
2. file size less than 32kb
3. resolution 137*177.
If any of the conditions fails the system will throw corresponding error message stating the issue
and if all conditions are met photo will be updated successfully
State Transition
In State Transition technique changes in input conditions change the state of the Application
Under Test (AUT). This testing technique allows the tester to test the behavior of an AUT. The
tester can perform this action by entering various input conditions in a sequence. In State
transition technique, the testing team provides positive as well as negative input test values for
evaluating the system behavior.
● State transition should be used when a testing team is testing the application for a limited
set of input values.
● The technique should be used when the testing team wants to test a sequence of events
that happen in the application under test.
Example:
In the following example, if the user enters a valid password in any of the first three attempts the
user will be able to log in successfully. If the user enters the invalid password in the first or
second try, the user will be prompted to re-enter the password. When the user enters the
password incorrectly 3rd time, the action has taken, and the account will be blocked.
In the above-given table when the user enters the correct PIN, the state is transitioned to Access
granted. And if the user enters an incorrect password, he or she is moved to next state. If he does
the same 3rd time, he will reach the account blocked state.
Video: https://www.youtube.com/watch?v=_Udjai_6b9Y&feature=emb_title
Practice:
In the flight reservation login screen, consider you have to enter the correct agent name and
password to access the flight reservation application.
It gives you access to the application with the correct password and login name, but what if you
entered the wrong password.
The application allows three attempts, and if users enter the wrong password at 4th attempt, the
system closes the application automatically.
Error Guessing
Error guessing is a software testing technique that is based on guessing the error which can
prevail in the code. It is an experience-based technique where the test analyst uses his/her or
experience to guess the problematic part of the testing application.
The technique counts a list of possible errors or error-prone situations. Then tester writes a test
case to expose those errors. To design test cases based on this software testing technique, the
analyst can use past experiences to identify the conditions.
● The test should use the previous experience of testing similar applications
● Understanding of the system under test
● Knowledge of typical implementation errors
● Remember previously troubled areas
● Evaluate Historical data & Test results
Conclusion
● Software testing Techniques allow you to design better cases. There are five primarily
used techniques.
● Boundary value analysis is testing at the boundaries between partitions.
● Equivalent Class Partitioning allows you to divide a set of test conditions into a partition
which should be considered the same.
● Decision Table software testing technique is used for functions which respond to a
combination of inputs or events.
● In State Transition technique changes in input conditions change the state of the
Application Under Test (AUT)
● Error guessing is a software testing technique which is based on guessing the error which
can prevail in the code.
What is GUI?
There are two types of interfaces for a computer application. Command Line Interface is where
you type text and the computer responds to that command. GUI stands for Graphical User
Interface where you interact with the computer using images rather than text.
Following are the GUI elements which can be used for interaction between the user and
application:
GUI testing is defined as the process of testing the system's Graphical User Interface of the
Application Under Test. GUI testing involves checking the screens with the controls like menus,
buttons, icons, and all types of bars - toolbar, menu bar, dialog boxes, and windows, etc.
GUI is what the user sees. Say if you visit guru99.com what you will see say homepage it is the
GUI (graphical user interface) of the site. A user does not see the source code. The interface is
visible to the user. Especially the focus is on the design structure, images that they are working
properly or not.
In above example, if we have to do GUI testing we first check that the images should be
completely visible in different browsers.
Also, the links are available, and the button should work when clicked.
Also, if the user resizes the screen, neither images nor content should shrink or crop or overlap.
Now the basic concept of GUI testing is clear. The few questions that will strike in your mind
will be
To get the answer to think as a user, not as a tester. A user doesn't have any knowledge about
Application. It is the UI of the Application which decides that a user is going to use the
Application further or not.
A normal User first observes the design and looks of the Application/Software and how easy it is
for him to understand the UI. If a user is not comfortable with the Interface or find Application
complex to understand he would never going to use that Application Again. That's why, GUI is a
matter for concern, and proper testing should be carried out in order to make sure that GUI is
free of Bugs.
The following checklist will ensure detailed GUI Testing in Software Testing.
● Check all the GUI elements for size, position, width, length, and acceptance of characters
or numbers. For instance, you must be able to provide inputs to the input fields.
● Check you can execute the intended functionality of the application using the GUI
● Check Error Messages are displayed correctly
● Check for Clear demarcation of different sections on the screen
● Check Font used in an application is readable
● Check the alignment of the text is proper
● Check the Color of the font and warning messages is aesthetically pleasing
● Check that the images have good clarity
● Check that the images are properly aligned
● Check the positioning of GUI elements for different screen resolutions.
Under this approach, graphical screens are checked manually by testers in conformance with the
requirements stated in the business requirements document.
Record and Replay
GUI testing can be done using automation tools. This is done in 2 parts. During Record, test
steps are captured by the automation tool. During playback, the recorded test steps are executed
on the Application Under Test.
Some of the modeling techniques from which test cases can be derived:
● Charts - Depicts the state of a system and checks the state after some input.
● Decision Tables - Tables used to determine results for each input applied
Model-based testing is an evolving technique for generating test cases from the requirements. Its
main advantage, compared to the above two methods, is that it can determine undesirable
states that your GUI can attain.
Here we will use some sample test cases for the following screen.
Following below is the example of the Test cases, which consists of UI and Usability test
scenarios.
TC 01- Verify that the text box with the label "Source Folder" is aligned properly.
TC 02 - Verify that the text box with the label "Package" is aligned properly.
TC 03 – Verify that label with the name "Browse" is a button which is located at the end of
TextBox with the name "Source Folder."
TC 04 – Verify that label with the name "Browse" is a button which is located at the end of
TextBox with the name "Package."
TC 05 – Verify that the text box with the label "Name" is aligned properly.
TC 06 – Verify that the label "Modifiers" consists of 4 radio buttons with the name public,
default, private, protected.
TC 07 – Verify that the label "Modifiers" consists of 4 radio buttons which are aligned properly
in a row.
TC 08 – Verify that the label "Superclass" under the label "Modifiers" consists of a dropdown
which must be properly aligned.
TC 09 – Verify that the label "Superclass" consists of a button with the label "Browse" on it
which must be properly aligned.
TC 10 – Verify that clicking on any radio button the default mouse pointer must be changed to
the hand mouse pointer.
TC 11 – Verify that user must not be able to type in the dropdown of "Superclass."
TC 12 – Verify that there must be a proper error generated if something has been mistakenly
chosen.
TC 13 - Verify that the error must be generated in the RED color wherever it is necessary.
TC 15 – Verify that the single radio buttons must be selected by default every time.
TC 16 – Verify that the TAB button must be work properly while jumping on another field next
to previous.
TC 17 – Verify that all the pages must contain the proper title.
TC 19 – Verify that after updating any field a proper confirmation message must be displayed.
TC 20 - Verify that only 1 radio button must be selected and more than single checkboxes may
be selected.