Negative testing

NEGATIVE TESTING

Table of Contents

Software testing involves the thorough validation of the software to identify as many defects as possible and verify the compliance of the software with client requirements. A detailed testing with with data set values and different steps is involved.  We have two testing strategies. They are positive testing and negative testing. 

Positive testing:

Positive testing determines that your software works as you expected. Software is tested with valid possibilities and valid data values. If an error occurs then software fails.

Negative testing: 

Negative Testing ensures that the application can handle the invalid input. For example: if a user enters any invalid data in the input data field then a message ‘please enter the correct data should be displayed’. The purpose of the negative testing is to detect such situations and verify it, to avoid the system from crashing. The testing ensures that the software can handle the improper behaviour of the system. The difference between the positive and negative testing is that the exceptions are avoided in the positive testing whereas exceptions are tested in the negative testing. From the software testers point of view it is important that software functions or works as per requirements. But it is important too, to verify that the software equally handles the abnormal situations for the invalid input to maintain the stability of the software. Mainly negative testing is done where there is possibility of software crashing. There can be various examples of negative testing.

Examples: 

  1. In the text field of Phone Number, the user may enter the phone number as alphabets or exceed the limit of the numeric values.
  2. In the Age field where the condition is the age should be greater than 0 and less than 100. The user may enter the value other than 0 to 100.

Check your understanding:

  1. Why negative testing is necessary?
  2. What are the possible scenarios in which negative testing is  done?

