0% found this document useful (0 votes)
24 views

ST File

Uploaded by

Aditya Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

ST File

Uploaded by

Aditya Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 92

INDEX

S. No. List of Experiments

Write programs in C-Language to demonstrate the working of the following


constructs:
i) do...while
1. ii) while
iii) if…else
iv) switch
v) for
A program written in C- language for Matrix Multiplication fails. Introspect the
2.
causes for its failure and write down the possible reasons for its failure.

A program written in C- language for Matrix Addition ´Introspect the causes for
3.
its failure and write down the possible reasons for its failure.

Take any system (e.g. ATM system) and study its system specifications and
4.
report the various bugs.

5. Write the test cases for any known application (e.g. Banking application)

6. Write the test cases for GMAIL

7. Write the test cases for FACEBOOK,TWITTER etc.

Create a test plan document for any application (e.g. Library Management
8.
System)

9. Study of any web testing tool (e.g. Selenium)

10. Test case for calculator in windows application

11. BUG TRACKING TOOL Study of bug tracking tool (e.g. Bugzilla).

12. Study of any open source-testing tool (e.g. Test Link)


EXPERIMENT-1
AIM
Write program in C Language to demonstrate the working of the following constructs:
i) do…while
ii) while
iii) if …else
iv) switch
v) for

OBJECTIVE
To understand the working of do…while with different range of values and test cases
#include <stdio.h>
void main () {
int i, n=5,j=0;
clrscr();
printf("enter a no");
scanf("%d",&i);

do {
if(i%2==0) {
printf("%d", i);
printf("is a even no.");
i++;
}
else {
printf("%d", i);
printf("is a odd no.\n");
i++;
}
j++;
} while(i>0&&j<n);
getch();
}

Input Actual output


2 2 is even
number3 is odd
number 4 is even
number5 is odd
number 6 is even
number

Test Cases
Test Case 1: Positive values within range
Input =2 Expected output Actual output Remarks
2 is even number 2 is even number
3 is odd number 3 is odd number success
4 is even number 4 is even number
5 is odd number 5 is odd number
6 is even number 6 is even number

Test Case 2: Negative values within range


Input = -2 Expected output Actual output Remarks

-2 is even number -2 is an even number

-3 is odd number fail


-4 is even number
-5 is odd number
-6 is even number

Test Case 3: Out of range values


Input Expected output Actual output Remarks
1234567891222222222222 123456789122222222213 234567891222222215 fail
To understand the working of while with different range of values and test cases
#include<stdio.h>
#include <conio.h>
void main () {
int i, n = 5, j = 1;
clrscr();
printf(“enter a no”);
scanf(“ % d”, & i);
while (i > 0 && j < n) {
if (i % 2 == 0) {
printf(“ % d”, i);
printf(“is a even number”);
i++;
j++;
}
else {
printf(“ % d”, i);
printf(“is a odd number”);
i++;
j++;
}
}
}

Input Actual output


2 2 is even number
3 is odd number
4 is even number
5 is odd number
6 is even number
Test Cases
Test Case 1: Positive values within range
Input =2 Expected output Actual output Remarks
2 is even number 2 is even number
3 is odd number 3 is odd number success
4 is even number 4 is even number
5 is odd number 5 is odd number
6 is even number 6 is even number

Test Case 2: Negative values within range


Input = -2 Expected output Actual output Remarks
-2 is even number -2 is an even number
-3 is odd number fail
-4 is even number
-5 is odd number
-6 is even number

Test Case 3: Out of range values


Input Expected output Actual output Remarks
1234567891222222222222 123456789122222222213 234567891222222215 fail

To understand the working of if else with different range of values and test cases
#include <conio.h>
void main() {
int i;
for (i = 1; i <= 5; i++) {
if (i % 2 == 0) {
printf("number is even no:%d\n", i);
i++;
}
printf("number is odd no:%d\n", i);
}
getch();
}

Input Actual output


i=1 number is odd no:1
number is even no:2
number is odd no:3
number is even no:4
number is odd no:5

Test Cases
Test Case 1: Positive values within range
Input =2 Expected output Actual output Remarks
2 is even number 2 is even number
3 is odd number 3 is odd number success
4 is even number 4 is even number
5 is odd number 5 is odd number
6 is even number 6 is even number

Test Case 2: Negative values within range


Input = -2 Expected output Actual output Remarks
0 is even number 0 is an even number
-1 is odd number -1 is even no fail
-2 is even number -2 is odd no

Test Case 3: Out of range values


Input Expected output Actual output Remarks
1234567891222222222222 123456789122222222213 234567891222222215 fail
To understand the working of switch with different range of values and test cases
void main() {
int a, b, c;
clrscr();
printf(“1. Add / n 2. Sub / n 3. Mul / n 4. Div / n Enter Your choice”);
scanf(“ % d”, & i);
printf(“Enter a, b values”);
scanf(“ % d % d”, & a, & b);
switch (i) {
case 1:
c = a + b;
printf(“The sum of a & b is: % d”, c);
break;
case 2:
c = a - b;
printf(“The Diff of a & b is: % d”, c);
break;
case 3:
c = a * b;
printf(“The Mul of a & b is: % d”, c);
break;
case 4:
c = a / b;
printf(“The Div of a & b is: % d”, c);
break;
default:
printf(“Enter your choice”);
break;
}
getch();
}

Output
Input Output
Enter Ur choice: 1 The sum of a & b is:5

Enter a, b Values: 3, 2
Enter Ur choice: 2 The diff of a & b is: 1
Enter a, b Values: 3, 2

Enter Ur choice: 3 The Mul of a & b is: 6


Enter a, b Values: 3, 2
Enter Ur choice: 4 The Div of a & b is: 1
Enter a, b Values: 3, 2

Test Cases
Test Case 1: Positive values within range
Input Expected output Actual output Remarks
Enter Ur choice: 1 The sum of a & b is:5 5
Enter a, b Values: 3, 2
Enter Ur choice: 2 The diff of a & b is: 1 1 Success
Enter a, b Values: 3, 2
Enter Ur choice: 3 The Mul of a & b is: 6 6
Enter a, b Values: 3, 2
Enter Ur choice: 4 The Div of a & b is: 1 1
Enter a, b Values: 3, 2

Test Case 2: Out of range values


Input Expected output Actual output Remarks
Option: 1
a= 22222222222222
b=22222222222222 44444444444444 -2 Fail

Test Case 3: Divided by zero


Input Expected output Actual output Remarks
Option: 4
a= 10 & b=0 error Fail

To understand the working of for with different range of values and test cases
#include <stdio.h>
#include <conio.h>
void main () {
int i;
clrscr();
printf(“enter a no”);
scanf(“ % d”, & i);
for (i = 1; i <= 5; i++) {
if (i % 2 == 0) {
printf(“ % d”, i);
printf(“is a even no”);
i++;
}
printf(“ % d”, i);
printf(“is a odd no”);
i++;
}
getch();
}
Output
Input Output

Enter a no:5 0 is an even no


1 is an odd no
2 is an even no
3 is an odd no
4 is an even no
5 is an odd no

Test Cases
Test Case 1: Positive values within range
Input Expected output Actual output Remarks
0 is even number 0 is an even number

2 1 is odd number 1 is even number Success

2 is even number 2 is odd number

Test Case 2: Negative values within range


Input Expected output Actual output Remarks
0 is even number 0 is an even number

2 -1 is odd number -1 is even number fail

-2 is even number -2 is odd number

Test Case 3: Out of range values


Input Expected output Actual output Remarks
1234567891222222222222 123456789122222222213 234567891222222215 fail
EXPERIMENT-2
AIM
A program written in C Language for Matrix Multiplication fails. Introspect the causes for its
failure and write down the possible reasons for its failure.

SOURCE CODE
#include<stdio.h>
#include<stdlib.h>
int main() {
int a[10][10], b[10][10], mul[10][10], r, c, i, j, k;
system("cls");
printf("enter the number of row=");
scanf("%d", & r);
printf("enter the number of column=");
scanf("%d", & c);
printf("enter the first matrix element=\n");
for (i = 0; i < r; i++) {
for (j = 0; j < c; j++) {
scanf("%d", & a[i][j]);
}
}
printf("enter the second matrix element=\n");
for (i = 0; i < r; i++) {
for (j = 0; j < c; j++) {
scanf("%d", & b[i][j]);
}
}
printf("multiply of the matrix=\n");
for (i = 0; i < r; i++) {
for (j = 0; j < c; j++) {
mul[i][j] = 0;
for (k = 0; k < c; k++) {
mul[i][j] += a[i][k] * b[k][j];
}
}
}

for (i = 0; i < r; i++) {


for (j = 0; j < c; j++) {
printf("%d\t", mul[i][j]);
}
printf("\n");
}
return 0;
}

