STE Maanual Answers

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

DEPARTMENT OF COMPUTER

ENGINEERING

Subject: Software Testing (STE) Subject Code: 22518


Semester: 5 Course: CO51-A
Laboratory No: Name of Subject Teacher: Supriya Angne
Name of Student: Anurag Dubey Roll Id: 19203A0013

Experiment No: 04
Title of Experiment Test various functionality of railway reservation system.

Test Test Case Actual Input Expected Actual Output Status


Case Name Output
ID
TC_01 Username " Username = It should accept It accepted the Pass
tanmay6626 " the data data
TC_02 Password " Password It should accept It accepted the Pass
=Tanmay6626 " the data data
TC_03 Confirm " Confirm Password = It should accept It accepted the Pass
Password Tanmay6626 " the data data
TC_04 First Name " First Name = TanmayIt should accept It accepted the Pass
" the data data
TC_05 Middle " Middle Name It should accept It accepted the Pass
Name =Rajesh " the data data
TC_06 Last Name " Last Name = Thakur It should accept It accepted the Pass
" the data data
TC_07 Date of " Date of Birth = It should accept It accepted the Pass
Birth 11/12/2000 " the data data
TC_08 Gender Click on Male It should accept It accepted the Pass
the data data
TC_09 Mobile " Mobile Number = It should accept It accepted the Pass
Number 9821006626 " the data data
TC_10 Email ID " Email ID = It should accept It accepted the Pass
tanmayt124@gmail.co the data data
m"
TC_11 Next Button Click on Next Button It should go to It is going to Pass
and fill all details next page of next page of
Registration and Registration and
Send OTP on sends OTP on
Mail ID and Mail ID and
Phone Number Phone Number

TC_12 Username " Username = It should accept It accepted the Pass

Page | 1
tanmay6626 " the data data
TC_13 Password " Password It should accept It accepted the Pass
=Tanmay6626 " the data data
TC_14 Login Click on Login Button It should go to It is going to Pass
Button next page and next page and
ask for OTP asking for OTP
TC_15 Mobile OTP " Mobile OTP = It should accept It accepted the Pass
269591" the data data
TC_16 Email OTP " Email OTP = 956438 It should accept It accepted the Pass
" the data data
TC_17 Verify User Click on Verify User It should It is prompting Pass
prompt Congratulation’s
Congratulation’s dialog box
dialog box and logged in
log in
TC_18 Plan my Click on Plan my It should go to It is going to Pass
Journey Journey next page next page
TC_19 From Click on From Button It should go to It is going to Pass
Button next page and next page and
show Search Showing search
Station station

TC_20 Search " Search Station = It should accept It accepted the Pass
Station Mumbai Central the data and go data and going
(MMCT) " to (Search to (Search
Station) section Station) section
TC_21 Search " Search Station = It should accept It accepted the Pass
Station Delhi (DLI) " the data and go data and going
to Plan my to Plan my
Journey page Journey page
TC_22 Date Click on First date It should show a It is showing the Pass
section and click on calendar calendar
select Date
TC_23 Date Click on second date It should show a It is showing the Pass
section and click on calendar calendar
select date
TC_24 Search Train Click on Search Train It should go to It is going to Pass
Button Button next page and next page and
show all showing all
available train available train
TC_25 Train Select any available It should It is showing Pass
selection train and select availability of availability of
Sleeper coach seats and book seats and book
now option now option
TC_26 Class Select any suitable It should go to It is going to Pass
selection class and Click Book next page and next page and
now get confirmation getting
Page | 2
DEPARTMENT OF COMPUTER
ENGINEERING

Subject: Software Testing Subject Code: 22518


Semester: 5 Course: CO5I-A
Laboratory No: Name of Subject Teacher: Supriya Angne
Name of Student: Anurag Dubey Roll Id: 19203A0013

Experiment No: 05
Title of Experiment Validate login procedure for E-Commerce application

Test Test Case Actual Input Expected Output Acutal Output Statu
Case Name s
TC_01 Mobile Mobile Number Invalid Mobile Invalid Mobile Pass
Number = "abcd" Number Number
Registration
TC_02 Mobile Mobile Number Invalid Mobile Invalid Mobile Pass
Number = "123" Number Number
Registration
TC_03 Mobile Mobile Number Invalid Mobile Invalid Mobile Pass
Number = "' .';''/ " Number Number
Registration
TC_04 Mobile Mobile Number Invalid Mobile Invalid Mobile Pass
Number = "9372973" Number Number
Registration
TC_05 Mobile Mobile Number Valid Mobile Valid Mobile Pass
Number = Number Number
Registration "9372973077"

TC_05 OTP 1 Invalid OTP Invalid OTP Pass


Verification
TC_06 OTP 123 Invalid OTP Invalid OTP Pass
Verification
TC_07 OTP '.';''/ Invalid OTP Invalid OTP Pass
Verification
TC_08 OTP 123456789 Invalid OTP Invalid OTP Pass
Verification
TC_09 OTP abcd Invalid OTP Invalid OTP Pass
Verification
TC_10 OTP 3720 Valid OTP Valid OTP Pass
Verification

