0% found this document useful (0 votes)
22 views19 pages

ST Unit 2

Software testing

Uploaded by

Abhithaa C
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 views19 pages

ST Unit 2

Software testing

Uploaded by

Abhithaa C
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/ 19

Unit II

Software Testing (PCA20D06J)

What is Software Testing Methodology?

Testing methodologies in Software Testing are nothing more than strategies designed to tackle one of
the biggest problems in development; finding errors and fixing them.
With every passing minute, the deck of technologies, coding languages, possible integrations, and
more is growing in sheer number. We cannot expect to have only one set methodology for every other
kind of development process.
This is why software testing is divided into specific types, from which you get to choose and apply the
most suitable one for your project.
Types of Software Testing Methodologies

Whitebox Vs Blackbox Testing

Software Testing can be majorly classified into two categories:

1. Black Box Testing is a software testing method in which the internal


structure/design/implementation of the item being tested is not known to the tester. Only
the external design and structure are tested.
2. White Box Testing is a software testing method in which the internal
structure/design/implementation of the item being tested is known to the
tester. Implementation and impact of the code are tested.
Black Box Testing White Box Testing

It is a way of software testing in which the It is a way of testing the software in which the
internal structure or the program or the code is tester has knowledge about the internal structure
hidden and nothing is known about it. or the code or the program of the software.
Black Box Testing White Box Testing

Implementation of code is not needed for black Code implementation is necessary for white box
box testing. testing.

It is mostly done by software testers. It is mostly done by software developers.

No knowledge of implementation is needed. Knowledge of implementation is required.

It can be referred to as outer or external


It is the inner or the internal software testing.
software testing.

It is a functional test of the software. It is a structural test of the software.

This testing can be initiated based on the This type of testing of software is started after a
requirement specifications document. detail design document.

It is mandatory to have knowledge of


No knowledge of programming is required.
programming.

It is the behavior testing of the software. It is the logic testing of the software.

It is applicable to the higher levels of testing of It is generally applicable to the lower levels of
software. software testing.

It is also called closed testing. It is also called as clear box testing.

It is least time consuming. It is most time consuming.

It is not suitable or preferred for algorithm


It is suitable for algorithm testing.
testing.

Can be done by trial and error ways and Data domains along with inner or internal
methods. boundaries can be better tested.

Example: Search something on google by


Example: By input to check and verify loops
using keywords

Black-box test design techniques-


White-box test design techniques-
 Decision table testing
 Control flow testing
 All-pairs testing
 Data flow testing
 Equivalence partitioning
 Branch testing
 Error guessing

Types of Black Box Testing: Types of White Box Testing:


 Functional Testing  Path Testing
Black Box Testing White Box Testing

 Non-functional testing  Loop Testing


 Regression Testing  Condition testing

It is less exhaustive as compared to white box It is comparatively more exhaustive than black
testing. box testing.

White Box Testing


White box testing techniques analyze the internal structures the used data structures, internal
design, code structure, and the working of the software rather than just the functionality as in black
box testing. It is also called glass box testing or clear box testing or structural testing. White Box
Testing is also known as transparent testing or open box testing.
White box testing is a software testing technique that involves testing the internal structure and
workings of a software application. The tester has access to the source code and uses this knowledge
to design test cases that can verify the correctness of the software at the code level.
White box testing is also known as structural testing or code-based testing, and it is used to test the
software’s internal logic, flow, and structure. The tester creates test cases to examine the code paths
and logic flows to ensure they meet the specified requirements.
Process of White Box Testing
1. Input: Requirements, Functional specifications, design documents, source code.
2. Processing: Performing risk analysis to guide through the entire process.
3. Proper test planning: Designing test cases to cover the entire code. Execute rinse-repeat
until error-free software is reached. Also, the results are communicated.
4. Output: Preparing final report of the entire testing process.
Testing Techniques
1. Statement Coverage
In this technique, the aim is to traverse all statements at least once. Hence, each line of code is
tested. In the case of a flowchart, every node must be traversed at least once. Since all lines of code
are covered, it helps in pointing out faulty code.

Statement Coverage Example

2. Branch Coverage:
In this technique, test cases are designed so that each branch from all decision points is traversed at
least once. In a flowchart, all edges must be traversed at least once.
4 test cases are required such that all branches of all decisions are covered, i.e, all edges of the

flowchart are covered

