Blog

OTP Test Cases Part 2

OTP Test Cases

Table of Contents

ABOUT OTP

A one-time password (OTP) is an automatically generated numeric or alphanumeric string of characters that authenticates a user for a single transaction or login session.

An OTP is more secure than a static password, especially a user-created password, which can be weak and reused across multiple accounts.

OTPs might replace traditional authentication login information or may be used in addition to it to add another layer of security.

OTP-COMMON TEST CASES

TC ID

FEATURE

TEST CASES/STEPS

EXP RESULT

TC_OTP_17

OTP

Objective: To validate if the OTP generated can be used for any future transaction

Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned ON on the test device

Test Steps:
1. Login to the application
2. Enter the required details
3. Click on generate OTP button
4. Complete the transaction using the OTP
5. Inititate 1 more transaction, enter relevant details
6. Request for the OTP
7. Enter the Older OTP in the field
8. Click/tap on the Submit button to complete the transaction

Error has to be displayed and the transaction has not to be completed

TC_OTP_18

OTP

Objectives: To validate if One Time Password is generated when the user clicks/taps on the Generate OTP button in the application
 
Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned ON on the test device
 
Test Steps:
1. Login to the application 
2. Enter the required details in the application
3. Click/Tap on Generate OTP button

The OTP has to be received on the device/email/token which is registered with the application

TC_OTP_19

OTP

Objective: To validate if the OTP is received on the device when the service provider network is available
 
Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned ON on the test device
3. The user’s registered device has to be in the network coverage of the service provider like BSNL, Airtel, Vodafone
 
Test Steps:
1. Login to the application
2. Enter the required details
3. Click/Tap on Generate OTP button

The OTP has to be received to the user on the device which is registered with the application

TC_OTP_20

OTP

Objective: To validate if the user is able to complete transaction after entering the OTP
 
Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned ON on the test device

Test Steps:
1. Login to the application 
2. Enter the required details
3. Click/Tap on Generate OTP button to proceed with the transaction
4. Enter the OTP received on the device/email/token
5. Click/Tap on Submit button

1. OTP has to be received to the registered device/email/token

2. The submit button has to be enabled once OTP is entered and has to be Clickable/Tappable

3. The application has to process the transaction when the user Click/Taps on the submit button after entering OTP

TC_OTP_21

OTP

Objective: To Validate if the OTP is received on the device when the service provider network is not available
 
Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned OFF on the test device
3. The user’s registered device has not to be available in the network coverage of the service provider like BSNL, Airtel, Vodafone
 
Test Steps:
1. Login to the application
2. Enter the required details
3. Click/Tap on Generate OTP button

The OTP has not to received to the device as the network coverage is not available

TC_OTP_22

OTP

Objective: To validate if the user is able to receive OTP in sms when the phone battery is low
 
Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned ON on the test device
3. Device battery has to be low
 
Test Steps:
1. Login to the application
2. Enter the required details
3. Click/Tap on Generate OTP button

The OTP details has to be received on device via SMS

TC_OTP_23

OTP

Objective: To Validate if the Resend OTP button is displayed or not when the OTP is received on the device
 
Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned ON on the test device

Test Steps:
1. Login to the application
2. Enter the required details
3. Click/Tap on Generate OTP button
4. Observe the screen

1. The OTP has to be received on the registered device

2. After Clicking/Tapping on Generate OTP button, the screen has to display Resend OTP button

TC_OTP_24

OTP

Objective: To validate if the application accepts the incorrect OTP
 
 Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned ON on the test device

Test Steps:
1. Login to the application
2. Enter the required details
3. Click/Tap on Generate OTP button
4. Enter the wrong OTP that does not match the one that is received in the device

1. The application has not to accept incorrect OTP

2. The error message has to be displayed

TC_OTP_25

OTP

Objective: To validate if the OTP generation is in sequence to the previously generated OTP
 
Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned ON on the test device

Test Steps:
1. Login to the application
2. Enter the required details
3. Click/Tap on Generate OTP button
4. Click/Tap on the Resend OTP button

1. 2 messages has to be received to the registered device with 2 different OTPs [Varies based on bissuness requirement]

2. The OTPs received, has not to follow any sequence

TC_OTP_26

OTP

Objective: To validate if the duplicate OTP is generated
 
 Pre Req:
1. The user is a registered user in the application
2. The user has to already have requested OTP multiple times in different sessions
3. WiFi/4G/3G/2G is turned ON on the test device

Test Steps:
1. Login to the application
2. Enter the required details
3. Click/Tap on Generate OTP button
4. Compare the OTP received with the previously received OTPs

The OTP newly received has to be completely different from the previously received OTPs

TC_OTP_27

OTP

Objective: To validate if the “Resend OTP” button is available
 
Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned ON on the test device

Test Steps:
1. Login to the application
2. Enter the required details
3. Click/Tap on Generate OTP button
4. Observe if there is any “Resend OTP” button

“Resend OTP” button has to be available

TC_OTP_28

OTP

Objective: To validate if the Resend OTP button is clickable/tappable
 
Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned ON on the test device

Test Steps:
1. Login to the application
2. Enter the required details
3. Click/Tap on Generate OTP button
4. Click/Tap on the Resend OTP button

The Resend OTP button has to be clickable/tappable

TC_OTP_29

OTP

Objective: To validate if the new OTP is received to mobile device when the User clicks/taps on Resend OTP button
 
Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned ON on the test device

Test Steps:
1. Login to the application
2. Enter the required details
3. Click/Tap on Generate OTP button
4. Click/Tap on the Resend OTP button

On clicking/tapping Resend OTP button, the message has to be received on the registered device/email/token

TC_OTP_30

OTP

Objective: To validate if the OTP is received on the new number if the user changes the registered number
 
Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned ON on the test device
3. Registered number/Email changed/updated by the user
 
Test Steps:
1. Login to the application
2. Change the registered number/email id
3. Enter the required details
4. Click/Tap on Generate OTP button

The OTP has to be received on the latest registered number/mail id

TC_OTP_31

OTP

Objective: To validate if the user is able to complete transaction without entering the OTP in the field
 
Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned ON on the test device

Test Steps:
1. Login to the application
2. Enter the required details
3. Do Not enter anything in the High Security Password/OTP field
4. Click/Tap on Submit button

The validation message has to be displayed that password /OTP is missing when Click/Tap on Generate OTP button

 (OR)

The submit button has not to be activated

TC_OTP_32

OTP

Objective: To validate if the OTP generated is enough lengthy as per the requirements
 
Pre Req:
1. The user is a registered user in the application
2. WiFi/4G/3G/2G is turned ON on the test device

Test Steps:
1. Login to the application
2. Enter the required details
3. Click/Tap on Generate OTP button

The OTP generated has to be made of the minimum length as per the requirements (6 or 8 characters- minimum length generally)