请输入您要查询的百科知识:

 

词条 Negative testing
释义

  1. Purpose

  2. Benefits of negative testing

  3. Parameters for writing Negative test cases

  4. References

{{Multiple issues|{{Underlinked|date=January 2017}}{{Orphan|date=January 2017}}{{essay|date=January 2017}}{{context|date=February 2018}}{{unreferenced|date=February 2018}}}}

Negative testing is a method of testing an application or system that ensures that the plot of the application is according to the requirements and can handle the unwanted input and user behavior. Invalid data is inserted to compare the output against the given input. Negative testing is also known as failure testing or error path testing. When performing negative testing exceptions are expected. This shows that the application is able to handle improper user behavior. Users input values that do not work in the system to test its ability to handle incorrect values or system failure.

Purpose

  • 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.
  • Negative testing helps you to improve the testing coverage of the application.
  • Negative testing makes the application more stable and reliable.
  • Negative testing together with positive testing allows users to test the application with any valid or invalid) input data.

Benefits of negative testing

Negative testing is done to check that product deals properly with the circumstance for which it is not programmed. 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. Both positive and negative testing play important role. Positive testing ensures that application does what it is implied for and perform each function as expected. Negative testing is opposite of positive testing. Negative testing discovers diverse approaches to make the application crash and handle the crash effortlessly.

Example
  • If there is a text box that can only take numeric values but the user tries to type a letter, the correct behavior would be to display a message such as "(Incorrect data) Please enter a number."
  • If user is to fill the name field, there are ground rules that name text is mandatory to fill, name box shouldn't have values other than letters (no numeric values and special characters). Negative test cases could be a name containing numeric values or special characters. The correct behavior of the system would be to not display those invalid characters.

Parameters for writing Negative test cases

There are two basic techniques that help to write the sufficient test cases to cover the most of the functionalities of the system. Both these techniques are used in positive testing as well.

The two parameters are:

* Boundary-value analysis

Boundary indicates limit to something. In this parameter, test scenarios are designed in such a way that it covers the boundary values and validate how application behaves on these boundary values.

Example

If there is an application that accepts Ids ranging from 0–255. Hence in this scenario, 0,255 will form the boundary values. The values within the range of 0–255 will constitute the positive testing. Any inputs going below from 0 and input going above from 255 will be considered invalid and will constitute negative testing.

References

2 : Data analysis|Software testing

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/20 12:24:48