3. Condition Coverage
In this technique, all individual conditions must be covered as shown in the following example:
 READ X, Y
 IF(X == 0 || Y == 0)
 PRINT ‘0’
 #TC1 – X = 0, Y = 55
 #TC2 – X = 5, Y = 0
4. Multiple Condition Coverage
In this technique, all the possible combinations of the possible outcomes of conditions are tested at
least once. Let’s consider the following example:
 READ X, Y
 IF(X == 0 || Y == 0)
 PRINT ‘0’
 #TC1: X = 0, Y = 0
 #TC2: X = 0, Y = 5
 #TC3: X = 55, Y = 0
 #TC4: X = 55, Y = 5
5. Basis Path Testing
In this technique, control flow graphs are made from code or flowchart and then Cyclomatic
complexity is calculated which defines the number of independent paths so that the minimal number
of test cases can be designed for each independent path. Steps:
 Make the corresponding control flow graph
 Calculate the cyclomatic complexity
 Find the independent paths
 Design test cases corresponding to each independent path
 V(G) = P + 1, where P is the number of predicate nodes in the flow graph
 V(G) = E – N + 2, where E is the number of edges and N is the total number of nodes
 V(G) = Number of non-overlapping regions in the graph
 #P1: 1 – 2 – 4 – 7 – 8
 #P2: 1 – 2 – 3 – 5 – 7 – 8
 #P3: 1 – 2 – 3 – 6 – 7 – 8
 #P4: 1 – 2 – 4 – 7 – 1 – . . . – 7 – 8
6. Loop Testing
Loops are widely used and these are fundamental to many algorithms hence, their testing is very
important. Errors often occur at the beginnings and ends of loops.
 Simple loops: For simple loops of size n, test cases are designed that:
1. Skip the loop entirely
2. Only one pass through the loop
3. 2 passes
4. m passes, where m < n
5. n-1 ans n+1 passes
 Nested loops: For nested loops, all the loops are set to their minimum count, and we start
from the innermost loop. Simple loop tests are conducted for the innermost loop and this
is worked outwards till all the loops have been tested.
 Concatenated loops: Independent loops, one after another. Simple loop tests are applied
for each. If they’re not independent, treat them like nesting.
White Testing is performed in 2 Steps
1. Tester should understand the code well
2. Tester should write some code for test cases and execute them
Tools required for White box testing:
 PyUnit
 Sqlmap
 Nmap
 Parasoft Jtest
 Nunit
 VeraUnit
 CppUnit
 Bugzilla
 Fiddler
 JSUnit.net
 OpenGrok
 Wireshark
 HP Fortify
 CSUnit
Features of White box Testing
1. Code coverage analysis: White box testing helps to analyze the code coverage of an
application, which helps to identify the areas of the code that are not being tested.
2. Access to the source code: White box testing requires access to the application’s source
code, which makes it possible to test individual functions, methods, and modules.
3. Knowledge of programming languages: Testers performing white box testing must
have knowledge of programming languages like Java, C++, Python, and PHP to
understand the code structure and write tests.
4. Identifying logical errors: White box testing helps to identify logical errors in the code,
such as infinite loops or incorrect conditional statements.
5. Integration testing: White box testing is useful for integration testing, as it allows testers
to verify that the different components of an application are working together as
expected.
6. Unit testing: White box testing is also used for unit testing, which involves testing
individual units of code to ensure that they are working correctly.
7. Optimization of code: White box testing can help to optimize the code by identifying
any performance issues, redundant code, or other areas that can be improved.
8. Security testing: White box testing can also be used for security testing, as it allows
testers to identify any vulnerabilities in the application’s code.
9. Verification of Design: It verifies that the software’s internal design is implemented in
accordance with the designated design documents.
10. Check for Accurate Code: It verifies that the code operates in accordance with the
guidelines and specifications.
11. Identifying Coding Mistakes: It finds and fix programming flaws in your code,
including syntactic and logical errors.
12. Path Examination: It ensures that each possible path of code execution is explored and
test various iterations of the code.
13. Determining the Dead Code: It finds and remove any code that isn’t used when the
programme is running normally (dead code).
Advantages of Whitebox Testing
1. Thorough Testing: White box testing is thorough as the entire code and structures are
tested.
2. Code Optimization: It results in the optimization of code removing errors and helps in
removing extra lines of code.
3. Early Detection of Defects: It can start at an earlier stage as it doesn’t require any
interface as in the case of black box testing.
4. Integration with SDLC: White box testing can be easily started in Software
Development Life Cycle.
5. Detection of Complex Defects: Testers can identify defects that cannot be detected
through other testing techniques.
6. Comprehensive Test Cases: Testers can create more comprehensive and effective test
cases that cover all code paths.
7. Testers can ensure that the code meets coding standards and is optimized for
performance.
Disadvantages of White box Testing
1. Programming Knowledge and Source Code Access: Testers need to have programming
knowledge and access to the source code to perform tests.
2. Overemphasis on Internal Workings: Testers may focus too much on the internal
workings of the software and may miss external issues.
3. Bias in Testing: Testers may have a biased view of the software since they are familiar
with its internal workings.
4. Test Case Overhead: Redesigning code and rewriting code needs test cases to be written
again.
5. Dependency on Tester Expertise: Testers are required to have in-depth knowledge of
the code and programming language as opposed to black-box testing.
6. Inability to Detect Missing Functionalities: Missing functionalities cannot be detected
as the code that exists is tested.
7. Increased Production Errors: High chances of errors in production.
BLACK BOX TESTING
Black-box testing is a type of software testing in which the tester is not concerned with the internal
knowledge or implementation details of the software but rather focuses on validating the
functionality based on the provided specifications or requirements.
Prerequisite - Software Testing | Basics
Black box testing can be done in the following ways:
1. Syntax-Driven Testing – This type of testing is applied to systems that can be syntactically
represented by some language. For example, language can be represented by context-free grammar.
In this, the test cases are generated so that each grammar rule is used at least once.
2. Equivalence partitioning – It is often seen that many types of inputs work similarly so instead of
giving all of them separately we can group them and test only one input of each group. The idea is to
partition the input domain of the system into several equivalence classes such that each member of
the class works similarly, i.e., if a test case in one class results in some error, other members of the
class would also result in the same error.

