Italian Trulli

Test Cases For Decimal Field

Test Tribe
.
Sample Test Cases for Decimal Field

Hello Folks, 

In this tutorial, we will learn how to write Decimal Field Test Cases? We will also learn about positive test scenarios and Negative test scenarios.

Decimal Field 
Requirements
  • The field will accept decimal and numeric values.
  • The field should not be blank.
Example of a Decimal value 

17.59
Here,

17  (Whole number part)
.    (Decimal Point)
59 (Decimal Part)


What Are the Test Cases For Decimal Field?

Here!!! Some of the Important Sample test cases for the decimal fields are given...

  • Verify that the user is able to click in the field or not (the field is active or not).
  • Check whether the user is able to type in the field or not.
  • Check that when the user enters the decimal value (89.0990).
  • Check the field by entering the numeric value (909).
  • Check the field by entering the alphabet value(TY).
  • Check that when the user enters a special char other than a dot(.)
  • Check that when the user pastes the alphabet value in the field and tries to save.
  • Check that when the user enters zero value in decimal format(0.00).
  • Check whether the alert message showing or not when the user enters the alphabet value in the field.
  • verify the value limit after the decimal point.
  • Check that when the user tries to add more value (more than the defined value) after the decimal point.
  • Check that when a user tries to add the negative value.


How to Validate Decimal Numbers in Javascript?
Use the below javascript code to validate the decimal number in javascript.

<html> 
   <body> 
      <script> 
         var str = "1.5"; 
         var re = /^[-+]?[0-9]+\.[0-9]+$/; 
         var found = str.match( re ); 
         document.write("decimal" ); 
      </script> 
   </body> 
</html> 

Hope!!! The above test cases for a decimal field are helpful for you...

Team,
QA acharya

Share Your Knowledge With Us -
Mail your content - qaacharya.in@gmail.com

Decimal Field Test Case

Post a Comment

0 Comments