Blog

OTP Test Cases Part 1

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_01

OTP

Objective: To validate receving of an OTP to the registered device/email/token

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 relevant details
3. Click/Tap on ‘Generate OTP’ button

OTP has to be send back to the registered device/email/token

TC_OTP_02

OTP

Objective: To validate the OTP textbox

Pre-req:
1. Latest version of the app is downloaded & installed on the device
2. WiFi/4G/3G/2G is turned ON on the test device

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

1. Observe that user has to be navigated to a Screen/Page where user can enter the OTP

2. Entered OTP has to encripted [Based on the requirement]

TC_OTP_03

OTP

Objective: To validate the 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 relevant details
3. Click/Tap on ‘Generate OTP’ button
4. Observe the OTP received to the registered device/email/token
5. Observe that user gets navigated to a new screen/page to enter OTP
6. Enter received OTP

A valid conformation message has to be displayed to the user

TC_OTP_04

OTP

Objective: To validate if the OTP generated consists of UPPERCASE Alphabets only

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 relevant details
3. Click/Tap on generate OTP button
4. Observe the OTP received to the registered device/email/token

The OTP received to the registered device/email/token has to be only in upper case alphabets

TC_OTP_05

OTP

Objective: To validate if the OTP generated consists of mix of UPPERCASE and LOWERCASE Alphabets 

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 relevant details
3. Click/Tap on generate OTP button
4. Observe the OTP received to the registered device/email/token

1. The OTP received to the registered device/email/token has to be only upper case & lowe case alphabets

2. No numeric value has to be shown

TC_OTP_06

OTP

Objective: To validate if the OTP generated consists of LOWER CASE Alphabets only

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 relevant details
3. Click/Tap on generate OTP button
4. Observe the OTP received to the registered device/email/token

The OTP received to the registered device/email/token has to be only in lower case alphabets

TC_OTP_07

OTP

Objective: To validate if the OTP generated consists of any type of characters

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 relevant details
3. Click/Tap on generate OTP button
4. Observe the OTP received to the registered device/email/token

The OTP can be mix of any type of characters like
UPPERCASE alphabets, LOWER CASE Alphabets & Numbers

TC_OTP_08

OTP

Objective: To validate if the OTP generated consists of Camel case only

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 relevant details
3. Click/Tap on generate OTP button
4. Observe the OTP received to the registered device/email/token

The generated OTP has to be in camel case format

TC_OTP_09

OTP

Objective: To validate if the OTP generated consists of Numbers only

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 relevant details
3. Click/Tap on generate OTP button
4. Observe the OTP received to the registered device/email/token

The generated OTP has to contain only numbers

TC_OTP_10

OTP

Objective: To validate if the OTP generated consist of special characters

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 OTP that is received to the registered device/email/token

The generated OTP has to show the special characters

TC_OTP_11

OTP

Objective: To validate the generated OTP only in Uppercase Alphabets

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 relevant details
3. Click/Tap on ‘Generate OTP’ button
4. Observe the OTP received to the registered device/email/token
5. Observe that user gets navigated to a new screen/page to enter OTP
6. Enter received OTP

1. The entered OTP has to be accepted

2. The transaction has to be successfull

TC_OTP_12

OTP

Objective: To validate the generated OTP only in LOWER CASE Alphabets

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 relevant details
3. Click/Tap on ‘Generate OTP’ button
4. Observe the OTP received to the registered device/email/token
5. Observe that user gets navigated to a new screen/page to enter OTP
6. Enter received OTP

1. The entered OTP has to be accepted

2. The transaction has to be successfull

TC_OTP_13

OTP

Objective: To validate the application behavior when user enters UPPERCASE alphabets instead of LOWER CASE Alphabets in the OTP text 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. Click/Tap on generate OTP button
4. Enter UPPERCASE alphabets instead of LOWER CASE Alphabets in the OTP text box
5. Click on Submit button

Error message has to be displayed to enter correct details

TC_OTP_14

OTP

Objective: To validate the application behavior when user entersLOWER CASE Alphabets instead UPPERCASE alphabets in the OTP text 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. Click/Tap on generate OTP button
4. Enter LOWER CASE Alphabets instead UPPERCASE alphabets in the OTP received
5. Click on Submit button

Error message has to be displayed to enter correct details

TC_OTP_15

OTP

Objective: To validate if the user is able to complete transaction using the OTP in the specified Time Frame (Session expiry)

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. Do not work with the application for the time span of 15 mins (session expiry of the application is based on the requirement)
5. Enter the OTP received and click on the submit button

1. The OTP that is received on the device/email/token has not to be allowed for proceeding with the completion of the transaction

2. The user has to login application and request the OTP again

TC_OTP_16

OTP

Objective: To validate if the older OTP is expired when the user clicks 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 on generate OTP button
4. After receive of the OTP in the device/token/email, click on Resend OTP button
5. Enter the older OTP received and click on the submit button to proceed with the transaction

The error message has to be displayed that entered details are wrong