74 Responses

  1. Negative testing: It ensures that the application can handle invalid input. Purpose of this is to check such situations and verify it to avoid system crashing.
    eg: if users enter invalid input then message appears “Please enter the correct valid data should be displayed.”
    Negative testing is done in different scenarios like testing the login function with invalid data in any application, testing the online banking application by entering numeric data in place of text field or exceeding the limit of numeric values etc..

  2. 1. Why negative testing is necessary?
    Negative testing is necessary to check the software can handle the abnormal situations or invalid input entries and to avoid the software crashing.

    2. What are the possible scenarios in which negative testing is done?
    • Populating required field: Skipping the required data entry and trying to proceed
    • Allowed number of characters: Entering more number of characters
    • Allowed data bounds and limits: Enter the large values to test the size of the field
    • Reasonable Data: Verify the data validity and format
    • Password textbox should not accept less than 6 characters
    • Password textbox should not exceeds more than 20 characters
    • Password textbox should not accept special characters

  3. 1. Negative testing is necessary to ensure that the software will not crash if invalid data entered.

    2. The possible scenarios of negative testing could be where numeric or alphabetic letters can be entered, or user entered the value other then what the condition is.

  4. Negative testing is necessary to ensure that the application can handle the invalid input. Its necessary to avoid the system from crashing if a user enters any invalid data in the input field.
    The possible scenarios in which negative testing is done are:
    1. In the text field of Password of 8 characters , with at least one capital, the user may enter 8 characters and no capital.
    2 In the text field of zip code with 5 digits of numeric value, the user may enter 6 digits and one alphabetic value.

  5. 1. Negative Testing is very important to avoid the software from crashing and stop working completely. It is necessary to maintain the stable outcome of the software.
    2. Negative testing can be done:
    -Any textbox for invalid data and empty box.
    -Required fields in a form to submit the form.
    -Social Security Number box to check for other characters apart from numbers and hyphen.

  6. Negative testing is important for the conformation of normal behavior of the system. It is very important to handle the abnormalities in a system aswell.These situations can be tested with Negative system.And it helps the system from crashing.
    Entering ialphabets in the place of numerals for the zip code of a particular country ( say USA) can be an example.

  7. 1.Negative testing is necessary to ensure that the system does not crash when the invalid values are fed instead of the expected values. Exceptions are also tested in this kind of testing.  For example if the user login field is left blank or the values entered does not match as per the specifications, then the system should be able to generate an error message prompting the user to enter the correct values .

  8. 1.The purpose of negative testing is to prevent the application from crashing and it also helps improve the quality of an
    application by detecting defects.
    The fundamental aim of this testing is check that how bad data is taken care of by the systems, and appropriate errors are
    shown to client when bad data is entered.

    2.Below are some negative testing scenarios for this particular pane:
    a)ABCDEFGHJKIOOOOOKIsns (name exceeding 10 characters)
    b )abcd1234 (name having numerical values)
    c) No name supplied
    d) sndddwwww_ ( the name containing special characters)

  9. Why negative testing is necessary?
    Negative testing is necessary to see how the application behave when invalid data is entered in the UI by the end user. To see whether the application give proper message to the end user when they enter invalid data in the application.

    What are the possible scenarios in which negative testing is done?
    When there is any constrains given for a text box or any Situation where end user can enter any data through the UI to get any information from the application then negative testing can be done in those scenarios.
    eg: when there is a constraint for a Login ID shouldn’t exceed 15 characters

  10. POSITIVE/NEGATIVE TESTING
    1. It’s necessary because its important to check If the software can handle the invalid input and display the correct message.
    2. Some scenarios include: 1) entering a zip code in the US where only 5 numbers are allowed. The user enters an invalid character or exceeds the amount of characters required. 2) using special characters in an online login where only numbers are permitted.

  11. 1. Negative testing is necessary to ensure that the application can handle the invalid input. Also, to verify the software can handle the abnormal situations for the invalid input to maintain the stability of the software and/or to prevent the possible software crash.

    2. Possible scenarios are: putting addition numbers in text field than required, the alphabets in the zip code field (5 digit zip code for U.S.), or using more or less than 5 digits in the zip code field, using special characters in an online ID where it says only letters and numbers

  12. Negative testing is necessary because it will test for other possible inputs that will eventually results in other than a positive. This will make a good quality of software because you’re accessing the risk of the system crashing. It is an efficient way of testing rather than ignoring the known possibilities.
    It is done when, for example a field asked for 3 chars, but what is they entered nothing or numbers? It should say a message for the right format and to enter the valid text in the field to get the results.

  13. Negative testing is importsntv to make sure the software can handle invalid data and stop mis use of the software

  14. Software testing has two kinds of testing strategies. First is positive testing and Negative Testing.
    Positive Testing; In this testing strategies software tested with valid data and possibilities and gives the result according as accepted.

    Negative Testing; This strategies ensure that software can handle the invalid data without crashing and displays the error message.

  15. Negative testing is done where there is possibility of software crashing. Negative Testing ensures that the application can handle the invalid input.The purpose of the negative testing is to detect such situations and verify it, to avoid the system from crashing. The testing ensures that the software can handle the improper behavior of the system.
    The possible scenarios in which negative testing is done are:
    the amount transfer in the field in a bank account can be entered with more than maximum amount/less than minimum amount,entering alphabets rather than numeric value etc., so the error page should display with proper message.

  16. Negative teting is necessary because it check whether the software can handle the invalid input and display the correct message.
    2. Some scenarios include: 1) entering a zip code in the US where only 5 numbers are allowed. The user enters an invalid character or exceeds the amount of characters required. 2) using special characters in an online login where only numbers are permitted.

  17. Negative testing method is to ensure that an application can handle unwanted inputs and abnormal user behavior by giving an error message. Negative testing can be done to avoid system crashing.
    Positive testing, and Negative testing both are equally important in testing.
    Possible scenarios where Negative testing can be done:
    In age field we can enter alphabets and check weather we are getting an error message or not.
    In Negative testing, invalid data is inserted to compare the output against the given input.

  18. 1. Negative testing is necessary to make sure the software can handle the all the invalid inputs in data entry fields. Negative testing ensures that the software can indetify the improper behaviour of the system.

    2. Some examples of negative testing scenarios are the following:
    — A data entry field for zipcode where it takes only 5 digits but the user enters 4 or 6 digits
    — Another field could be for password where it only takes numbers but the user enters alphabets or special characters.

  19. Why negative testing is necessary?
    Negative Testing ensures that the application can handle the invalid input.
    The purpose of the negative testing is to detect such situations and verify it, to avoid the system from crashing.

    What are the possible scenarios in which negative testing is done?
    1. Account number field text box in banking website.. User enters Alpha or special characters in the field then it should give Error and ask to reenter the account no.
    2. ZIPCODE Text box : User enters numbers more than 5 digits or special characters then it should give Error.

  20. Negative testing assures the system doesn’t crash in case of abnormal input.
    E.g special characters when only alphabet is needed, exceeded number of character or less then min is password,

  21. The negative testing is necessary to see that software works as per the requirement. The purpose of the negative testing is to detect such situations and verify it, to avoid the system from crashing. Possible scenario can be if a user enters any invalid data in the input data field then a message ‘please enter the correct data should be displayed.

  22. 1. Why negative testing is necessary?
    Negative testing helps to maintain the stability of the software. Mainly negative testing is done where there is possibility of software crashing. It is important to verify that the software equally handles the abnormal situations for the invalid input .
    2. What are the possible scenarios in which negative testing is done?
    Eg.In a banking website the value entered in the account number field expected to be 12 digit, a negative testing can be done by enter less than or more than 12 digits or by entering any value other than numbers

    In the text field of First name, the user may enter the name as numeric value or special characters or exceed the limit of characters

  23. • To improve the quality of the software
    • To avoid security breaches
    • To reduce exploitation of the application.
    • Major failures and Crashing of the application will be avoided.

    In all test scenarios it is good we check with invalid data. So that we avoid security breaches, improve quality of the s/w.
    EX: In Login module, the Username should not contain any special characters, if suppose special characters are used then the error message should be displayed. Similarly, in password field it must contain letter, uppercase, lower case, special character, and a number if not then the error message should be displayed.

  24. A Software validation testing is done for two reasons such as identifying any possible defects and making sure it complies with the requirements gathered from the client. To do so, Positive and Negative testing approaches are done to accomplish the goal. While both of these testing are equally important, Negative testing is necessary to prevent system crash in case user enter bad data (Invalid) in the input fields. This Negative testing helps strengthen the software to handle exceptions or abnormal situations.

  25. 1. Negative Testing is necessary to ensure that the application can handle the invalid input and to avoid the system from crashing and also to identify the improper behavior of the system.

    2. a..In the gmail page login name, the user may enter the login name in numbers instead of alphabets
    b. .In the Age field where the condition is the age should be greater than 0 and less than 100. The user may enter the value other than 0 to 100

  26. 1.Negative testing:It is a testing in which invalid input is detected and verify it and also to avoid system crashing.
    2.The other scenario is in login field in password textbox all upper case or all lowercase is tested in negative testing.

  27. 1.Negative testing ensures that the software can handle the improper behaviour of the system also
    2. From the software testers point of view it is important that software functions or works as per requirements. But it is important too, to verify that the software equally handles the abnormal situations for the invalid input to maintain the stability of the software

  28. 1 Negative testing is necessary for unexpected user behavior and to avoid the system crashing, and to make sure the software can invalid data when the user is put invalid data in the input field.
    2 Negative testing is done in the scenarios such as testing the login function with invalid data in any application, testing the online banking application.

  29. The purpose of the negative testing is to detect such situations and verify it, to avoid the system from crashing
    The negative testing needed for if the application can handle the abnormal situations for invalid input to maintain the stability of software to avoid the system from crashing.
    For eg: Entering alphabets in the place of numeric data. The error page should be displayed.

  30. Why negative testing is necessary?
    Negative testing is also called ‘Destructive Testing’ and it is commonly referred to as error path testing or failure testing and is generally done to ensure the stability of the application.

    What are the possible scenarios in which negative testing is done?
    – Entering letter in a numeric file
    – Entering numbers or special characters in the name field

  31. Negative testing is to check that the software can handle invalid input and avoids the system from crashing.
    Example: If a person enters alphabets instead of numbers in the zipcode area.

  32. In negative testing, we give invalid data as input and check whether the software handles the abnormal situation and prevent system from crashing.
    For example :In the Zipcode field user may enter alphabet or more than 5 digits.It should display error message

  33. Negative Testing ensures that the application can handle the invalid input. The testing ensures that the software can handle the improper behavior of the system.It is done to avoid the system from crashing.

    The possible scenarios in which negative testing is done are:
    1)In the text field of Phone Number, the user may enter the phone number as alphabets or exceed the limit of the numeric values.
    2)In the Age field where the condition is the age should be greater than 0 and less than 100. The user may enter the value other than 0 to 100.
    3)Entering a zip code in the US where only 5 numbers are allowed. The user enters an invalid character or exceeds the amount of characters required.
    4) Entering a negative number for a person’s height or weight field.
    5) Leaving a required field blank.

  34. the goal of negative testing; to avoid a software from crashing when expectation are not met.
    >> >> >>positive testing : when your software works as you expected. eg. when you put wrong data the software fails.

  35. Negative testing is necessary to check the software can handle the abnormal situation or with invalid inputs to avoid the software crashing .
    Negative testing is done if the user enters more than 5 digits for zip code or entering character values and the input fields are blank..

  36. 1. Negative testing is necessary as it is needed to verify the reliability of the software based on the negative/abnormal scenarios in order to maintain the stability and security of the software.
    2. a. Entering the invalid account number during the online transactions.
    b. Creating the similar usernames.

  37. 1. Negative Testing ensures that the application can handle the invalid input.The testing ensures that the software can handle the improper behaviour of the system.
    2. eg: In the text box of First name, the user may enter the name as numeric value or special characters or exceed the limit of characters.
    In Zipcode text box the chararcters cannot exceed the limit .
    In Account number text box the numeric value cannot be more than 12 digit and it does not accept alphabets

  38. Positive testing ensures that expected and valid input is working. Negative testing ensures the elimination of invalid data input, particularly the type that can cause the software to crash. Examples of negative testing could be out of limits input of a range of dates for certain functions to be performed over time. Also out of range input of temperatures for scientific instruments to function. Out of range input of speeds in trains.

  39. Negative testing is necessary to test if software handles improper behavior of the system and to prevent crashing.
    For example testing what happens if alphabet is entered on numeric field like age, zip code or if number is entered on non-numeric field like name, entering more or less than 5 digits for zip code.

  40. It is necessary to have negative testing, in order to see the behavior of the software when improper behavior is introduced.
    Eg: pass required alphanumeric, special symbol. When special symbol not entered, reminder message displayedin red that special symbol is needed in password.

  41. Negative testing is done to make sure that the software can handle invalid data entries and then it should display the message enter correct data without crashing the whole software.

    In short, if someone enters your id and wrong password , it should not allow him to access your bank account.

  42. Negative testing is done to make sure that the software can handle invalid data entries and then it should display the messages like ” invalid data please check the starred field “etc. without crashing the whole software.

    In short, if someone enters your id and wrong password , it should not allow him to access your bank account.

  43. Why negative testing is necessary?
    Negative testing is necessary primarily to see if in a situation where invalid data is input in the UI by the end user, the application is able to detect this and give a proper message regarding this. Negative testing is done to ensure that the system doesn’t crash due to the invalid data input by the user. It helps in handling unexpected user behavior and avoids system crashing.

    What are the possible scenarios in which negative testing is done?
    Negative testing is done in the following situations:
    Password fields where the usage of upper- or lower-case alphabets is permitted, the user can use special characters or symbols.
    Age textbox where which accepts only integers, negative testing can be done by putting in alphabets.

  44. Pingback: URL
  45. 1.Negative testing ensures that the software handles abnormal behaviour from the invalid input data.This testing prevents software from crashing due to the invalid input and increases stability of the software.
    2.—Amount text box which accepts only numeric value,if the user enters
    alphanumeric then error message should get displayed.this is the negative
    testing .
    —-In the application login screen if the user enters only username and leaving the
    password blank then it should not allow the user to login and enter password
    message has to pop up..

  46. 1.Why negative testing is necessary?
    Negative testing is necessary to make sure that the software can handle any invalid data entries or any unusual situations.It is used to maintain the stability of the software without making the system crash.

    2.What are the possible scenarios in which negative testing is done?
    If a user tries to enter invalid data in the input fields, the correct behavior in this case would be to display the “Incorrect data entry, please enter a valid data” message should display on the screen.
    Ex:a)Login functionality
    Use invalid username but valid password.
    Use valid username but invalid password etc
    b) In security testing if user tries to login into online banking account with invalid password repeatedly “the account should lock” and “account locked” message has to be displayed on the page.

  47. Negative testing:
    Can handle well when unexpected results occur.
    It guide/remind the users that invalid data is entered and addressing them to enter the valid one.
    good for the users.
    S/w crashing is avoided.
    Scenarios;
    Entering the zip code
    Entering the birthdate

  48. Negative testing is very important to make sure the system is fine even though we enter invalid inputs to test the software and also we should make sure the software giving us error message if we input invalid data sets when test, so that it can help users to enter the valid data while using software. It helps us to understand the stability of the software.
    Ex: Entering wrong Zipcode
    Invalid user name
    Invalid password
    Invalid account details on any web application

  49. Why negative testing is necessary?
    Negative testing is necessary to make sure the software or program can handle improper usage or invalid data without failing or crashing. It is necessary not only for consistent functioning of software but also for security of software.

    What are the possible scenarios in which negative testing is done?
    Testing of banking software, online shopping software etc
    – If a login function requires password to be at least 8 characters and you put in one with 6 or 9 characters, the system should realize the error and an Error message should pop up and you should not be able to proceed.
    – In the DOB field in a particular software, if the expected format is DD/MM/YYYY and you input 01/12/19 , you should get an error saying Please enter valid DOB.

  50. 1. Why negative testing is necessary?
    Negative testing is necessary so that the application can be tested with exceptions that it can handle almost all situations with invalid inputs so that the system can maintain stability without crashing.

    2. What are the possible scenarios in which negative testing?
    In loan application: Entering special characters, entering alphabet character in the loan amount input field.
    In Address box: Entering phone number for address

  51. Negative testing determines how it handles abnormal situations when invalid input given to input field. Instead of crashing the software it supposed to display an error message.

    Scenarios
    -In name field user may enter numeric values
    -In comment section user might write with little or no comments in the field.

  52. 1. Negative testing is necessary to ensure the software can handle the unexpected scenarios. There are lot of situations where humans can make mistakes while entering input and it’s always important that the software can handle such situations without crashing.

    2. Possible scenarios where negative testing are done:

    a) Banking: Entering alphabets in account number field and numbers in name field

    b) In hardware/software projects the input and output signals are checked with binary numbers (0,1). Checking the inputs and outputs with numbers other than 0’s and 1’s is a possible scenario for negative testing.

  53. Negative testing is important to avoid software crashes and to make sure software can function in extreme and unexpected scenarios. It makes sure correct input is collected from the user to give accurate output.

  54. 1) What is Negative testing?
    Negative testing is to check the system how it behaves when the invalid inputs applied while testing the application. It should give error message when we enter invalid possibilities saying that enter correct details, so that user can enter valid details. Negative testing can help saving the application from crashing with unexpected results.
    2)Scenarios:
    Enter alphabets in the phone number filed
    Enter age

  55. When exceptions are focused to be tested, it is known as negative testing. As negative testing is done with the input of possible invalid data, it ensures that the system does not crash even with unexpected input. It is necessary as the ratio of input of invalid data is same as one would enter valid data.
    Scenario 1: Password for gmail login is supposed to be at least of eight characters with at least a special character, number and uppercase alphabet. Negative testing in this scenario would be with less than 8 characters or with no special characters, numbers or uppercase alphabet.
    Scenario 2: Currency converter application takes digits only. Negative testing can be done by series of inputs that could be with alphabets, special characters or space.

  56. 1)Negative Testing is necessary to ensure that the software handless any situations and avoids from crashing of the system.
    2)The possible scenarios where Negative Testing is done :
    –when the user enters invalid data in the input field the message, please enter the valid data should be displayed.
    –Negative testing is done where there is the possibility of system crashing.
    –And when the text field of the phone number if the user types alphabets.
    –and also if there is a condition in the age field to enter more than 0 and less than 100 and the user types more than 100.

  57. Negative testing is done to ensure the application can handle the invalid input and improper behavior of the system. It is mainly done where there possibility of software crashing.
    Ex: trying to enter an invalid email id in the email field.
    when the text field of the phone number if the user types alphabets.

  58. Negative testing is required because it ensure that the application can handle the invalid input and it also ensure that the system can handle improper behavior of the system.It is mainly done where there possibility of software crashing.
    The possible scenario in which negative testing is done
    1)trying to enter an invalid email id in the email field
    2)Trying to enter an invalid phone number in a phone number field (characters)
    3)Upload image with size out of specified boundary

  59. Negative testing is necessary to ensure that the application can handle the invalid input. Its necessary to avoid the system from crashing if a user enters any invalid data in the input field.
    The possible scenarios in which negative testing is done are:
    1. In the text field of Password of 8 characters , with at least one capital, the user may enter 8 characters and no capital.
    2 In the text field of zip code with 5 digits of numeric value, the user may enter 6 digits and one alphabetic value.

  60. Why negative testing is necessary?
    It is necessary so as to ensure the system doesn’t crash, if unacceptable inputs are entered, the correct error message it should pop out during such circumstance.
    What are the possible scenarios in which negative testing is done?
    Login user id in bank url,, where its alpanumeric with maxi value of 8, so negative testing to be done, by entering more than 8 values or using only apha or only numeric or special char, in that case, the error msg should be displayed.

  61. Negative testing is done to verify how the system handles invalid input, whether the system is working properly/ and also finding defects . Example password criteria not met, date entered in wrong format. to enter invalid what login not suppose to do.
    Entering alphabets in the place of numeric data. The error page should be displayed. leaving blank for user and password

  62. Negative testing is done to verify how the system handles invalid input to see whether the system is stable or not during abnormal conditions or human input errors. The possibility can be tested to see the behavior of the software.

  63. Why Negative testing is necessary?
    Negative testing is necessary because it is important to verify the software how it is handling the invalid situations. Negative testing is done to avoid the system crashing. When we give the invalid input data value to the software, it should display like “please enter valid input data” . According to the software testers the negative testing is very important to verify the software in exception conditions.
    EX: In banking website we need to enter the account number within 12 digits, if we exceeds 12 digits then it should display error message.

  64. 1.Negative Testing involves testing the application for failure like conditions It involves testing the tool with improper inputs. The purpose of negative testing is to ensure the application can handle invalid input, detect situations and verify it and to avoid the system from crashing.
    2.Add an image with a size that exceeds the given limit
    In a contact number box, try entering a fake phone number or characters.

  65. 1.) Negative Testing is needed because it tests the invalid input, which is to ensure the application doesn’t crash and to confirm that the desired out come happens. It is necesary because you must make sure the system can handle improper and incorrect inputs.

    2.) He are some exampled of a scenario where negative testing would be done:
    -You can test a login function with the incorrect password and confim the “please enter correct password/username” comes up.
    -You can test a function that requires a mumber of 0-100 by using numbers out side that range and seeing the outcome.
    -You can test a checkout page by using the correct credit card information and using the wrong zipcode.

  66. 1) Negative testing is necessary to ensure that the application can handle invalid inputs too, and to avoid system crashing.
    2) One scenario is where zip code( USA) is not entered as 5 digit or is an alphabetic entry. Negative testing is done here to ensure that an error message is displayed in such cases, and that the system does not crash.

  67. 1. Negative Testing is necessary because it ensures that the software can handle the improper behavior of the system due to invalid inputs. This is important to avoid the possibility of software crashes and verify stability of the software.
    2. Possible scenarios where negative testing is done: -invalid/blank login, invalid/blank zip code, invalid/blank phone number, invalid/blank bank account number.

  68. 1. Negative testing is to ensure that system or application can handle invalid data to avoid system from crashing.
    2. Scenario: In 5 digit zip code field, input data should be only 5 digit numbers. If user enter less than number of alphabet the error message should be display.

  69. 1.The purpose of the negative testing is to detect such situations and verify it, to avoid the system from crashing. The testing ensures that the software can handle the improper behaviour of the system.

    2.scenario entering numeric data instead of alphabetical

  70. The purpose of negative testing is to detect such situations and verify it, to avoid the system from crashing.
    Eg: In the zip code box if the input value is 5 numbers, the user will enter more numbers than required
    In the Driver’s license, if the input value has uppercase letters and when the user enters lowercase letters,in this scenario negative testing is required.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share this article
Subscribe
By pressing the Subscribe button, you confirm that you have read our Privacy Policy.
Need a Free Demo Class?
Join H2K Infosys IT Online Training
Enroll Free demo class