OUTPUT
enter the number of row=2
enter the number of column=2
enter the first matrix element=
1234
enter the second matrix element=
1234
multiply of the matrix=
7 10
15 22
FAILURE CASES
Reason to fail: To do multiplication of matrices the number of columns in matrix ―a[]
should be equal to number of rows in matrix ―b[].
Enter the size of a: p q
Enter the size of b: r s
Matrix multiplication is not possible.
Reason to fail: To do multiplication of matrices the number of columns in matrix ―a[]
should be equal to number of rows in matrix ―b[], and rows & columns should be integer
values.
Enter the size of a: 1.5 2
Enter the size of b: 2 3.2
Matrix multiplication is not possible.
Reason to fail: To do multiplication of matrices the number of columns in matrix ―a[]
should be equal to number of rows in matrix ―b[], and rows & columns should be within
the range.
Enter the size of a: 350 480
Enter the size of b: 480 620
Matrix multiplication is not possible. (There will be loss of data)
Reason to fail: Size of buffer will be not be sufficient to handle this multiplication.
Enter the size of a: -1 -2
Enter the size of b: -2 3
Matrix multiplication is not possible

TEST CASES
Test Case 1: Columns of 1st matrix not equal to rows of 2nd matrix
Input Expected output Actual output Remark
Matrix 1 rows &
cols= 2 2 Operation can’t be
Matrix 2 rows & performed fail
cols= 3 2
Test Case 2: Equal number of rows and columns
Input Expected output Actual output Remark
Matrix 1 rows &
cols= 3 3
Matrix 2 rows &
cols= 3 3

Matrix1:
333 333
111
333 333
111 Success
333 333
111
Matrix2:
111
111
111

Test Case 3: Out of range values


Input Expected output Actual output Remark
Matrix 1 rows & cols= 2 2
Matrix 2 rows & cols= 2 2

Matrix1:
1234567891 2222222222
2234567891 2222222221 fail

Matrix2:
234567891 22222221533
213242424 56456475457
EXPERIMENT-3
AIM
A program written in C Language for Matrix Addition fails. Introspect the causes for its
failure and write down the possible reasons for its failure.

SOURCE CODE
#include <stdio.h>
int main() {
int m, n, c, d, first[10][10], second[10][10], sum[10][10];
printf("Enter the number of rows and columns of matrix\n");
scanf("%d%d", & m, & n);
printf("Enter the elements of first matrix\n");
for (c = 0; c < m; c++)
for (d = 0; d < n; d++)
scanf("%d", & first[c][d]);
printf("Enter the elements of second matrix\n");
for (c = 0; c < m; c++)
for (d = 0; d < n; d++)
scanf("%d", & second[c][d]);
printf("Sum of entered matrices:-\n ");
for (c = 0; c < m; c++) {
for (d = 0 ; d < n; d++) {
sum[c][d] = first[c][d] + second[c][d];
printf("%d\t", sum[c][d]);
}
printf("\n");
}
return 0;
}
OUTPUT
Enter the number of rows and columns of matrix
22
Enter the elements of first matrix
1234
Enter the elements of second matrix
1234
Sum of entered matrices:-
2 4
6 8

FAILURE CASES
Reason to fail: To do addition of matrices the order of matrix ―a[] should be equal to the
order of matrix ―b[].
Enter the size of a: p q
Enter the size of b: r s
Matrix addition is not possible.
Reason to fail: To do addition of matrices the order of matrix ―a[] should be equal to the
order of matrix ―b[], and rows & columns should be integer values.
Enter the size of a: 1.5 2
Enter the size of b: 1.5 2
Matrix addition is not possible.
Reason to fail: To do addition of matrices the order of matrix ―a[] should be equal to the
order of matrix ―b[], and rows & columns should be within the range.
Enter the size of a: 350 480
Enter the size of b: 350 480
Matrix addition is not possible. (There will be loss of data)
Reason to fail: Size of buffer will be not be sufficient to handle this addition.
Enter the size of a: -1 -2
Enter the size of b: -1 -2
Matrix addition is not possible
TEST CASES
Test Case 1: Order of matrices are not same
Input Expected output Actual output Remark
Matrix 1 rows &
cols= 2 2 Operation can’t be
Matrix2 rows & performed fail
cols= 3 2

Test Case 2: Order of matrices are same


Input Expected output Actual output Remark
Matrix 1 rows &
cols= 3 3
Matrix2 rows &
cols= 3 3

Matrix1:
222 222
111
222 222
111 Success
222 222
111
Matrix2:
111
111
111

Test Case 3: Out of range values


Input Expected output Actual output Remark
Matrix 1 rows & cols= 2 2
Matrix2 rows & cols= 2 2

Matrix1:
1234567891 2222222222
2234567891 2222222221 fail

Matrix2:
234567891 22222221533
213242424 56456475457
EXPERIMENT-4
AIM
Take any system (e.g. ATM System) and study its system specifications and report the
various bugs.

SOURCE CODE
#include<stdio.h>
#include<conio.h>

unsigned long amount = 25000, deposit, withdraw;


int choice, pin, i;
char transaction = 'y';
void main() {
clrscr();
while (pin != 1097) {
printf("ENTER YOUR PIN NUMBER: ");
scanf("%d", & pin);
if (pin != 1097)
printf("PLEASE ENTER VALID PASSWORD\n");
}
do {
printf(" Welcome to ATM Service \n");
printf("1. Check Balance\n");
printf("2. Withdraw Cash\n");
printf("3. Deposit Cash\n");
printf("4. Quit\n");
printf("\n\n");
printf("Enter your choice: ");
scanf("%d", & choice);
switch (choice) {
case 1:
printf("\n YOUR BALANCE =Rs.%lu ", amount);
break;
case 2:
printf("\n ENTER THE AMOUNT: ");
scanf("%lu", & withdraw);
if (withdraw % 100 != 0) {
printf("\n PLEASE ENTER THE AMOUNT IN MULTIPLES OF 100");
} else if (withdraw > (amount - 1000)) {
printf("\n INSUFFICENT BALANCE");
} else {
amount = amount - withdraw;
printf("\n\n PLEASE COLLECT YOUR CASH");
printf("\n YOUR CURRENT BALANCE =RS.%lu", amount);
}
break;
case 3:
printf("\n ENTER THE AMOUNT: ");
scanf("%lu", & deposit);
amount = amount + deposit;
printf(" YOUR BALANCE =RS.%lu", amount);
break;
case 4:
printf("\n THANK YOU USING OUR ATM SERVICES");
break;
default:
printf("\n INVALID CHOICE");
}
printf("\n\n\n DO U WISH TO HAVE ANOTHER TRANSCATION?(y/n): ");
fflush(stdin);
scanf("%c", & transaction);
if (transaction == 'n' || transaction == 'N')
i = 1;
} while (!i);
printf("\n\n THANKS FOR USING OUR ATM SERVICE");
getch();
}

OUTUPT
ENTER YOUR PIN NUMBER: 1097
Welcome to ATM Service
1. Check Balance
2. Withdraw Cash
3. Deposit Cash
4. Quit
Enter your choice: 1
YOUR BALANCE =Rs.25000
DO U WISH TO HAVE ANOTHER TRANSCATION?(y/n): Welcome to ATM Service
1. Check Balance
2. Withdraw Cash
3. Deposit Cash
4. Quit
Enter your choice: 2
ENTER THE AMOUNT: 20000 PLEASE COLLECT YOUR CASH
YOUR CURRENT BALANCE =RS.5000
DO U WISH TO HAVE ANOTHER TRANSCATION?(y/n): Welcome to ATM Service
1. Check Balance
2. Withdraw Cash
3. Deposit Cash
4. Quit
Enter your choice: 1
YOUR BALANCE =Rs.5000
DO U WISH TO HAVE ANOTHER TRANSCATION?(y/n): Welcome to ATM Service
1. Check Balance
2. Withdraw Cash
3. Deposit Cash
4. Quit
Enter your choice: 3
ENTER THE AMOUNT: 200 YOUR BALANCE =RS.5200
DO U WISH TO HAVE ANOTHER TRANSCATION?(y/n): Welcome to ATM Service
1. Check Balance
2. Withdraw Cash
3. Deposit Cash
4. Quit
Enter your choice: 1
YOUR BALANCE =Rs.5200
DO U WISH TO HAVE ANOTHER TRANSCATION?(y/n): Welcome to ATM Service
1. Check Balance
2. Withdraw Cash
3. Deposit Cash
4. Quit
Enter your choice: 4

FEATURES FOR TESTING


1. Validity of the card.
2. Withdraw Transaction flow of ATM.
3. Authentication of the user’s.
4. Dispense the cash from the account.
5. Verify the balance enquiry.
6. Change of PIN number.

BUG IDENTIFICATION AND REPORT


Bug ID Bug Name
ATM_001 Invalid Card
ATM_002 Invalid PIN
ATM_003 Invalid Account Type
ATM_004 Insufficient Balance
ATM_005 Transaction Limit
ATM_006 Day Limit
ATM_007 Invalid Money Denominations
ATM_008 Receipt not Printed
ATM_009 PIN Change Mismatch

Bug Id: ATM_001


Bug Description: Invalid card
Steps to reproduce:
1. Keep valid card in the ATM.
Expected Result: Welcome Screen
Actual Result: Invalid card
Status: Pass/Fail

Bug Id: ATM_002