TC_10 Search Bar Search Bar = Could not find any Could not find any Pass
"12345678" matches matches
TC_11 Search Bar Search Bar = Could not find any Could not find any Pass
"@,./;'[]" matches matches
TC_12 Search Bar Search Bar = Should not search Does not search Pass
"Blank Space" anything anything
TC_13 Search Bar Search Bar = Display all the Displays all the items Pass
"a" items containing containing letter 'a'
letter 'a'
TC_14 Search Bar Search Bar = Display all the Display all the shirts Pass
"Shirt" shirts

TC_14 Filter Filter = "Men" Display all the men Displays all the men Pass
relaed items relaed items
TC_15 Filter Filter = Display all the Displays all the Pass
"Categories = Tshirts Tshirts
Tshirts"
TC_16 Filter Filter = Display no output Displays no output Pass
"Categories =
126354"
TC_17 Filter Filter = Display no output Displays no output Pass
"Categories =
';.[@"
Exercise:

1. Prepare the test case to test your college website for any 5 links.
2. Execute the above test case created in question 1 by performing appropriate
operations and verify result.

Test Test Case Actual Input Expected Output Acutal Output Status
Case Name
TC_01 Home > Click on It should redirect to It redirects to Pass
Academics Computer Computer Compute r
Engineering Engineering page Engineering page Pas
TC_02 Home > Click on First It should redirect to It redirects to First Pass
Computer Year Syllabus First Year Syllabus Year Syllabus page
Engineering page
> First Year
Syllabus
TC_03 Home > Click on Second It should redirect to It redirects to Pass
Computer Year Syllabus Second Year Second Year Syllabus
Engineering Syllabus page page
> Second
Year
Syllabus
TC_04 Home > Click on Third It should redirect to It should redirect to Pass
Computer Year Syllabus Third Year Syllabus Third Year Syllabus
Engineering page page
> Third Year
Syllabus
TC_05 Home > Click on It should redirect to It redirects to Pass
Academics Electrical Electrical Electrical
Engineering Engineering page Engineering page
TC_06 Home > Click on First It should redirect to It redirects to First Pass
Electrical Year Syllabus First Year Syllabus Year Syllabus page
Engineering page
> First Year
Syllabus
TC_07 Home > Click on Second It should redirect to It redirects to Pass
Electrical Year Syllabus Second Year Second Year Syllabus
Engineering Syllabus page page
> Second
Year
Syllabus
TC_07 Home > Click on Third It should redirect to It should redirect to Pass
Electrical Year Syllabus Third Year Syllabus Third Year Syllabus
Engineering page page
> Third Year
Syllabus
TC_08 Home > Click on It should redirect to It redirects to Pass
Academics Information Information Information
Technology Technology page Technology page
TC_09 Home > Click on First It should redirect to It redirects to First Pass
Information Year Syllabus First Year Syllabus Year Syllabus page
Technology page
> First Year
Syllabus
TC_10 Home > Click on Second It should redirect to It redirects to Pass
Information Year Syllabus Second Year Second Year Syllabus
Technology Syllabus page page
> Second
Year
Syllabus
TC_11 Home > Click on Third It should redirect to It should redirect to Pass
Information Year Syllabus Third Year Syllabus Third Year Syllabus
Technology page page
> Third Year
Syllabus
TC_12 Home > Click on It should redirect to It redirects to Pass
Student Life Student Life Student Life page Student Life page
TC_13 Home > Click on It should redirect to It redirects to Pass
Placement Placement Placement page Placement Page
page
TC_14 Home > Click on Online It should redirect to It redirects to Online Pass
Online Payment Online Payment Payment Page
Payment page
page
TC_15 Home > Click on Latest It should redirect to It redirects to Latest Pass
Latest Updates Latest Updates Updates Page
Updates page
page
TC_16 Home Click on Project It should redirect to It redirects to Project Pass
>Project Outline Project Outline Outline Page
Outline page page
TC_17 Home > Click on Who It should redirect to It redirects to Who Pass
Who are we are we Who are we page are we Page
page
TC_18 Home > Click on Alumni It should redirect to It redirects to Alumni Pass
Alumni page Alumni page Page
TC_19 Home > Click on It should redirect to It redirects to Pass
Contact Us Contact Us Contact Us page Contact Us Page
page
TC_20 Home > Click on Notice It should redirect to It redirects to Notice Pass
Notice Board Notice Board page Board Page
Board page

3. Prepare test case for any website which sends OTP on your email address/
mobile number.
Test case for any GitHub Sign up

