0% found this document useful (0 votes)
16 views5 pages

IVT

I made a project i V T

Uploaded by

heaterwater260
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)
16 views5 pages

IVT

I made a project i V T

Uploaded by

heaterwater260
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/ 5

Software testing is the process of evaluating and verifying a software

program to ensure that it functions properly. The goal is to identify


flaws and enhance product quality. There are two methods for
testing software: Positive Testing and Negative Testing.
Positive testing determines that your application works as expected.
If an error is encountered during positive testing, the test fails.
Negative testing ensures that your application can gracefully handle
invalid input or unexpected user behavior.
The core difference between positive testing and negative testing is
that throwing an exception is not an unexpected event in the latter.
When you perform negative testing, exceptions are expected – they
indicate that the application handles improper user behavior
correctly.
It is generally considered a good practice to combine both the
positive and the negative testing approaches. This strategy provides
higher tested application coverage as compared to using only one of
the specified automated testing methodologies.
Typical Negative Testing Scenarios
Negative testing is aimed at detecting possible application crashes in
different situations. Below are several possible examples of such
situations:
Populating required fields – Some applications and web pages
contain fields that are marked as required. To check an application’s
behavior, create a test that leaves the required fields empty and
analyzes the tested application’s response. For example, the
application can show a message box requesting a user to populate an
appropriate field. After that, your test must interpret the
application’s behavior as correct when working with invalid data.
Correspondence between data and field types – Typically, dialog
boxes and forms contain controls that can accept data of a specific
type (for example, numeric, date, text, etc.). To verify whether the
application functions properly, you can create a test that enters
incorrect data into a control, for example, a test that enters a letter
into an UpDown edit box or the value of 13/30/2010 to a date field.
Allowed number of characters – Some applications and web pages
contain fields allowing a limited number of characters to be entered,
for example, the value of the User Name field for applications and
web pages must contain less than 50 characters. To check the
behavior of the application, create a test that enters more characters
into the field than is allowed.
Allowed data bounds and limits – Applications can use input fields
that accept data in a certain range. For example, there can be an edit
box into which you enter an integer number from 10 to 50, or an edit
box that accepts text of a specific length. To check the application’s
behavior, create a negative test that enters a value smaller than the
lower bound or greater than the upper bound of the specified field.
Another example of this negative test case is entering data that
exceeds the data type limits. For instance, an integer value can
normally contain values in the range of -
2,147,483,648..2,147,483,647 (the size is limited by the number of
bytes in memory).
To check the application’s behavior, you can create a negative test
that enters a value exceeding the bounds. For instance, the test can
enter a large number (100,000,000,000) into an integer field.
Reasonable data – Some applications and web pages include fields
that have a reasonable limit, for example, entering 200 or a negative
number as the value for the “Your age:” field is not allowed. To check
the application’s behavior, create a negative test that enters invalid
data into the specified field.
Web session testing – Some web browsers require that you log in
before the first web page is opened. To check that these browsers’
function correctly, create a test that tries to open web pages in the
tested application without logging in.
In both the testing, the following needs to be considered:
Input data
An action which needs to be performed
Output Result
Testing Technique used for Positive and Negative Testing:
Following techniques are used for Positive and negative validation of
testing is:
 Boundary Value Analysis
 Equivalence Partitioning
Boundary Value Analysis:
This is one of the software testing technique in which the test cases
are designed to include values at the boundary. If the input data is
used within the boundary value limits, then it is said to be Positive
Testing. If the input data is picked outside the boundary value limits,
then it is said to be Negative Testing.

For example –

A system can accept the numbers from 0 to 10 numeric values. All


other numbers are invalid values. Under this technique, boundary
values -1,0,1 and 9,10,11 will be tested.
Equivalence Partitioning:
This is a software testing technique which divides the input data into
many partitions. Values from each partition must be tested at least
once. Partitions with valid values are used for Positive Testing. While
partitions with invalid values are used for negative testing.
For example-
Numeric values Zero to ten can be divided into two (or three)
partitions. In our case, we have two partitions -10 to -1 and 0 to 10.
Sample values (5 and -5) can be taken from each part to test the
scenarios.

Conclusion
Testing aids in the delivery of high-quality software applications and
assures that the program is glitch-free before it is released. Use both
positive and negative testing to ensure sufficient confidence in the
quality of the program. Actual users can enter any value, which must
be checked before the launch.

You might also like