Bug Description: Invalid PIN entered
Steps to reproduce:
1. Keep a valid card in ATM.
2. Enter the authorized PIN.
3. Menu screen should be displayed.
Expected Result: Menu screen displayed
Actual Result: Invalid PIN screen is displayed
Status: Pass/Fail
Bug Id: ATM_003
Bug Description: Invalid Account type selected.
Steps to reproduce:
1. Enter a valid user PIN number.
2. Select the withdraw option on the main menu.
3. Choose the correct type of account (either savings or current account).
Expected Result: Enter the Amount screen displayed
Actual Result: Invalid Account type screen is displayed.
Status: Pass/Fail

Bug Id: ATM_004


Bug Description: Insufficient Balance
Steps to reproduce:
1. Menu screen should be displayed.
2. Select the withdraw option.
3. Select the correct type of account.
4. Enter the sufficient amount to withdraw from the account.
5. Dispense the cash screen & amount to be deducted from account
Expected Result: Collect the amount screen displayed
Actual Result: Insufficient balance in the account
Status: Pass/Fail

Bug Id: ATM_005


Bug Description: Withdraw Limit per transaction.
Steps to reproduce:
1. Menu screen should be displayed.
2. Select the withdraw option.
3. Select the correct type of account.
4. Enter sufficient amount to withdraw from the account Transaction within the limit.
5. Dispense the cash screen & amount to be deducted from account.
Expected Result: Cash is dispensed and collect the receipt
Actual Result: Transaction limit exceeded screen is displayed
Status: Pass/Fail
Bug Id: ATM_006
Bug Description: Withdraw limit per day
Steps to reproduce:
1. Keep a valid card in ATM.
2. Enter the authorized PIN.
3. Enter the amount to withdraw from the account.
4. Amount enter is over the day limit (>40000)
5. Amount enter is over the day limit and display screen is displayed.
Expected Result: Cash is dispensed and collect the receipt.
Actual Result: Day limit exceeded screen is displayed.
Status: Pass/Fail

Bug Id: ATM_007


Bug Description: Amount enter denominations
Steps to reproduce:
1. Keep a valid card in ATM.
2. Enter the authorized PIN.
3. Enter the amount which should be in multiples of 100.
4. Cash Dispenser screen is displayed.
Expected Result: Collect the amount screen is displayed.
Actual Result: Amount enter not in required denominations.
Status: Pass/Fail

Bug Id: ATM_008


Bug Description: Statement not printed
Steps to reproduce:
1. Keep a valid card in ATM.
2. Enter the authorized PIN.
3. Select the mini statement.
4. Current balance is displayed on the screen.
5. Collect printed receipt of the statement.
Expected Result: Collect the mini statement receipt
Actual Result: receipt not printed.
Status: Pass/Fail

Bug Id: ATM_009


Bug Description: PIN mismatch
Steps to reproduce:
1. Keep a valid card in ATM.
2. Enter the authorized PIN.
3. Select the change PIN option on the menu.
4. Enter the current PIN.
5. Enter the new PIN.
6. Retype the new PIN
7. PIN successfully changed displayed on the screen.
Expected Result: PIN change successful.
Actual Result: PIN mismatched due to wrong PIN entered
Status: Pass/Fail
EXPERIMENT-5
AIM
Write the test cases for any known application (e.g. Banking Application).

TEST CASES
Test cases for opening bank account
Input parameters checking

− Name
− Date of Birth
− Photo
− Address Proof
− Identity Proof
− Introducers (if applicable)
− PAN card
− Initial deposit
− Whether checkbook / ATM card / Online banking facilities are needed or not
− Customer signature
Type of account

− Savings account
− Salary account
− -Joint account
− Current account
− Secondary account
− RD account
− Account for a company
Test Cases

− Checking mandatory input parameters


− Checking optional input parameters
− Check whether able to create account entity.
− Check whether you are able to deposit an amount in the newly created account (and
thus updating the balance)
− Check whether you are able to withdraw an amount in the newly created account
(after deposit) (and thus updating the balance)
− Check whether company name and its pan number and other details are provided in
case of salary account
− Check whether primary account number is provided in case of secondary account
− Check whether company details are provided in cases of company's current account
− Check whether proofs for joint account is provided in case of joint account
− Check whether you are able deposit an account in the name of either of the person
in a joint account.
− Check whether you are able withdraw an account in the name of either of the
person in a joint account.
− Check whether you are able to maintain zero balance in salary account
− Check whether you are not able to maintain zero balance (or mini balance) in non-
salary account.

Application: SBI Banking Application

Test
Test Expected Actual Test
Case Test Case Status
Scenario Result Result Data
Id
1 Validate Enter invalid System should Customer
the login user name and not allow the is not
page enter valid password in customer to able to
invalid/ SBI online login the SBI login SBI
Ex:
wrong user Banking login online Banking online
UID:
name and page login page and banking
Pass abcdef
valid it should account
PWD:
password display the
xyz123
message like
”please enter
valid user name
and password”
2 validate the Enter invalid System should Customer
login page user name and not allow the is not
enter invalid invalid pass word customer to able to
user name in SBI online login the SBI login SBI
Ex:
and invalid Banking login online Banking online
UID:
password page login page and Banking
Pass abcd
it should account
PWD:
display the
xyz12
message like “
please enter
valid user name
and password
3 Validate the Enter valid user System should Customer Ex:
login page name and invalid allow the user is logged UID:
enter valid password in SBI to login the SBI in to SBI Pass abcdefg
user name online Banking online Banking online PWD:
and invalid login page login page Banking xyz1234
password login
page

4 Validate Enter valid user System should Customer


the login name and valid allow the user is logged Ex:
page enter password in SBI to login the SBI into SBI UID:
valid user online Banking online Banking online Pass abcdefg
name and login page login page Banking PWD:
valid login xyz123
password page
5 Validate the User should User/customer Customer
user able to login SBI should able to is not
information login page login SBI login able to
or detail in page with valid see
the profile User should able details phone or
page to click on profile mobile
link Customer number
should be able
On clicking to click profile
profile link uses link.
should able to
fail
see all user Customer
details like should see all
the customer
User/customer information
name once he clicking
on profile hyper
User/customer link
address details

User/customer
phone number
EXPERIMENT-6
AIM
Write the test cases for GMAIL

TEST CASES
Test Cases for Gmail Login page

Sr.
Test Scenarios
No.

1 Enter the valid email address & click next. Verify if the user gets an option to
enter the password.

2 Don’t enter an email address or phone number & just click the Next button.
Verify if the user will get the correct message or if the blank field will get
highlighted.

3 Enter the invalid email address & click the Next button. Verify if the user will get
the correct message.
4 Enter an invalid phone number & click the Next button. Verify if the user will get
the correct message.

5 Verify if a user can log in with a valid email address and password.

6 Verify if a user can log in with a valid phone number and password.

7 Verify if a user cannot log in with a valid phone number and an invalid password.

8 Verify if a user cannot log in with a valid email address and a wrong password.

9 Verify the ‘Forgot email’ functionality.

10 Verify the ‘Forgot password’ functionality.

Test Scenarios for the Sign-up page


1. Verify the messages for each mandatory field.
2. Verify if the user cannot proceed without filling all the mandatory fields.
3. Verify the age of the user when the DOB is selected.
4. Verify if the numbers and special characters are not allowed in the First and Last
name.
5. Verify if a user can sign-up successfully with all the mandatory details.
6. Verify if a user can log in with the valid details.
7. Verify if the Password and Confirm Password fields are accepting similar strings
only.
8. Verify if the Password field will prompt you for the weak passwords.
9. Verify if duplicate email address will not get assigned.
10. Verify that hints are provided for each field on the form, for the ease of use.

Test Case for Gmail – Inbox Functionality


1. Verify that a newly received email is displayed as highlighted in the Inbox section.
2. Verify that a newly received email has correctly displayed sender email Id or name,
mail subject and mail body (trimmed to a single line).
3. Verify that on clicking the newly received email, the user is navigated to email
content.
4. Verify that the email contents are correctly displayed with the desired source
formatting.
5. Verify that any attachments are attached to the email and are downloadable.
6. Verify that the attachments are scanned for viruses before download.
7. Verify that all the emails marked as read are not highlighted.
8. Verify that all the emails read as well as unread have a mail read time appended at the
end on the email list displayed in the inbox section.
9. Verify that count of unread emails is displayed alongside ‘Inbox’ text in the left
sidebar of Gmail.
10. Verify that unread email count increases by one on receiving a new email.
11. Verify that unread email count decreases by one on reading an email (marking an
email as read).
12. Verify that email recipients in cc are visible to all users.
13. Verify that email recipients in bcc are not visible to the user.
14. Verify that all received emails get piled up in the ‘Inbox’ section and get deleted in
cyclic fashion based on the size availability.
15. Verify that email can be received from non-Gmail email Ids like – yahoo, Hotmail
etc.

Test Cases for Gmail – Compose Mail Functionality


1. Verify that on clicking ‘Compose’ button, a frame to compose a mail gets displayed.
2. Verify that user can enter email Ids in ‘To’, ‘cc’ and ‘bcc’ sections and also user will
get suggestions while typing the email Ids based on the existing email Ids in user’s email list.

3. Verify that the user can enter multiple comma-separated email Ids in ‘To’, ‘cc’
and ‘bcc’sections.
4. Verify that the user can type Subject line in the ‘Subject’ textbox.