The technique involves two steps:


1. Identification of equivalence class – Partition any input domain into a minimum of two
sets: valid values and invalid values. For example, if the valid range is 0 to 100 then
select one valid input like 49 and one invalid like 104.
2. Generating test cases – (i) To each valid and invalid class of input assign a unique
identification number. (ii) Write a test case covering all valid and invalid test cases
considering that no two invalid inputs mask each other. To calculate the square root of a
number, the equivalence classes will be (a) Valid inputs:
 The whole number which is a perfect square-output will be an integer.
 The entire number which is not a perfect square-output will be a decimal
number.
 Positive decimals
 Negative numbers(integer or decimal).
 Characters other than numbers like “a”,”!”,”;”, etc.
3.Boundary value analysis – Boundaries are very good places for errors to occur. Hence, if test
cases are designed for boundary values of the input domain then the efficiency of testing improves
and the probability of finding errors also increases. For example – If the valid range is 10 to 100
then test for 10,100 also apart from valid and invalid inputs.

4. Cause effect graphing – This technique establishes a relationship between logical input called
causes with corresponding actions called the effect. The causes and effects are represented using
Boolean graphs. The following steps are followed:
1. Identify inputs (causes) and outputs (effect).
2. Develop a cause-effect graph.
3. Transform the graph into a decision table.
4. Convert decision table rules to test cases.
For example, in the following cause-effect graph:

It can be converted into a decision table like:


