QA Tutorials

NEGATIVE TESTING

SOFTWARE TESTING

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?
Facebook Comments
Tags

Related Articles

48 thoughts on “NEGATIVE TESTING”

  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. 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.

  14. 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.

  15. 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.

  16. 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.

  17. 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.

  18. 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.

  19. 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,

  20. 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.

  21. 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

  22. • 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.

  23. 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.

  24. 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

  25. 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.

  26. 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

  27. 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.

  28. 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.

  29. 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

  30. 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.

  31. 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

  32. 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.

  33. 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.

  34. 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..

  35. 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.

  36. 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

  37. 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.

  38. 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.

  39. 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.

  40. 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.

  41. 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.

  42. 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.

  43. Pingback: URL

Leave a Reply

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

Check Also

Close
Close