5. Verify that the user can type the email in the email-body section.

6. Verify that users can format mail using editor-options provided like choosing
font-family,font-size, bold-italic-underline, etc.
7. Verify that the user can attach file as an attachment to the email.

8. Verify that the user can add images in the email and select the size for the same.

9. Verify that after entering email Ids in either of the ‘To’, ‘cc’ and ‘bcc’ sections,
entering Subject line and mail body and clicking ‘Send’ button, mail gets
delivered to intended receivers.
10. Verify that sent mails can be found in ‘Sent Mail’ sections of the sender.
11. Verify that mail can be sent to non-gmail email Ids also.

12. Verify that all sent emails get piled up in the ‘Sent Mail’ section and get deleted
in cyclicfashion based on the size availability.
13. Verify that the emails composed but not sent remain in the draft section.

14. Verify the maximum number of email recipients that can be entered in ‘To’, ‘cc’ and
‘bcc’ sections.
15. Verify the maximum length of text that can be entered in the ‘Subject’ textbox.

16. Verify the content limit of text/images that can be entered and successfully
delivered as mailbody.
17. Verify the maximum size and number of attachment that can be attached with an email.

18. Verify that only the allowed specifications of the attachment can be attached with an
email/

19. Verify that if the email is sent without Subject, a pop-up is generated warning
user about no subject line. Also, verify that on accepting the pop-up message, the
user is able to send the email.
EXPERIMENT-7
AIM
Write test cases for FACEBOOK, TWITTER etc.

USER TIMELINE TEST CASES FOR FACEBOOK


1. Verify that user can set profile pic uploaded from his or her computer.
2. Verify that user can set profile pic uploaded from mobile.
3. Verify that user can set profile pic from photos present on his Facebook account’s
photo section.
4. Verify that user can set profile from webcam or mobile camera.
5. Verify that user can set cover pic uploaded from his or her computer.
6. Verify that user can set cover pic uploaded from mobile.
7. Verify that user can set cover pic from photos present on his Facebook account’s
photo section.
8. Verify that user can set cover from webcam or mobile camera.
9. Verify that uploading image of unsupported type should lead to error message.
10. Verify that uploading image of size exceeding maximum allowed size should lead to
error message.
11. Verify that uploading image of size less than the allowed minimum size should lead
to error message.
12. Verify that uploading image of larger dimension than permitted should lead to error
message.
13. Verify that uploading image of smaller dimension than permitted should lead to
error message.
14. Verify that change in profile pic should get reflected in each post/comment of the
user’s timeline.
15. Verify that user can add/edit their account information displayed to other users.
16. Verify that users can post text in their timeline and the same gets displayed to their
friends.
17. Verify that users can post images in their timeline and the same gets displayed to
their friends.
18. Verify that users can post links with or without preview in their timeline and the
same gets displayed to their friends.
19. Verify that user can tag friends in their posts.
20. Verify that users can see the all the post in their timeline.
21. Verify that users can see comments, likes and reactions in the posts present in their
timeline.
22. Verify that users can post comments, like and react to the posts present in their
timeline.
FRIENDS AND THEIR TIMELINES TEST CASES FOR FACEBOOK
1. Verify that the user can search for friends in face book’s ‘Find friends’ search
functionality.
2. Verify that users can send a friend requests to any user by visiting their page.
3. Verify that the user can navigate through their Friend’s friend and send a friend
requests to them.
4. Verify that the user can approve or decline received friend request.
5. Verify that the user can unfriend any existing friend.
6. Verify that users can see the timeline of their friends.
7. Verify that users can post text in their friend’s timeline.
8. Verify that users can post images in their timeline and the same gets displayed to
their friends.
9. Verify that users can post links with or without preview in their friend’s timeline.
10. Verify that users can tag friends in their posts on a friend’s timeline.
11. Verify that users can see all the posts in their friend’s timeline.
12. Verify that users can see comments, likes, and reactions in the posts present in their
friend’s timeline.
13. Verify that users can post comments, like and react to the posts present in their
friend’s timeline.

FACEBOOK NOTIFICATION TEST SCENARIOS


1. Verify that users receive different notifications on face book ‘Notifications’ icon.
2. Verify that users receive different notifications on email or cell phone based on the
settings chosen when not logged in to Facebook.
3. Verify that users receive a notification when their friend request gets approved.
4. Verify that users receive a notification when they get a friend request.
5. Verify that users receive a notification when they get tagged by someone on posts or
comments.
6. Verify that users receive a notification when they get comments, like or reactions on
their posts.
7. Verify that users receive notification when someone posts on their timeline.
TEST CASES – LOGIN PAGE
Following is the possible list of functional and non-functional test cases for a login page:
Functional Test Cases:

Sr. Type- Negative/


Functional Test Cases
No. Positive Test Case

Verify if a user will be able to login with a valid username


1 Positive
and valid password.

Verify if a user cannot login with a valid username and an


2 Negative
invalid password.

Verify the login page for both, when the field is blank and
3 Negative
Submit button is clicked.

4 Verify the ‘Forgot Password’ functionality. Positive

5 Verify the messages for invalid login. Positive

6 Verify the ‘Remember Me’ functionality. Positive

Verify if the data in password field is either visible as asterisk


7 Positive
or bullet signs.

Verify if a user is able to login with a new password only


8 Positive
after he/she has changed the password.

Verify if the login page allows to log in simultaneously with


9 Positive
different credentials in a different browser.

Verify if the ‘Enter’ key of the keyboard is working correctly


10 Positive
on the login page.

Other Test Cases

Verify the time taken to log in with a valid username and Performance &
11
password. Positive Testing

Verify if the font, text color, and color coding of the Login UI Testing & Positive
12
page is as per the standard. Testing

Verify if there is a ‘Cancel’ button available to erase the


13 Usability Testing
entered text.

Browser
14 Verify the login page and all its controls in different browsers Compatibility &
Positive Testing.
Non-functional Security Test Cases:

Show entries
Search:

Sr. Type – Negative/Positive


Security Test Cases
No. Test Case
Verify if a user cannot enter the characters more
1 than the specified range in each field (Username and Negative
Password).
Verify if a user cannot enter the characters more
2 than the specified range in each field (Username and Positive
Password).
Verify the login page by pressing ‘Back button’ of the
3 browser. It should not allow you to enter into the Negative
system once you log out.

4 Verify the timeout functionality of the login session. Positive

Verify if a user should not be allowed to log in with


5 different credentials from the same browser at the Negative
same time.
Verify if a user should be able to login with the same
6 Positive
credentials in different browsers at the same time.

7 Verify the Login page against SQL injection attack. Negative

8 Verify the implementation of SSL certificate. Positive


EXPERIMENT-8
AIM
Create a test plan document for any application (e.g. Library Management System)

TEST PLAN DOCUMENT


The Library Management System is an online application for assisting a librarian in managing
a book library in a University. The system would provide basic set of features to add/update
clients, add/update books, search for books, and manage check-in / checkout processes.
Our test group tested the system based on the requirement specification.
INTRODUCTION
This test report is the result for testing in the LMS. It mainly focuses on two problems: what
we will test and how we will test.
GUI TEST
Pass criteria: librarians could use this GUI to interface with the backend library database
without any difficulties
Result: pass
DATABASE TEST
Pass criteria: Results of all basic and advanced operations are normal
Result: pass
BASIC FUNCTION TEST
Add a student
Pass criteria:

• Each customer/student should have following attributes: Student ID/SSN (unique),


Name, Address and Phone number.
Result: pass

• The retrieved customer information by viewing customer detail should contain the
four attributes.
Result: pass
Update/delete student
Pass criteria:

• The record would be selected using the student ID


Result: pass

• Updates can be made on full. Items only: Name, Address, Phone number
Result: pass

• The record can be deleted if there are no books issued by user.


Result: Partially pass. When no books issued by user, he can be deleted. But when
there are books Issued by this user, he was also deleted. It is wrong.

• The updated values would be reflected if the same customer's ID/SSN is called for.
Result: pass

• If customer were deleted, it would not appear in further search queries.


Result: pass
Add a book
Pass criteria:

• Each book shall have following attributes: Call Number, ISBN, Title, Author name.
Result: pass

• The retrieved book information should contain the four attributes.


Result: pass
Update/delete book
Pass criteria:

• The book item can be retrieved using the call number


Result: did not pass. Cannot retrieve using the call number

• The data items which can be updated are: ISBN, Title, Author name
Result: pass

• The book can be deleted only if no user has issued it.


Result: partially pass. When no user has issued it, pass. When there are user having
issued it, did not pass.

• The updated values would be reflected if the same call number is called for
Result: pass

• If books were deleted, it would not appear in further search queries.


Result: pass
Search for book
Pass criteria:

• The product shall let Librarian query books’ detail information by their ISBN number
or Author or Title.
Result: pass

• The search results would produce a list of books, which match the search
parameters with following Details: Call number, ISBN number, Title, Author
Result: pass

• The display would also provide the number of copies which is available for issue
Result: pass

• The display shall provide a means to select one or more rows to a user-list
Result: pass