Each column corresponds to a rule which will become a test case for testing. So there will be 4 test
cases.
5. Requirement-based testing – It includes validating the requirements given in the SRS of a
software system.
6. Compatibility testing – The test case results not only depends on the product but is also on the
infrastructure for delivering functionality. When the infrastructure parameters are changed it is still
expected to work properly. Some parameters that generally affect the compatibility of software are:
1. Processor (Pentium 3, Pentium 4) and several processors.
2. Architecture and characteristics of machine (32-bit or 64-bit).
3. Back-end components such as database servers.
4. Operating System (Windows, Linux, etc).
Black Box Testing Type
The following are the several categories of black box testing:
1. Functional Testing
2. Regression Testing
3. Nonfunctional Testing (NFT)
Functional Testing: It determines the system’s software functional requirements.
Regression Testing: It ensures that the newly added code is compatible with the existing code. In
other words, a new software update has no impact on the functionality of the software. This is
carried out after a system maintenance operation and upgrades.
Nonfunctional Testing: Nonfunctional testing is also known as NFT. This testing is not functional
testing of software. It focuses on the software’s performance, usability, and scalability.
Tools Used for Black Box Testing:
1. Appium
2. Selenium
3. Microsoft Coded UI
4. Applitools
5. HP QTP.
What can be identified by Black Box Testing
1. Discovers missing functions, incorrect function & interface errors
2. Discover the errors faced in accessing the database
3. Discovers the errors that occur while initiating & terminating any functions.
4. Discovers the errors in performance or behaviour of software.
Features of black box testing:
1. Independent testing: Black box testing is performed by testers who are not involved in
the development of the application, which helps to ensure that testing is unbiased and
impartial.
2. Testing from a user’s perspective: Black box testing is conducted from the perspective
of an end user, which helps to ensure that the application meets user requirements and is
easy to use.
3. No knowledge of internal code: Testers performing black box testing do not have access
to the application’s internal code, which allows them to focus on testing the application’s
external behaviour and functionality.
4. Requirements-based testing: Black box testing is typically based on the application’s
requirements, which helps to ensure that the application meets the required specifications.
5. Different testing techniques: Black box testing can be performed using various testing
techniques, such as functional testing, usability testing, acceptance testing, and regression
testing.
6. Easy to automate: Black box testing is easy to automate using various automation tools,
which helps to reduce the overall testing time and effort.
7. Scalability: Black box testing can be scaled up or down depending on the size and
complexity of the application being tested.
8. Limited knowledge of application: Testers performing black box testing have limited
knowledge of the application being tested, which helps to ensure that testing is more
representative of how the end users will interact with the application.
Advantages of Black Box Testing:
 The tester does not need to have more functional knowledge or programming skills to
implement the Black Box Testing.
 It is efficient for implementing the tests in the larger system.
 Tests are executed from the user’s or client’s point of view.
 Test cases are easily reproducible.
 It is used in finding the ambiguity and contradictions in the functional specifications.
Disadvantages of Black Box Testing:
 There is a possibility of repeating the same tests while implementing the testing process.
 Without clear functional specifications, test cases are difficult to implement.
 It is difficult to execute the test cases because of complex inputs at different stages of
testing.
 Sometimes, the reason for the test failure cannot be detected.
 Some programs in the application are not tested.
 It does not reveal the errors in the control structure.
 Working with a large sample space of inputs can be exhaustive and consumes a lot of
time.
Boundary Value Analysis

Boundary value analysis is one of the widely used case design technique for black box testing. It is
used to test boundary values because the input values near the boundary have higher chances of error.

Whenever we do the testing by boundary value analysis, the tester focuses on, while entering boundary
value whether the software is producing correct output or not.

Boundary values are those that contain the upper and lower limit of a variable. Assume that, age is a
variable of any function, and its minimum value is 18 and the maximum value is 30, both 18 and 30
will be considered as boundary values.

The basic assumption of boundary value analysis is, the test cases that are created using boundary
values are most likely to cause an error.

There is 18 and 30 are the boundary values that's why tester pays more attention to these values, but
this doesn't mean that the middle values like 19, 20, 21, 27, 29 are ignored. Test cases are developed
for each and every value of the range.
Testing of boundary values is done by making valid and invalid partitions. Invalid partitions are tested
because testing of output in adverse condition is also essential.

Let's understand via practical:

Imagine, there is a function that accepts a number between 18 to 30, where 18 is the minimum and 30
is the maximum value of valid partition, the other values of this partition are 19, 20, 21, 22, 23, 24, 25,
26, 27, 28 and 29. The invalid partition consists of the numbers which are less than 18 such as 12, 14,
15, 16 and 17, and more than 30 such as 31, 32, 34, 36 and 40. Tester develops test cases for both
valid and invalid partitions to capture the behavior of the system on different input conditions.

The software system will be passed in the test if it accepts a valid number and gives the desired output,
if it is not, then it is unsuccessful. In another scenario, the software system should not accept invalid
numbers, and if the entered number is invalid, then it should display error massage.

If the software which is under test, follows all the testing guidelines and specifications then it is sent to
the releasing team otherwise to the development team to fix the defects.

Equivalence Partitioning Technique

Equivalence partitioning is a technique of software testing in which input data is divided into partitions
of valid and invalid values, and it is mandatory that all partitions must exhibit the same behavior. If a
condition of one partition is true, then the condition of another equal partition must also be true, and if
a condition of one partition is false, then the condition of another equal partition must also be false.
The principle of equivalence partitioning is, test cases should be designed to cover each partition at
least once. Each value of every equal partition must exhibit the same behavior as other.

The equivalence partitions are derived from requirements and specifications of the software. The
advantage of this approach is, it helps to reduce the time of testing due to a smaller number of test
cases from infinite to finite. It is applicable at all levels of the testing process.

