{"id":1534,"date":"2018-09-03T18:06:00","date_gmt":"2018-09-03T18:06:00","guid":{"rendered":"https:\/\/www.h2kinfosys.com\/blog\/?p=1534"},"modified":"2025-03-07T08:59:03","modified_gmt":"2025-03-07T13:59:03","slug":"negative-testing","status":"publish","type":"post","link":"https:\/\/www.h2kinfosys.com\/blog\/negative-testing\/","title":{"rendered":"NEGATIVE TESTING"},"content":{"rendered":"<p><b> <\/b><a href=\"https:\/\/www.h2kinfosys.com\/blog\/basics-software-testing\/\">Software testing<\/a> involves the thorough validation of the software to identify as many defects as possible and verify the compliance of the software with client requirements.<b> <\/b>A detailed testing with with data set values and different steps is involved.<b>\u00a0 <\/b>We have two testing strategies. They are <b>positive testing <\/b>and<b> negative testing.\u00a0<\/b><\/p>\n<h2><b>Positive testing:<\/b><\/h2>\n<p><b> <\/b>Positive testing<b> <\/b>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.<\/p>\n<h2><b>Negative testing:\u00a0<\/b><\/h2>\n<p>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 \u2018please enter the correct data should be displayed\u2019. 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 <a href=\"https:\/\/www.h2kinfosys.com\/blog\/100-software-testing-types\/\">testing<\/a>.<\/p>\n<h3><b>Examples:\u00a0<\/b><\/h3>\n<ol>\n<li>In the text field of Phone Number, the user may enter the phone number as alphabets or exceed the limit of the numeric values.<\/li>\n<li>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.<\/li>\n<\/ol>\n<h2>Check your understanding:<\/h2>\n<ol>\n<li>Why negative testing is necessary?<\/li>\n<li>What are the possible scenarios in which negative testing is\u00a0 done?<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>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.\u00a0 We have two testing strategies. They are positive testing and negative testing.\u00a0 Positive testing: Positive testing [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":7788,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[229,295],"class_list":["post-1534","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-qa-tutorials","tag-negative-testing","tag-positive-testing"],"_links":{"self":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/1534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/comments?post=1534"}],"version-history":[{"count":0,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/1534\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/media\/7788"}],"wp:attachment":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/media?parent=1534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/categories?post=1534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/tags?post=1534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}