• A detailed view of each book should provide information about check-in/check-out


status, with the borrower’s information.
Result: pass

• The search display will be restricted to 20 results per page and there would be
means to navigate from sets of search results.
Result: pass

• The user can perform multiple searches before finally selecting a set of books for
check-in or check-out. These should be stored across searches.
Result: pass

• A book may have more than one copy. But every copy with the same ISBN number
should have same detail information.
Result: pass

• The borrower’s list should agree with the data in students’ account
Result: pass
Check-in book
Pass criteria:

• Librarians can check in a book using its call number


Result: pass

• The check-in can be initiated from a previous search operation where user has
selected a set of books.
Result: pass

• The return date would automatically reflect the current system date.
Result: did not pass.

• Any late fees would be computed as difference between due date and return date at
the rate of 10 cents a day.
Result: did not pass

• A book, which has been checked in once, should not be checked in again
Result: pass
Check-out book
Pass criteria:

• Librarians can check out a book using its call number


Result: pass

• The checkout can be initiated from a previous search operation where user has
selected a set of books.
Result: pass

• The student ID who is issuing the book would be entered


Result: pass

• The issue date would automatically reflect the current system date. The due date
would automatically be stamped as 5 days from current date.
Result: did not pass

• A book, which has been checked out once, should not be checked out again
Result: pass

• A student who has books due should not be allowed to check out any books
Result: did not pass

• The max. No of books that can be issued to a customer would be 10. The system
should not allow checkout of books beyond this limit.
Result: pass
View book detail
Pass criteria:

• This view would display details about a selected book from search operation
Result: pass

• The details to be displayed are: Call number, IBN, Title, Author, Issue status (In
library or checked out), If book is checked out it would display, User ID & Name,
Check-out date, Due date
Result: for checkout date and due date, did not pass

• Books checked in should not display user summary


Result: pass

• Books checked out should display correct user details.


Result: pass
View student detail
Pass criteria:

• Librarians can select a user record for detailed view


Result: pass

• The detail view should show:

− User name, ID, Address & Phone number


Result: pass

− The books issued by user with issue date, due date, call number, title
Result: did not pass
− Late fees & Fines summary and total
Result: did not pass

− The display should match existing user profile


Result: pass

− The books checked out should have their statuses marked


Result: pass

− The book search query should show the user id correctly.


Result: pass
Network test
Pass criteria:
Results of operations (ping, ftp and ODBC connectivity check) are normal
Result: did not test this item, because no enough machines and no available environment.
EXPERIMENT-9
AIM
Study of any web testing tool (e.g. Selenium)

THEORY
What is Selenium?

JavaScript framework that runs in your web browser Works anywhere JavaScript is
supported Hooks for many other languages Java, Ruby, Python Can simulate a user
navigating through pages and then assert for specific marks on the pages All you need to
really know is HTML to start using it right away.

Selenium IDE

Selenium Integrated Development Environment (IDE) is a Firefox plugin that lets testers to
record their actions as they follow the workflow that they need to test.
It provides a Graphical User Interface for recording user actions using Firefox which is used
to learnand use Selenium, but it can only be used with Firefox browser as other browsers
are not supported.
However, the recorded scripts can be converted into various programming languages
supported by Selenium and the scripts can be executed on other browsers as well.

Selenium – IDE Download


Step 1 − Launch Firefox and navigate to the following URL; http://seleniumhq.org/download/.
Under the Selenium IDE section, click on the link that shows the current version number as
shown below.

Step 2 − Firefox add-ons notifier pops up with allow and disallow options. User has to allow
the installation.
Step 3 − The add-ons installer warns the user about untrusted add-ons. Click 'Install Now'

Step 4 − The Selenium IDE can now be accessed by navigating to Tools >> Selenium IDE.

Step 5 − The Selenium IDE can also be accessed directly from the quick access menu bar as
shownbelow.
Selenium IDE Features
This section deals with the features available in Selenium IDE.
The following image shows the features of Selenium IDE with the help of a simple tool-tip.

The features of the record tool bar are explained below.

Control Control Name Description


Speed Control This helps in controlling the speed of
thetest case runs.
Run All Executes the entire test suite that
containsmultiple test cases.
Run Executes the currently selected test.

Pause/Resume Allows user to pause or resume the


scriptexecution. Enabled only during
the execution.
Step Helps user to debug the test by
executingonly one step of a test case
at a time.
Test Runner Mode Allows user to execute the test case
in a browser loaded with the
selenium Core. Itis an obsolete
functionality that likely to be
deprecated.
Apply Rollup Rules This features allows repetitive
sequences of selenium commands to
be grouped intoa single action.
Record This features helps user to Records
theuser's browser actions.
Creating Selenium IDE Tests
This section deals with how to create IDE tests using recording feature. The following steps
are involved in creating Selenium tests using IDE −
• Recording and adding commands in a test
• Saving the recorded test
• Saving the test suite
• Executing the recorded test Recording and Adding Commands in a Test
We will use www.ncalculators.com to demonstrate the features of Selenium.

Step 1 − Launch the Firefox browser and navigate to the website -


https://www.ncalculators.com/
Step 2 − Open Selenium IDE from the Tools menu and press the record button that is on the
top- right corner.

Step 3 − Navigate to "Math Calculator" >> "Percent Calculator >> enter "10" as number1
and 50 as number2 and click "calculate".
Step 4 − User can then insert a checkpoint by right clicking on the web element and select
"Show all available commands" >> select "assert text css=b 5"

Step 5 − The recorded script is generated and the script is displayed as shown below.
Saving the Recorded Test

Step 1 − Save the Test Case by navigating to "File" >> "Save Test" and save the file in the
location of your choice. The file is saved as .HTML as default.
The test can also be saved with an extension htm, shtml, and xhtml.

Saving the Test Suite


A test suite is a collection of tests that can be executed as a single entity.

Step 1 − Create a test suite by navigating to "File" >> "New Test Suite" as shown below.
Step 2 − The tests can be recorded one by one by choosing the option "New Test Case" from
the "File" Menu.
Step 3 – The individual tests are saved with a name along with saving a "Test Suite".

Executing the Recorded Test


The recorded scripts can then be executed either by clicking "Play entire suite" or "Play
current test" button in the toolbar.

Step 1 − The Run status can be seen in the status pane that displays the number of tests
passed and failed.
Step 2 − Once a step is executed, the user can see the result in the "Log" Pane.
Step 3 − After executing each step, the background of the test step turns "Green" if passed
and "Red" if failed as shown below.

Selenium IDE Script Debugging


This section deals with debugging the Selenium IDE script.
Debugging is the process of finding and fixing errors in the test script. It is a common step in
any script development. To make the process more robust, we can make use a plugin
"Power Debugger" for Selenium IDE.

Step 1 − To install Power Debugger for Selenium IDE, navigate to


https://addons.mozilla.org/en- US/firefox/addon/power-debugger-selenium-ide/ and click
"Add to Firefox" as shown below.

Step 2 − Now launch 'Selenium IDE' and you will notice a new icon, "Pause on Fail" on
recording toolbar as shown below. Click it to turn it ON. Upon clicking again, it would be
turned "OFF".

Step 3 − Users can turn "pause on fail" on or off any time even when the test is running.
Step 4 − Once the test case pauses due to a failed step, you can use the resume/step
buttons to continue the test execution. The execution will NOT be paused if the failure is on
the last command of any test case.
Step 5 − We can also use breakpoints to understand what exactly happens during the step.
To insert a breakpoint on a particular step, "Right Click" and select "Toggle Breakpoint" from
the context- sensitive menu.
Step 6 − Upon inserting the breakpoint, the particular step is displayed with a pause icon as
shown below.

Step 7 − When we execute the script, the script execution is paused where the breakpoint is
inserted. This will help the user to evaluate the value/presence of an element when the
execution is in progress.

Inserting Verification Points


This section describes how to insert verification points in Selenium IDE.

The test cases that we develop also need to check the properties of a web page. It requires
assert and verify commands. There are two ways to insert verification points into the script.
To insert a verification point in recording mode, "Right click" on the element and choose
"Show all Available Commands" as shown below.

We can also insert a command by performing a "Right-Click" and choosing "Insert New
Command".

After inserting a new command, click 'Command' dropdown and select appropriate
verification point from the available list of commands.

Given below are the mostly used verification commands that help us check if a particular
step has passed or failed.
• verifyElementPresent
• assertElementPresent
• verifyElementNotPresent
• assertElementNotPresent
• verifyText
• assertText
• verifyAttribute
• assertAttribute
• verifyChecked
• assertChecked
• verifyAlert
• assertAlert
• verifyTitle
• assertTitle

Synchronization Points
During script execution, the application might respond based on server load, hence it is
required for the application and script to be in sync. Given below are few a commands that
we can use to ensure that the script and application are in sync.

• waitForAlertNotPresent
• waitForAlertPresent
• waitForElementPresent
• waitForElementNotPresent
• waitForTextPresent
• waitForTextNotPresent
• waitForPageToLoad
• waitForFrameToLoad

Selenium Pattern Matching


This section deals with how to work with regular expressions using IDE.

