Test Cases for Aadhar Number field - UIDAI

.
 Sample Test Cases for Aadhar Card Field

Hello Folks, 

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


What Are The Test Cases For Aadhar Number?
Here, Important test cases for the Aadhar card number field are given...

  • Verify the Aadhar number field by entering the valid 12-digit number.
  • Eg.2332-2232-2233
  • Verify the field by entering a less than 12-digit Aadhar number.
  • Eg. 5464-7484-445
  • Verify the field by entering a greater than 12-digit Aadhar number.
  • Eg.3344-4443-3333-3
  • Verify that when the user enters the aadhar number which starts with o and 1 (The system should not allow the user to enter 0 and 1 as the first number 
  • Eg.1234-3455-3344
  • Eg.0323-44432-3345
  • Verify the field by entering the alphabet. (the system should not allow users to enter the alphabet).
  • Eg.2537-234-gfhr-3233
  • Verify the field By entering the special char (the system should not allow users to enter special char ).
  • Eg.4675-3444-@#@@-8573
  • Verify whether the alert message showing or not when the user enters the invalid Aadhar number.
  • Verify whether the alert message is per requirement or not.
  • Verify the field by entering the space only.
  • Verify that the field should not accept the space as a value.
  • Verify the field by entering all 12 numbers as zero.
  • Eg. 0000-0000-0000-0000

Hope !!! The above test cases for Aadhar card number field are helpful for you ...

Team, 
QA acharya

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

Test cases for Aadhar Number 



How To Update Address Date of Birth, Gender, and Name in Aadhar Card Online?

Aadhaar Update :
  • Address
  • Date of birth (DOB)
  • Gender
  • Name
How to Update the Address on Aadhaar Card Online?

Here! Steps to update the address on Aadhar card are given...

Step 1: Go to Aadhar's official

 website: https://uidai.gov.in/

Steps 2:Hover the mouse on my aadhar dropdown on the menubar in the top left corner of Aadhar website. (as shown in fig.) 
How to update the aadhaar adress online


Step 3: Now select the ‘Update Demographics Data Online from the submenu showing under the update Aadhaar section.

aadhar card address change online


Step 4Then click on the login button.



Step 5: Now Enter your Aadhaar number in "Enter Aadhaar" Text Box also Enter the Captcha in the field.
and click on send OTP button.



Step 6: As soon as you click on Send OTP Button an OTP will be received on your registered mobile. Enter the OTP in the "Enter OTP " Text box 
Click on the Login Button.

how to change dob in aadhar card



Steps 7: Now Click on the Update Aadhar Online Option (as shown in Fig)

Aadhaar Update: How to Change Aadhaar Name 



Steps 8: Now Select the Option that you want to update (Name, Date of Birth gender, Address ) and click on proceed to update Aadhaar button.

Aadhaar Update: How to Change Aadhaar Name, Date of birth , gender , Address  online



Step 9: Now Enter the new address that you want and also upload scanned color copies of verification documents, such as (in this case) proof of address.
and Click on the Next button.


 Step 10: Now Preview your address Changes and proceed with the payment.

Hope !!! By following the above steps you are able to update your addhaar address, Name, Date of Birth, and Gender online.


Regular Expression to Validate Aadhar Number

How to check Aadhaar number is valid or not using Regular Expression- C++

// C++ program to validate the
// Aadhaar number using Regular Expression
#include <iostream>
#include <regex>
using namespace std;

// Function to validate the Aadhaar number.
bool isValidAadhaarNumber(string str)
{

// Regex to check valid Aadhaar number.
const regex pattern("^[2-9]{1}[0-9]{3}\\s[0-9]{4}\\s[0-9]{4}$");

// If the Aadhaar number
// is empty return false
if (str.empty())
{
return false;
}

// Return true if the Aadhaar number
// matched the ReGex
if(regex_match(str, pattern))
{
return true;
}
else
{
return false;
}
}

// Driver Code
int main()
{
// Test Case 1:
string str1 = "3675 9834 6015";
cout << isValidAadhaarNumber(str1) << endl;

// Test Case 2:
string str2 = "4675 9834 6012 8";
cout << isValidAadhaarNumber(str2) << endl;

// Test Case 3:
string str3 = "0175 9834 6012";
cout << isValidAadhaarNumber(str3) << endl;

// Test Case 4:
string str4 = "3675 98AF 60#2";
cout << isValidAadhaarNumber(str4) << endl;

// Test Case 5:
string str5 = "417598346012";
cout << isValidAadhaarNumber(str5) << endl;
return 0;
}



How to check Aadhaar number is valid or not using Regular Expression- JAVA

// Java program to check valid
// Aadhaar number using regex.

import java.util.regex.*;
class GFG {

// Function to validate Aadhaar number.
public static boolean
isValidAadhaarNumber(String str)
{
// Regex to check valid Aadhaar number.
String regex
= "^[2-9]{1}[0-9]{3}\\s[0-9]{4}\\s[0-9]{4}$";

// Compile the ReGex
Pattern p = Pattern.compile(regex);

// If the string is empty
// return false
if (str == null) {
return false;
}

// Pattern class contains matcher() method
// to find matching between given string
// and regular expression.
Matcher m = p.matcher(str);

// Return if the string
// matched the ReGex
return m.matches();
}

// Driver Code.
public static void main(String args[])
{

// Test Case 1:
String str1 = "3675 9834 6015";
System.out.println(isValidAadhaarNumber(str1));

// Test Case 2:
String str2 = "4675 9834 6012 8";
System.out.println(isValidAadhaarNumber(str2));

// Test Case 3:
String str3 = "0175 9834 6012";
System.out.println(isValidAadhaarNumber(str3));

// Test Case 4:
String str4 = "3675 98AF 60#2";
System.out.println(isValidAadhaarNumber(str4));

// Test Case 5:
String str5 = "417598346012";
System.out.println(isValidAadhaarNumber(str5));
}
}

How to check Aadhaar number is valid or not using Regular Expression- Python
  
# Python3 program to validate
# Aadhaar number using regex.
import re

# Function to validate Aadhaar
# number.
def isValidAadhaarNumber(str):

# Regex to check valid
# Aadhaar number.
regex = ("^[2-9]{1}[0-9]{3}\\" +
"s[0-9]{4}\\s[0-9]{4}$")
# Compile the ReGex
p = re.compile(regex)

# If the string is empty
# return false
if (str == None):
return False

# Return if the string
# matched the ReGex
if(re.search(p, str)):
return True
else:
return False

# Driver code

# Test Case 1:
str1 = "3675 9834 6015"
print(isValidAadhaarNumber(str1))

# Test Case 2:
str2 = "4675 9834 6012 8"
print(isValidAadhaarNumber(str2))

# Test Case 3:
str3 = "0175 9834 6012"
print(isValidAadhaarNumber(str3))

# Test Case 4:
str4 = "3675 98AF 60#2"
print(isValidAadhaarNumber(str4))

# Test Case 5:
str5 = "417598346012"
print(isValidAadhaarNumber(str5))

Post a Comment

0 Comments