Examples of Equivalence Partitioning technique


Assume that there is a function of a software application that accepts a particular number of digits, not
greater and less than that particular number. For example, an OTP number which contains only six
digits, less or more than six digits will not be accepted, and the application will redirect the user to the
error page.

1. 1. OTP Number = 6 digits

Let's see one more example.

A function of the software application accepts a 10 digit mobile number.

1. 2. Mobile number = 10 digits

In both examples, we can see that there is a partition of two equally valid and invalid partitions, on
applying valid value such as OTP of six digits in the first example and mobile number of 10 digits in
the second example, both valid partitions behave same, i.e. redirected to the next page.
Another two partitions contain invalid values such as 5 or less than 5 and 7 or more than 7 digits in the
first example and 9 or less than 9 and 11 or more than 11 digits in the second example, and on
applying these invalid values, both invalid partitions behave same, i.e. redirected to the error page.

We can see in the example, there are only three test cases for each example and that is also the
principal of equivalence partitioning which states that this method intended to reduce the number of
test cases.

How we perform equivalence partitioning

We can perform equivalence partitioning in two ways which are as follows:

Let us see how pressman and general practice approaches are going to use in different conditions:

Condition1

If the requirement is a range of values, then derive the test case for one valid and two invalid inputs.

Here, the Range of values implies that whenever we want to identify the range values, we go for
equivalence partitioning to achieve the minimum test coverage. And after that, we go for error
guessing to achieve maximum test coverage.

According to pressman:

For example, the Amount of test field accepts a Range (100-400) of values:

According to General Practice method:

Whenever the requirement is Range + criteria, then divide the Range into the internals and check for
all these values.

For example:

In the below image, the pressman technique is enough to test for an age text field for one valid and two
invalids. But, if we have the condition for insurance of ten years and above are required and multiple
policies for various age groups in the age text field, then we need to use the practice method.
Condition2

If the requirement is a set of values, then derive the test case for one valid and two invalid inputs.

Here, Set of values implies that whenever we have to test a set of values, we go for one
positive and two negative inputs, then we moved for error guessing, and we also need to verify that
all the sets of values are as per the requirement.

Example 1

Based on the Pressman Method

If the Amount Transfer is (100000-700000)

Then for, 1 lakh →Accept

And according to General Practice method

The Range + Percentage given to 1 lakh - 7 lakh

Like: 1lak - 3lak →5.60%

3lak - 6lak →3.66%

6lak - 7lak →Free

If we have things like loans, we should go for the general practice approach and separate the stuff into
the intervals to achieve the minimum test coverage.

Example 2

if we are doing online shopping, mobile phone product, and the different Product ID -1,4,7,9
Here, 1 → phone covers 4 → earphones 7 → charger 9 → Screen guard

And if we give the product id as 4, it will be accepted, and it is one valid value, and if we provide the
product id as 5 and phone cover, it will not be accepted as per the requirement, and these are the two
invalid values.

Condition 3

If the requirement id Boolean (true/false), then derive the test case for both true/false values.

The Boolean value can be true and false for the radio button, checkboxes.

For example

Serial Description Input Expected Note


no

1 Select valid NA True ---

2 Select NA False Values can be change based


invalid according to the
requirement.

3 Do not select NA Do not select anything, We cannot go for next


error message should be question
displayed
4 Select both NA We can select any radio Only one radio button can be
button selected at a time.

Note:

In Practice method, we will follow the below process:

Here, we are testing the application by deriving the below inputs values:

Let us see one program for our better understanding.

ADVERTISEMENT

1. If( amount < 500 or > 7000)


2. {
3. Error Message
4. }
5. if( amount is between 500 & 3000)
6. {
7. deduct 2%
8. }
9. if (amount > 3000)
10. {
11. deduct 3%
12. }

When the pressman technique is used, the first two conditions are tested, but if we use the practice
method, all three conditions are covered.

We don't need to use the practice approach for all applications. Sometime we will use the pressman
method also.

But, if the application has much precision, then we go for the practice method.

If we want to use the practice method, it should follow the below aspects:

o It should be product-specific
o It should be case-specific
o The number of divisions depends on the precision( 2% and 3 % deduction)

Advantages and disadvantages of Equivalence Partitioning technique

Following are pros and cons of equivalence partitioning technique:


Advantages Disadvantages

It is process-oriented All necessary inputs may not cover.

We can achieve the Minimum test This technique will not consider the condition for
coverage boundary value analysis.