Like locators, patterns are a type of parameter frequently used by Selenium. It allows users
to describe patterns with the help of special characters. Many a time, the text that we
would like to verify are dynamic; in that case, pattern matching is very useful.
Pattern matching is used with all the verification point commands - verifyTextPresent,
verifyTitle, verifyAlert, assertConfirmation, verifyText, and verifyPrompt.

There are three ways to define a pattern −


• globbing
• regular expressions, and
• exact patterns.

Globbing
Most techies who have used file matching patterns in Linux or Windows while searching for
a certain file type like *.doc or *.jpg would be familiar with term "globbing".
Globbing in Selenium supports only three special characters: *, ?, and [ ].

* − matches any number of characters.


? − matches a single character.
[ ] − called a character class, lets you match any single character found within the brackets.
[0-9] matches any digit.

To specify a glob in a Selenium command, prefix the pattern with the keyword 'glob:'. For
example, if you would like to search for the texts "tax year 2013" or "tax year 2014", then
you can use the golb "tax year *" as shown below.

However the usage of "glob:" is optional while specifying a text pattern because globbing
patterns are the default in Selenium.

Command Target Value


clickAndWait Link = search
verifyTextPresent glob: tax year *

Exact Patterns
Patterns with the prefix 'exact:' will match the given text as it is. Let us say, the user wants
an exact match with the value string, i.e., without the glob operator doing its work, one can
use the 'exact' pattern as shown below. In this example the operator '*' will work as a
normal character rather than a pattern-matching wildcard character.

Command Target Value


clickAndWait Link = search
verifyValue exact: *.doc

Regular Expressions
Regular expressions are the most useful among the pattern matching techniques available.
Selenium supports the complete set of regular expression patterns that JavaScript supports.
Hence the users are no longer limited by *, ? and [] globbing patterns.

To use Regular Expression patterns, we need to prefix with either "regexp:" or "regexpi:".
The prefix "regexpi" is case-insensitive. The glob: and the exact: patterns are the subsets of
the Regular Expression patterns. Everything that is done with glob: or exact: can be
accomplished with the help of RegExp.

For example, the following will test if an input field with the id 'name' contains the string
'tax year', 'Tax Year', or 'tax Year'.
Command Target Value
clickAndWait Link = search
verifyValue Id = name Regexp:[Tt]ax([Yy]ear)

Selenium User Extensions


The Java script that allows users to customize or add new functionality.

It is easy to extend Selenium IDE by adding customized actions, assertions, and locator-
strategies. It is done with the help of JavaScript by adding methods to the Selenium object
prototype. On startup, Selenium will automatically look through the methods on these
prototypes, using name patterns to recognize which ones are actions, assertions, and
locators.
Let us add a 'while' Loop in Selenium IDE with the help of JavaScript.

Step 1 − To add the js file, first navigate to


https://github.com/darrenderidder/sideflow/blob/master/sideflow.js and copy the script
and place save it as 'sideflow.js' in your local folder as shown below.

Step 2 − Now launch 'Selenium IDE' and navigate to "Options" >> "Options" as shown below.
Step 3 − Click the 'Browse' button under 'Selenium Core Extensions' area and point to the js
file that we have saved in Step 1.

Step 4 − Restart Selenium IDE.


Step 5 − Now you will have access to a few more commands such as "Label", "While" etc.
Step 6 − Now we will be able to create a While loop within Selenium IDE and it will execute.
EXPERIMENT-10
AIM
Test case for calculator in windows application.

TEST CASES

Basic Operational Tests


Write the test cases based on the following functions and scenarios.
• Check the calculator if it starts by on button. If it is software based calculator then
check if it starts via specific means like from searching for calculator in search bar
and then executing application. Or by accessing menu item in the Windows.
• Check if the calculator window maximizes to certain window size.
• Check if the calculator closes when the close button is pressed or if the exit menu is
clicked from file > exit option.
• Check if the help document is accessed from Help > Documentation.
• Check if the calculator allows copy and paste functionality.
• Check if the calculator has any specific preferences.
• Check if all the numbers are working (0 to 9)
• Check if the arithmetic keys (+, -, *, %, /) are working.
• Check if the clear key is working.
• Check if the brackets keys are working.
• Check if the sum or equal key is working.
• Check if the square and square root key is working.

Functionality Test Cases


• Check the addition of two integer numbers.
• Check the addition of two negative numbers.
• Check the addition of one positive and one negative number.
• Check the subtraction of two integer numbers.
• Check the subtraction of two negative numbers.
• Check the subtraction of one negative and one positive number.
• Check the multiplication of two integer numbers.
• Check the multiplication of two negative numbers.
• Check the multiplication of one negative and one positive number.
• Check the division of two integer numbers.
• Check the division of two negative numbers.
• Check the division of one positive number and one integer number.
• Check the division of a number by zero.
• Check the division of a number by negative number.
• Check the division of zero by any number.
• Check if the functionality using BODMAS/BIDMAS works as expected.

Advanced Tests on Scientific Calculator


If your calculator has advanced features as shown in the screenshot.

You can add few more tests in the scientific calculator.


• Check if the sin, cos, tan and cos is operational using the keys.
• Check if the x-1, x!,|x|,x^y and f(x) is operational and works as expected.
• Check if the log key is operational and works as expected.
• Check if the natural logarithm key i operational and works as expected.
• Check if the factorial key is working as expected.
• Check if the real and imaginary component keys are working as expected.
• Check if the complex conjugate keys are working as expected.
Conversion Function Tests
Some of the advanced scientific calculator has the converter option. It does the conversion
of angle, length, weight, area, volume, duration, currency, temperature. Make sure you
write the test cases for the same.

Financial Calculator Tests


The additional keys for the financial calculator will be as shown in the image. Some
calculator has the mode for enabling these keys.
EXPERIMENT-11
AIM
Study of Bug Tracking Tool (e.g. Bugzilla)

THEORY
Bugzilla is a ―Bug Tracking System that can efficiently keep track of outstanding bugs in a
product. Multiple users can access this database and query, add and manage these bugs.
Bugzilla essentially comes to the rescue of a group of people working together on a product
as it enables them to view current bugs and make contributions to resolve issues. Its basic
repository nature works out better than the mailing list concept and an organized database
is always easier to work with.

Advantage of Using Bugzilla:


1. Bugzilla is very adaptable to various situations. Known uses currently include IT
support queues, Systems Administration deployment management, chip design and
development problem tracking (both pre-and-post fabrication), and software and
hardware bug tracking for luminaries such as Redhat, NASA, Linux-Mandrake, and VA
Systems. Combined with systems such as CVS, Bugzilla provides a powerful, easy-to-
use solution to configuration management and replication problems.
2. Bugzilla can dramatically increase the productivity and accountability of individual
employees by providing a documented workflow and positive feedback for good
performance. Ultimately, Bugzilla puts the power in user‘s hands to improve value to
business while providing a usable framework for natural attention to detail and
knowledge store to flourish.
The Bugzilla utility basically allows to do the following:

• Add a bug into the database


• Review existing bug reports
• Manage the content
Bugzilla is organized in the form of bug reports that give all the information needed about a
particular bug. A bug report would consist of the following fields.
Product–>Component Assigned to
Status (New, Assigned, Fixed etc) Summary
Bug priority
Bug severity (blocker, trivial etc) Bug reporter
Using Bugzilla:
Bugzilla usage involves the following activities Setting Parameters and Default Preferences

• Creating a New User

• Impersonating a User

• Adding Products

• Adding Product Components

• Modifying Default Field Values

• Creating a New Bug

• Viewing Bug Reports

Setting Parameters and Default Preferences:


When we start using Bugzilla, we‘ll need to set a small number of parameters and
preferences. At a minimum, we should change the following items, to suit our particular
need:
▪ Set the maintainer
▪ Set the mail_delivery_method
▪ Set bug change policies
▪ Set the display order of bug reports
To set parameters and default preferences:
1. Click Parameters at the bottom of the page.
2. Under Required Settings, add an email address in the maintainer field.
3. Click Save Changes.
4. In the left side Index list, click Email.
5. Select from the list of mail transports to match the transport we‘re using. If
evaluating a click2try application, select Test. If using SMTP, set any of the other
SMTP options for your environment. Click Save Changes.
6. In the left side Index list, click Bug Change Policies.
7. Select On for comment on create, which will force anyone who enters a new bug to
enter a comment, to describe the bug. Click Save Changes.
8. Click Default Preferences at the bottom of the page.
9. Select the display order from the drop-down list next to the When viewing a bug,
show comments in this order field. Click Submit Changes.
Creating a New User
Before entering bugs, make sure we add some new users. We can enter users very easily,
with a minimum of information. Bugzilla uses the email address as the user ID, because
users are frequently notified when a bug is entered, either because they entered the bug,
because the bug is assigned to them, or because they‘ve chosen to track bugs in a certain
project.

To create a new user:


1. Click Users.
2. Click add a new user.
3. Enter the Login name, in the form of an email address.
4. Enter the Real name, a password, and then click Add.
5. Select the Group access options. we‘ll probably want to enable the following options
in the row titled User is a member of these groups:
• Canconfirm
• Editbugs
• Editcomponents
6. Click Update when done with setting options.