Test Test Case Actual Input Expected Output Acutal Output Statu
Case Name s
TC_0 Email anuragDubey Should not allow Does not Pass
1 Email allow Email
TC_0 Email 451224 Should not allow Does not Pass
2 Email allow Email
TC_0 Email Anuragd393.3@gmail.co Should allow Email Does allow Pass
3 m Email
TC_0 Usernam anruag Display ‘Not Displays ‘Not Pass
4 e available’ available’
TC_0 Usernam 1224 Display ‘Username Displays Pass
5 e should include ‘Username
alphabets, should
numbers’ include
alphabets,
numbers’
TC_0 Usernam anruag=3933 Should allow Does allow Pass
6 e username username
TC_0 Password 1234 Display ‘Enter Displays Pass
7 strong password’ ‘Enter strong
password’
TC_0 Password password@123 Should allow Does allow Pass
7 password password
TC_0 Continue Click on Continue Should accept all Does accept Pass
8 the data and all the data
redirect to email and redirect
verification page to email
verification
page
TC_0 OTP 0000 Display ‘Invalid Displays Pass
9 OTP’ ‘Invalid OTP’
TC_1 OTP 5461 Should redirect to Does redirect Pass
0 home page of to home page
github of github
3. Can we test the relational operator? Validate your answer with
justification.
Answer: Yes, we can test the relational operators.
Example:
Code:

import java.util.Scanner;

public class Test {


public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

System.out.print("Enter first number: ");


int a = sc.nextInt();

System.out.print("Enter second number: ");


int b = sc.nextInt();

if (a > b) {
System.out.println(a + " is greater than " + b);
} else {
System.out.println(b + " is greater than " + a);
}

sc.close();
}

Test case:

Test Test Case Actual Input Expected Output Actual Output Status
Case Name
TC_01 Greater a = 10 20 is greater than 20 is greater than Pass
than b = 20 10 10
TC_02 Greater a = 30 30 is greater than 30 is greater than Pass
than b = 20 20 20
Exercise:

1. Generate the test case to check the program written for Even and Odd
numbers.

Code:

import java.util.Scanner;

public class Test {


public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

System.out.print("Enter a number: ");


double a = sc.nextDouble();

if (a % 2 == 0) {
System.out.println(a + " is an Even Number");
} else {
System.out.println(a + " is an Odd Number ");
}

sc.close();
}

Test case:

Test Test Case Actual Input Expected Output Actual Output Status
Case Name
TC_01 Even or Odd Enter a 12 is an Even 12 is an Even Pass
number:12 Number Number
TC_02 Even or Odd Enter a 13 is an Odd 13 is an Odd Pass
number: 13 Number Number
2. Execute above test case in Question 1 by entering following inputs and
verify results.
Input – 4, 7, 2.5, 8.1

Test case:

Test Test Case Actual Input Expected Output Actual Output Status
Case Name
TC_01 Even or Odd Enter a 4 is an Even 4 is an Even Pass
number:4 Number Number
TC_02 Even or Odd Enter a 7 is an Odd 7 is an Odd Pass
number: 7 Number Number
TC_03 Even or Odd Enter a 2.5 is an Odd 2.5 is an Odd Pass
number: 2.5 Number Number
TC_04 Even or Odd Enter a 8 is an Even 8 is an Even Pass
number: 8 Number Number
TC_05 Even or Odd Enter a 1 is an Odd 1 is an Odd Pass
number: 1 Number Number

3. Generate the test case to check the program written for printing the day of
week.
Code:
import java.util.Scanner;

public class Test {


public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

System.out.print("Enter a number: ");


int weekday = sc.nextInt();

switch (weekday) {
case 1:
System.out.println("Monday");
break;
case 2:
System.out.println("Tuesday");
break;
case 3:
System.out.println("Wednesday");
break;
case 4:
System.out.println("Thursday");
break;
case 5:
System.out.println("Friday");
break;
case 6:
System.out.println("Saturday");
break;
case 7:
System.out.println("Sunday");
break;
default:
System.out.println("Please enter weekday number between 1-
7.");
}

sc.close();
}

}
Test case:

Test Test Case Actual Input Expected Output Actual Output Status
Case Name
TC_01 Day of Enter a Monday Monday Pass
week number: 1
TC_02 Day of Enter a Tuesday Tuesday Pass
week number: 2
TC_03 Day of Enter a Wednesday Wednesday Pass
week number: 3
TC_04 Day of Enter a Thursday Thursday Pass
week number: 4
TC_05 Day of Enter a Friday Friday Pass
week number: 5
TC_06 Day of Enter a Saturday Saturday Pass
week number: 6
TC_07 Day of Enter a Sunday Sunday Pass
week number: 7
TC_08 Day of Enter a Please enter Please enter Pass
week number: 0 weekday weekday number
number between between 1-7.
1-7.
TC_09 Day of Enter a Please enter Please enter Pass
week number: b weekday weekday number
number between between 1-7.
1-7.
TC_010 Day of Enter a Please enter Please enter Pass
week number: # weekday weekday number
number between between 1-7.
1-7.
4. Create the test cases for following algorithm and write the ‘Expected
Outcome’ and ‘Actual Outcome’ in following table by executing the code.

Code:
#include<stdio.h>
#include<conio.h>

void main() {
int length;
int count;
printf("Enter Length: ");
scanf("%d", &length);

printf("Enter Count: ");


scanf("%d", &count);

while(count <= 6) {
if (length >= 100){
length = length - 2;
} else {
length = count * length;
}
count = count + 1;
}

printf("Lenght = %d", length);


}

Test case:
Test Count Length Expected Output Actual Output
Case
1 5 101 594 594
2 5 99 493 493
3 7 99 99 99
4 0 0 0 0

You might also like