It helps to decrease the general test The test engineer might assume that the output for all
execution time and also reduce the set data set is right, which leads to the problem during the
of test data. testing process.

Error Guessing Technique

Error guessing is a technique in which there is no specific method for identifying the error. It is based
on the experience of the test analyst, where the tester uses the experience to guess the problematic
areas of the software. It is a type of black box testing technique which does not have any defined
structure to

In this approach, every test engineer will derive the values or inputs based on their understanding or
assumption of the requirements, and we do not follow any kind of rules to perform error guessing
technique.

The accomplishment of the error guessing technique is dependent on the ability and product
knowledge of the tester because a good test engineer knows where the bugs are most likely to be,
which helps to save lots of time.

How does the error guessing technique be implemented?

The implementation of this technique depends on the experience of the tester or analyst having prior
experience with similar applications. It requires only well-experienced testers with quick error
guessing technique. This technique is used to find errors that may not be easily captured by formal
black box testing techniques, and that is the reason, it is done after all formal techniques.

The scope of the error guessing technique entirely depends on the tester and type of experience in the
previous testing involvements because it does not follow any method and guidelines. Test cases are
prepared by the analyst to identify conditions. The conditions are prepared by identifying most error
probable areas and then test cases are designed for them.

The main purpose of this technique is to identify common errors at any level of testing by exercising
the following tasks:

o Enter blank space into the text fields.


o Null pointer exception.
o Enter invalid parameters.
o Divide by zero.
o Use maximum limit of files to be uploaded.
o Check buttons without entering values.
The increment of test cases depends upon the ability and experience of the tester.

Purpose of Error guessing

The main purpose of the error guessing technique is to deal with all possible errors which cannot be
identified as informal testing.

o The main purpose of error guessing technique is to deal with all possible errors which cannot
be identified informal testing.
o It must contain the all-inclusive sets of test cases without skipping any problematic areas and
without involving redundant test cases.
o This technique accomplishes the characteristics left incomplete during the formal testing.

Depending on the tester's intuition and experience, all the defects cannot be corrected. There are some
factors that can be used by the examiner while using their experience -

o Tester's intuition
o Historical learning
o Review checklist
o Risk reports of the software
o Application UI
o General testing rules
o Previous test results
o Defects occurred in the past
o Variety of data which is used for testing
o Knowledge of AUT

Examples of Error guessing method

Example1

A function of the application requires a mobile number which must be of 10 characters. Now, below
are the techniques that can be applied to guess error in the mobile number field:

o What will be the result, if the entered character is other than a number?
o What will be the result, if entered characters are less than 10 digits?
o What will be the result, if the mobile field is left blank?

After implementing these techniques, if the output is similar to the expected result, the function is
considered to be bug-free, but if the output is not similar to the expected result, so it is sent to the
development team to fix the defects.

However, error guessing is the key technique among all testing techniques as it depends on the
experience of a tester, but it does not give surety of highest quality benchmark. It does not provide full
coverage to the software. This technique can yield a better result if combined with other techniques of
testing.
Example2

Suppose we have one bank account, and we have to deposit some money over there, but the amount
will be accepted on a particular range of which is 5000-7000. So here, we will provide the different
input's value until it covers the maximum test coverage based on the error guessing technique, and see
whether it is accepted or give the error message:

Value description

6000 Accept

5555 Accept

4000 Error message

8000 Error message

Blank Error message

100$ Error message

---- ----

---- ----

Maximum test coverage

Note:

Condition: if amount >5000 and amount<7000 amount

And, if we enter 5000 → error message (not accepted based on the condition)

7000→ error message (not accepted based on the condition)

Advantages and disadvantage of Error guessing technique

Advantages

The benefits of error guessing technique are as follows:

o It is a good approach to find the challenging parts of the software.


o It is beneficial when we will use this technique with the grouping of other formal testing
techniques.
o It is used to enhance the formal test design techniques.
o With the help of this technique, we can disclose those bugs which were probably identified
over extensive testing; therefore, the test engineer can save lots of time and effort.

Disadvantage

Following are the drawbacks of error guessing technique:

o The error guessing technique is person-oriented rather than process-oriented because it depends
on the person's thinking.
o If we use this technique, we may not achieve the minimum test coverage.
o With the help of this, we may not cover all the input or boundary values.
o With this, we cannot give the surety of the product quality.
o The Error guessing technique can be done by those people who have product knowledge; it
annot be done by those who are new to the product.

You might also like