Impersonating a User
Impersonating a user is possible, though rare, that we may need to file or manage a bug in
an area that is the responsibility of another user when that user is not available. Perhaps the
user is on vacation, or is temporarily assigned to another project. We can impersonate the
user to create or manage bugs that belong to that user.

Adding Products
We‘ll add a product in Bugzilla for every product we are developing. To start with, when we
first login to Bugzilla, we‘ll find a test product called TestProduct. We should delete this and
create a new product.
To add a product:
1. At the bottom of the page, click Products.
2. In the TestProduct listing, click Delete.
3. Click Yes, Delete.
4. Now click Add a product.
5. Enter a product name, such as ―Widget Design Kit.‖
6. Enter a description.
7. Click Add. A message appears that you‘ll need to add at least one component.
Adding Product Components
Products are comprised of components. Software products, in particular, are typically made
up of many functional components, which in turn are made up of program elements, like
classes and functions. It‘s not unusual in a software development team environment for
different individuals to be responsible for the bugs that are reported against a given
component. Even if there are other programmers working on that component, it‘s not
uncommon for one person, either a project lead or manager, to be the gatekeeper for bugs.
Often, they will review the bugs as they are reported, in order to redirect them to the
appropriate developer or even another team, to review the priority and severity supplied by
the reporter, and sometimes to reject bugs as duplicates or enhancement requests, for
example.
To add a component:
1. Click the link add at least one component in the message that appears after creating
a new product.
2. Enter the Component name.
3. Enter a Description.
4. Enter a default assignee. Use one of the users we‘ve created. Remember to enter
the assignee in the form of an email address.
5. Click Add.
6. To add more components, click the name of product in the message that reads edit
other components of product <product name>.

Modifying Default Field Values


Once we begin to enter new bugs, we‘ll see a number of drop-down lists containing default
values. Some of these may work just fine for our product. Others may not. We can modify
the values of these fields, adding new values and deleting old ones. Let‘s take a look at the
OS category.
To modify default field values:
1. At the bottom of the page, in the Edit section, click Field Values.
2. Click the link, in this case OS, for the field we want to edit. The OS field contains a list
of operating system names. We are going to add browsers to this list. In reality, we
might create a custom field instead, but for the sake of this example, just add them to
the OS list.
3. Click Add a value. In the Value field, enter ―IE7. Click Add.
4. Click Add a value again.
5. In the Value field, enter ―Firefox 3.
6. Click Add.
7. Where it reads Add other values for the op_sys field, click op_sys.
8. This redisplays the table. We should now see the two new entries at the top of the
table. These values will also appear in the OS drop-down list when we create a new
bug.

Creating a New Bug


Creating bugs is a big part of what Bugzilla does best.
To create a new bug:
1. In the top menu, click New.
2. If we‘ve defined more than one component, choose the component from the
component list.
3. Select a Severity and a Priority. Severity is self-explanatory, but Priority is generally
assumed to be the lower the number, the higher the priority. So, a P1 is the highest
priority bug, a showstopper.
4. Click the OS drop-down list to see the options, including the new browser names we
entered.
5. Select one of the options.
6. Enter a summary and a description. We can add any other information of choice, but
it is not required by the system, although we may determine that our bug reporting
policy requires certain information.
7. Click Commit. Bugzilla adds our bug report to the database and displays the detail
page for that bug.

Viewing Bug Reports


Eventually, we‘ll end up with thousands of bugs listed in the system. There are several ways
to view the bugs. The easiest is to click the My Bugs link at the bottom of the page. Because
we‘ve only got one bug reported, we‘ll use the standard Search function.
To find a bug:
1. Click Reports.
2. Click the Search link on the page, not the one in the top menu. This opens a page
titled ― Find a Specific Bug.
3. Select the Status.
4. Select the Product.
5. Enter a word that might be in the title of the bug.
6. Click Search. If any bugs meet the criteria that we have entered, Bugzilla displays
them in a list summary.
7. Click the ID number link to view the full bug report.
Modifying Bug Reports
Suppose we want to change the status of the bug. We‘ve reviewed it and have determined
that it belongs to one of the users we have created earlier
To modify a bug report:
1. Scroll down the full bug description and enter a comment in the Additional
Comments field.
2. Select ―Reassign bug to‖ and replace the default user ID with one of the other user
IDs you created. It must be in the format of an email address
EXPERIMENT-12
AIM
Study of any open source-testing tool (e.g. Test Link)

THEORY
Test Link is an open source test management tool. It enables creation and organization of
test cases and helps manage into test plan. Allows execution of test cases from test link
itself. One can easily track test results dynamically, generate reports, generate test metrics,
prioritize test cases and assign unfinished tasks. It’s a web based tool with GUI, which
provides an ease to develop test cases, organize test cases into test plans, execute these
test cases and generate reports. Test link exposes API, written in PHP, can help generate
quality assurance dashboards. The functions like Add Test Case to Test Plan, Assign
Requirements, Create Test Case etc. helps create and organize test cases per test plan.
Functions like Get Test Cases for Test Plan, Get Last Execution Result allows one to create
quality assurance dashboard.
Test Link enables easily to create and manage Test cases as well as organize them into Test
plans. These Test plans allow team members to execute Test cases and track test results
dynamically, generate reports, trace software requirements, prioritize and assign tasks.
Read more about implemented features and try demo pages.

Overall Structure
There are three cornerstones: Product, or attributes for this base. First, definition of
documentation.
Products and Test Plans
Test Plan and User. All other data are relations a couple of terms that are used throughout
the
Product: A Product is something that will exist forever in Test Link. Products will undergo
many different versions throughout their life time. Product includes Test Specification with
Test Cases and should be sorted via Keywords.
Test Plan: Test Plans are created when you‘d like to execute test cases. Test plans can be
made up of the test cases of one or many Products. Test Plan includes Builds, Test Case
Suite and Test Results.
User: A User has a Role that defines available Test Link features.
Test Case Categorization
Test Link breaks down the test case structure into three levels Components, Categories, and
test cases. These levels are persisted throughout the application.

• Component: Components are the parents of Categories. Each Component can have
many Categories.
• Category: Categories are the parents of test cases. Each Category can have many test
cases.
• Test Case: Test cases are the fundamental piece of Test Link.

Test Specification: All Components, Categories and test cases within Product.
Test Case Suite: All Components, Categories and test cases within Test Plan. Test
Specification

Test Specification
Creating Test Cases
Tester must follow this structure: Component, Category and test case. At first you create
Component(s) for your Product. Component includes Categories. Category has the similar
meaning but is second level of Test Specification and includes just Test Cases.
User can also copy or move Test Cases. Test Cases has following parts:
• Title: could include either short description or abbreviation (e.g. TL-USER-LOGIN)
• Summary: should be really short; just for overview.
• Steps: describe test scenario (input actions); can also include precondition and
cleanup information here.
• Expected results: describe checkpoints and expected behavior a tested Product or
system.

Deleting Test Cases


Test cases, Categories, and Components may be deleted from a test plan by users with lead
permissions from the ―delete test cases screen. Deleting data may be useful when first
creating a test plan since there are no results. However, Deleting test cases will cause the
loss of all results associated with them. Therefore, extreme caution is recommended when
using this functionality.
Requirements Relation
Test cases could be related with software/system requirements as n to n. The functionality
must be enabled for a Product. User can assign Test Cases and Requirements via link Assign
Requirements in the main screen.

Test Plans
Test plan contains name, description, collection a chosen test cases, builds, test results,
milestones, tester assignment and priority definition.
Creating a new Test Plan
Test Plans may be deleted from the ―Create test plan‖ page (link ―Create Test Plan‖) by
users with lead privileges. Test plans are the basis for test case execution. Test plans are
made up of test cases imported from Products at a specific point of time. Test plans can only
be created by users with lead privileges. Test plans may be created from other test plans.
This allows users to create test plans from test cases that at a desired point in time. This
may be necessary when creating a test plan for a patch. In order for a user to see a test plan
they must have the proper rights. Rights may be assigned (by leads) in the define
User/Project Rights section. This is an important thing to remember when users tell you
they can‘t see the project they are working on.

Test Execution
Test execution is available when:
1. A Test Specification is written.
2. A Test Plan is created.
3. Test Case Suite (for the Test Plan) is defined.
4. A Build is created.
5. The Test plan is assigned to testers (otherwise they cannot navigate to this Test
Plan).
Select a required Test Plan in main page and navigate to the ‗Execute tests‘ link. Left pane
serves for navigation in Test Case Suite via tree menu, filtering and define a tested build.

Test Status
Execution is the process of assigning a result (pass, fail, blocked) to a test case for a specific
build. ‗Blocked‘ test case is not possible to test for some reason (e.g. a problem in
configuration disallows to run a tested functionality).
Insert Test results
Test Results screen is shown via click on an appropriate Component, Category or test case in
navigation pane. The title shows the current build and owner. The colored bar indicate
status of the test case. Yellow box includes test scenario of the test case.

Updated Test Cases: If users have the proper rights they can go to the ―Update modified
test case‖ page through the link on main page. It is not necessary for users to update test
cases if there has been a change (newer version or deleted).

Advantages:
1. Easy in tracking test cases(search with keyword, test case id, version etc)
2. We can add our custom fields to test cases.
3. Allocating the work either test case creation/execution any kind of documents is
easy
4. when a test cases is updated the previous version also can be tracked
5. We can generate results build wise
6. Test plans are created for builds and work allocations can be done.
7. Report, is one of the awesome functionality present in the Test link, it generates
reports in desired format like HTML/ CSV /Excel and we can create graphs too.
8. And the above all is done on the privileges based which is an art of the testlink and i
liked this feature much

Example of Test Link workflow:


1. Administrator create a Product ―Fast Food‖ and a user Adam with rights ―leader‖
and Bela with rights ―Senior tester‖.
2. Adam imports Software Requirements and for part of these requirements generates
empty Test cases.
3. Bela describe test scenario of these Test cases that are organized according to
Components and Categories.
4. Adam creates Keyword: ―Regression‖ and assigns this keyword to ten of these test
cases.
5. Adam creates a Test Plan ―Fish & Chips‖, Build ―Fish 0.1‖ and add Test Cases with
keywords ―Regression‖.
6. Adam and Bela execute and record the testing with result: 5 passed, 1 failed and 4
are blocked.
7. Developers make a new build ―Fish 0.2‖ and Bela tests the failed and blocked test
cases only. Exceptionally all these five Test cases passed.
8. Manager would like to see results. Administrator explains him that he can create
account himself on the login page. Manager does it. He has ―Guest‖ rights and could
see results and Test cases. He can see that everything passed in overall report and
problems in build ―Fish 0.1‖ in a report for particular Build. But he can change
nothing.

PRACTICAL
Login to Test Link
Open the Test link home-page and enter the login details
1. Enter the user ID – admin
2. Enter the password
3. Click on the login tab

Creating a Test Project


Step 1: In the main window click on Test Project Management, it will open another window
Step 2: Click on tab "create" to create a new project

Step 3: Enter all the required fields in the window like category for test project, name of the
project, prefix, description, etc. After filling all necessary details, click on tab "Create" at the
end of the window.
This will create your project "Guru99" successfully.

Creating a Test Plan


Test plan holds the complete information like scope of Software testing, milestone, test
suites and test cases. Once you have created a Test Project, next step is to create Test plan.

Step 1: From the home-page, click on Test Plan Management from home-page.
Step 2: It will open another page, at the bottom of the page click on a tab "Create"

Step 3: Fill out all the necessary information like name, description, create from existing test
plan, etc. in the open window, and click on "create tab".

Step 4: Guru 99 Test Plan is created successfully


Build Creation
Build is a specific release of software
Step 1: Click on Builds/Releases under Test Plan from the home page

Step 2: In the next window, fill all necessary details for software release and click on create
to save your release
1. Enter the title name
2. Enter the description about the software release
3. Mark the check-box for status- Active
4. Mark the check-box for status- Open
5. Choose the data of release
6. Click on create button
Once you have a release the software it, will appear like this

Creating Test suite


Test suite is a collection of test cases which may be testing or validating the same
component. Following steps will explain how to create test suite for your project.

Step 1: Click on test specification option from the home page.

Step 2: On the right-hand side of the panel, click on the setting icon It will display a
series of test operation.
Step 3: Click on the "create" tab for the test suite

Step 4: Fill-up all the details for test-suite and click on save it tab.
1. Enter the test suite name
2. Enter the details about your test suite
3. Click on save button to save the details of test-suite

You can see test suite for Guru 99 is created

Your test suite appears on the left side of the panel under folder structure tree
Creating a Test Case
Test case holds a sequence of test steps to test a specific scenario with expected result.
Below steps will explain how to create a test-case along with test steps.

Step 1: Click on the test suite folder on the left side of the panel under folder tree structure

Step 2: Click on the setting icon in the right side panel. List of test case operations will be
displayed on the right side panel

Step 3: New window will open, to create test cases click on create button in test-case
operations

Step 4: Enter the details in the test case specification page


Step 5: After entering the details, click on "create" button to save the details. The test-case
for Guru99 is created successfully

Step 6: Click on test-case from the folder as shown above, it will open a window. Click on
"create steps" button in test case. It will open a test case step editor
Step 7: It will open another window on the same page, in that window you have to enter the
following details
1. Enter the step-action for your test case
2. Enter the details about the step action
3. Click save it and add another step action OR click save and exit tab if there is no
more test step toad

Step 8: Once you save and exit the test step, it will appear like this
Assigning test case to test plan
For test case to get execute, it should be assign to test plan. Here we will see how we can
assign a test-case to test plan.

Step 1) Click on the setting icon on the test panel. It will show the list of operations.
Step 2) Click on "Add to Test Plans".

Step 3) New window will open, search your project "Guru99"


1. Mark the check box against your test plan
2. Click on add button
This will add your test case to your Test Plan.

Creating Users and Assigning Roles in Test Link


Test link provides User management and authorization features. Below is list of default roles
in Test link and their rights –

Role Test Cases Test Metrics


Guest View View
Tester Execute View
Senior Tester Edit & Execute View
Leader & Admin Edit & Execute Edit & Execute

Step 1: From the Test links home-page, click on users/roles icon from the navigation bar

Step 2: Click Create


Step 3: Fill out all the users details and click the "Save" button

Here in the list we can see the users have been created

Step 4: Allotting test project role to the user,


1. Click on "Assign Test Project Roles" tab
2. Choose the project name
3. Select the users role from the drop down
Writing Requirements:
Step 1: From the navigation bar select the "Requirements Link", it opens the Requirement
page.

Step 2: From the requirement page, on the right side of the panel click on "create" button

Step 3: A new window will open, enter all the details like
1. Document ID
2. Title name
3. Requirement description
4. And Click "Save" button
For the type, you can choose the option from the drop-down- here we chose "User
Requirement Specification"

Step 4: It should create Requirement specification and displayed on the left side panel
under project "Guru99".

Step 5: Select the setting button from requirements specification home-page. It will open
another window.

Step 5: Click "Create" tab under Requirement Operations.

Step 6: Fill out all the specified details and click the "Save" button
1. Enter the document ID
2. Enter the title name
3. Enter the description
4. Enter the status-whether it's in draft, rework, review, not testable, etc. Here we
chose valid
5. Enter the type – user interface, non-functional, informational, feature, etc. Here we
chose use case
6. Enter the number of test cases needed
7. Enter "Save" button at the end

Note: To add more requirements you can mark the check-box and click save button

On the left side of the panel, we can see that requirement is added.
Assigning requirement to test-cases

In Test link, Requirement can be connected to test cases. It is very crucial feature in order to
track test coverage based on requirements. In test reports, you can verify which
requirements are not covered and act on them to append in test suites for maximum test
coverage

Step 1: From test specification section open any single test case and click on requirement
icon
Step 2: To assign requirements specification to test case you have to follow the following
steps
1. Scroll the drop down box to select the requirements specification
2. Mark the requirement check box
3. Click on "assign" tab
After clicking on "assign" tab, a window will appear stating "Assigned Requirement."

Executing a test case


In Test Link, we can run a test case and change execution status of a test case. Status of a
test-case can be set to "blocked" "Passed", or "failed". Initially, it will be in "not run" status
but once you have updated it, it cannot be altered to "not run" status again.

Step 1: From the navigation bar click on the "Test Execution" link. It will direct you to the
Test Execution Panel.
Step 2: Pick the Test case you want to run from the left side panel

Step 3: Once you have selected the test cases, it will open a window.

Step 4: Follow the following steps


1. Enter the notes related to test case executed
2. Select its status
Step 5: On the same page, you have to fill similar detail about the execution of test-case. Fill
the details, select the status and then click on "save execution".

Generating Test Reports


Test link supports various test report formats like
• HTML
• MS Word
• MS excel
• OpenOffice Writer
• OpenOffice calc

Step 1: From the navigation bar, click on Test Reports option

Step 2: From the left side panel, select "Test Report" link
Step 3: To generate a report follow the following steps
1. Mark and unmark the option you want to highlight in your test report
2. Click on your project folder

The test report will look like this

Export Test case/ Test Suite


Test link provides the features to export test projects/test suites in your Test link and then
you can import them into another Test link project on different server or system. In order to
do that you have to follow the following steps

Step 1: Choose the test case you want to export in the Test specification page.
Step 2: Now on the right-hand side of the panel click on the setting icon, it will display
all the operations that can be performed on the test case.
Step 3: Click the "export" button

Step 4: It will open another window, mark the option as per requirement and click on the
export tab

Following XML is generated


Importing Test case/ Test suite
Step 1: Select the Test suite folder inside which you want to import the test case

Step 2: Click on the setting icon on the right hand-side of the panel, it will display all
the operations that can be executed on the test suite/test case.
Step 3: Click on the import button in the test case operations list as

Step 4: Browse and attach the xml test case file that you have exported from test link and
click on upload button.
1. Use the browse option to attach the XML test case file that you have exported from
test link
2. Click on upload file
When you upload a file, it will open window stating import test cases

Step 5: Test case will be uploaded and displayed on the right-hand side of the panel

You might also like