• No results found

Testing Lab List of ExperimentsTesting Lab List of Experiments

Testing Lab List of Experiments

1.

1. Write programs inWrite programs in CCLanguagLanguage to demonstrate the working of the folle to demonstrate the working of the followingowing a.

a. constructs: i) do...while ii) whileconstructs: i) do...while ii) while….….do iii) if do iii) if ……else iv) switch v) forelse iv) switch v) for 2.

2. ―A―A program written inprogram written in CClanguage for Matrix Multiplication failslanguage for Matrix Multiplication fails‖‖ Introspect theIntrospect the causes for its failure and

causes for its failure and write down the possible reasons for its failure.write down the possible reasons for its failure.

3.

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

the various bugs.

4.

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

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

6. Study of any testing tool (e.g. WStudy of any testing tool (e.g. Win runner)in runner) 7.

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

8. Study of any bug tracking tool (e.g. Bugzilla, bugbit)Study of any bug tracking tool (e.g. Bugzilla, bugbit) 9.

9. Study of any test management tool (e.g. Test Director)Study of any test management tool (e.g. Test Director) 10.

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

1.

1. Write a „c‟ program to demonstrate the working of the fallowing constructs:Write a „c‟ program to demonstrate the working of the fallowing constructs:

i) do…

i) do…while ii) while ii) while…do while…do iii) if iii) if …else …else iv) siv) switch witch vv) for Loops in C language) for Loops in C language  //A. AIM: To demonstrate the working of do..while construct

 //A. AIM: To demonstrate the working of do..while construct Objective

Objective

To understand the working of do while with different range of values and test cases To understand the working of do while with different range of values and test cases

#include <stdio.h>

#include <stdio.h>

void main (){

void main (){

int i, n=5,j=0;

int i, n=5,j=0;

clrscr();

clrscr();

 printf(―enter 

 printf(―enter a noa no‖);‖);

sscanf(―%d‖,&i);canf(―%d‖,&i);

do{

do{

if(i%2==0) { if(i%2==0) {

printf("%d", i);

printf("%d", i);

printf("is a even no.");

printf("is a even no.");

i++;

i++;

 j++;

 j++;

} } else { else {

printf("%d", i);

printf("%d", i);

printf("is a odd no.\n");

printf("is a odd no.\n");

i++;

i++;

 j++;

 j++;

} } }while(i>0&&j<n);

}while(i>0&&j<n);

getch();

getch();

} } Input

Input Actual Actual outputoutput 2

2 2 2 is is even even numbernumber 3 is odd number 3 is odd number 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 cases:

Test cases:

Test case no: 1 Test case no: 1 Test case name

Test case name: Positive values within range: Positive values within range Input

Input =2 =2 Expected output Expected output Actual Actual output output RemarksRemarks 2

Test case name: Negative values within a rangeNegative values within a range Input

Input = = -2 -2 Expected Expected output output Actual Actual output output RemarksRemarks -2

Test case name: Out of range values testingOut of range values testing Input

Input Expected Expected output output Actual Actual output output RemarksRemarks 123456789122

1234567891222222222222 2222222222 123456789122123456789122222222213 222222213 234567891222234567891222222215 222215 failfail  //B. Aim:To demonstrate the working of while construct

 //B. Aim:To demonstrate the working of while construct

Objective Objective

To understand the working of while with different range of values and test cases To understand the working of while with different range of values and test cases

#include<stdio.h>

 printf(―enter a noa no‖);‖);

sscanf(―%d‖,&i);canf(―%d‖,&i);

else{

Input Actual Actual outputoutput 2

Test case name: Positive values within range: Positive values within range Input

Input =2 =2 Expected output Expected output Actual Actual output output RemarksRemarks 2

Test case name: Negative values within a rangeNegative values within a range Input

Input = = -2 -2 Expected Expected output output Actual Actual output output RemarksRemarks -2

Test case name: Out of range values testingOut of range values testing Input

Input Expected Expected output output Actual Actual output output RemarksRemarks 123456789122

1234567891222222222222 2222222222 123456789122123456789122222222213 222222213 234567891222234567891222222215 222215 failfail

 //C. Aim: To demonstrate the working of if else construct  //C. Aim: To demonstrate the working of if else construct

Objective Objective

To understand the working of if else with different range of values and test cases To understand the working of if else with different range of values and test cases

#include<stdio.h>

Input Actual Actual outputoutput 2

Test case name: Positive values within range: Positive values within range Input

Input =2 =2 Expected output Expected output Actual Actual output output RemarksRemarks 2

Test case no:2 Test case no:2 Test case name:

Test case name: Negative values within a rangeNegative values within a range Input

Input = = -2 -2 Expected Expected output output Actual Actual output output RemarksRemarks -2

Test case name: Out of range values testingOut of range values testing Input

Input Expected Expected output output Actual Actual output output RemarksRemarks 123456789122

1234567891222222222222 2222222222 123456789122123456789122222222213 222222213 234567891222234567891222222215 222215 failfail  // D. To demonstrate the working of switch construct

 // D. To demonstrate the working of switch construct Objective

Objective

To understand the working of switch with different range of values and test cases To understand the working of switch with different range of values and test cases void main() {

 printf(―1.Add/n 2.Sub /n 3.Mul /n 4.Div /n Enter Yo/n 3.Mul /n 4.Div /n Enter Your choice‖);ur choice‖);

scanf(―%d‖ , &i);

Output:

Output:

Input Output

Input Output

Enter Ur choice: 1 Enter Ur choice: 1 Enter

Enter a, a, b b Values: Values: 3, 3, 2 2 The The sum sum of of a a & & b b is:5is:5 Enter Ur choice: 2

Enter Ur choice: 2 Enter

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

Enter Ur choice: 3 Enter

Enter a, a, b b Values: Values: 3, 3, 2 2 The The Mul Mul of of a a & & b b is: is: 66 Enter Ur choice: 4

Enter Ur choice: 4 Enter

Enter a, a, b b Values: Values: 3, 3, 2 2 The The Div Div of of a a & & b b is: is: 11 Test cases:

Test cases:

Test case no: 1 Test case no: 1 Test case name

Test case name: Positive values within range: Positive values within range Input

Input Expected Expected output output Actual Actual output output RemarksRemarks Enter Ur choice: 1

Enter Ur choice: 1 Enter

Enter a, a, b b Values: Values: 3, 3, 2 2 The The sum sum of of a a & & b b is:5 is:5 55 Enter Ur choice: 2

Enter Ur choice: 2 Enter

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

Enter Ur choice: 3 Enter

Enter a, a, b b Values: Values: 3, 3, 2 2 The The Mul Mul of of a a & & b b is: is: 6 6 66 Enter Ur choice: 4

Enter Ur choice: 4 Enter

Enter a, a, b b Values: Values: 3, 3, 2 2 The The Div Div of of a a & & b b is: is: 1 1 11 Test case no:2

Test case no:2 Test case name:

Test case name: Out of range values testingOut of range values testing Input

Input Expected Expected output output Actual Actual output output RemarksRemarks Option: 1

Option: 1

a= 22222222222222 a= 22222222222222 b=22222222222

b=22222222222222 222 44444444444444444444444444 44 -2 -2 failfail

Test case no: 3 Test case no: 3 Test case name:

Test case name: Divide by zeroDivide by zero Input

Input Expected Expected output output Actual Actual output output RemarksRemarks Option: 4

Option: 4 a=

a= 10 10 & & b=0 b=0 error error failfail

 // E. Aim: To demonstrate working of for construct  // E. Aim: To demonstrate working of for construct

Objective Objective

To understand the working of for with different range of values and test cases To understand the working of for with different range of values and test cases

#include <stdio.h>

 printf(― is a even no‖);

 printf(― is a even no‖);

i++;

Test cases:

Test cases:

Test case no: 1 Test case no: 1 Test case name

Test case name: Positive values within range: Positive values within range Input

Input =2 =2 Expected output Expected output Actual Actual output output RemarksRemarks 0

Test case name: Negative values within a rangeNegative values within a range Input

Input = = -2 -2 Expected Expected output output Actual Actual output output RemarksRemarks 0

Test case name: Out of range values testingOut of range values testing Input

Input Expected Expected output output Actual Actual output output RemarksRemarks 123456789122

1234567891222222222222 2222222222 123456789122123456789122222222213 222222213 234567891222234567891222222215 222215 failfail 2. Aim:

2. Aim: A program written in c lA program written in c language for matrix multiplication fails “Introspeanguage for matrix multiplication fails “Introspect thect the causes for its fa

causes for its failure and write down the possible reasons for its failure”.ilure and write down the possible reasons for its failure”.

Objective: Understand the failures of matrix multiplication Objective: Understand the failures of matrix multiplication

#include<stdio.h>

 printf(― Enter 1stst matrix nmatrix no.of rows & cols‖)o.of rows & cols‖) scanf(―%d%d‖,&m,&n);

scanf(―%d%d‖,&m,&n);

 printf(― Enter 2

 printf(― Enter 2ndnd matrix no.of rows & cols‖)matrix no.of rows & cols‖) scanf(―%d%d‖,&p,&q);

scanf(―%d%d‖,&p,&q);

printf("\n enter the matrix elements");

printf("\n enter the matrix elements");

for(i=0;i<m;i++);

for(i=0;i<m;i++)

Output:

Output:

Enter

Enter Matrix1: Matrix1: 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 Enter M

Enter Matrix2: atrix2: 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1

Actual O

Actual Output : utput : 3 3 3 3 33 3 3 3 3 3 3 3 3 3 3 3 3 Test cases:

Test cases:

Test case no: 1 Test case no: 1 Test case name

Test case name: Equal no.of rows & cols: Equal no.of rows & cols Input

Input Expected Expected output output Actual Actual output output RemarksRemarks Matrix1 rows & cols= 3 3

Matrix1 rows & cols= 3 3 Matrix2 rows & cols= 3 3 Matrix2 rows & cols= 3 3 Matrix1:

Matrix1: 1 1 1 1 11 1

1 1 1 1 1 3 3 3 3 3 3 3 3 3 3 33 1

1 1 1 1 1 3 3 3 3 3 3 3 3 3 3 3 3 SuccessSuccess 3

3 3 3 3 3 3 3 3 3 33 Matrix2:

Matrix2: 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 Test case no:2 Test case no:2 Test case name:

Test case name: Cols of 1Cols of 1stst matrix not equal to rows of 2matrix not equal to rows of 2ndnd matrixmatrix Input

Input Expected output Expected output Actual Actual output output RemarksRemarks Matrix1

Matrix1 rows rows & & cols= cols= 2 2 2 2 Operation Operation Can‘t Can‘t bebe failfail Performed

Performed Matrix2 rows & cols= 3 2

Matrix2 rows & cols= 3 2 Test case no: 3

Test case no: 3 Test case name:

Test case name: Out of range values testingOut of range values testing Input

Input Expected Expected output output Actual Actual output output RemarksRemarks

1234567891

1234567891 2222222222 2222222222 failfail

2234567891 2222222221

3. Aim: Take any Aim: Take any system (e.g. ATM system (e.g. ATM system) and study its system system) and study its system specifications and reportspecifications and report the various bugs.

the various bugs.

1. Machine is accepting ATM card.

1. Machine is accepting ATM card.

2. Machine is rejecting expired 2. Machine is rejecting expired card.card.

3. Successful entry of PIN

3. Successful entry of PIN number.number.

4. Unsuccessfu

4. Unsuccessful operation due to enter wrong PIN number 3 l operation due to enter wrong PIN number 3 times.times.

5. Successful selection of

5. Successful selection of language.language.

6. Successful selection of account type.

6. Successful selection of account type.

7. Unsuccessful operation due to invalid account type.

7. Unsuccessful operation due to invalid account type.

8. Successful selection of amount to be

8. Successful selection of amount to be withdrawn.withdrawn.

9. Successful withdrawal.

9. Successful withdrawal.

10. Expected message due to amount is greater than day limit.

10. Expected message due to amount is greater than day limit.

11. Unsuccessful withdraw operation due to lack of

11. Unsuccessful withdraw operation due to lack of money in ATM.money in ATM.

12. Expected message due to amount to wit

12. Expected message due to amount to withdraw is greater than possible balance.hdraw is greater than possible balance.

13. Unsuccessful withdraw operation due to click cancel after

13. Unsuccessful withdraw operation due to click cancel after insert card.insert card.

4. Write the test cases for any known application (e.g. Banking application) 4. Write the test cases for any known application (e.g. Banking application) 1. Checking mandatory input

1. Checking mandatory input parametersparameters 2. Checking optional input parameters 2. Checking optional input parameters 3. Check whether able to

3. Check whether able to create account entity.create account entity.

4. Check whether you are able

4. Check whether you are able to deposit an amount in to deposit an amount in the newly created account (and thus upthe newly created account (and thus up dating the balance)

dating the balance) 5.Check

5.Check whether you are able to withdrawhether you are able to withdraw an amount in the newly created acw an amount in the newly created account (after depocount (after depo sit) (and thus updating the

sit) (and thus updating the balance)balance)

6.Check whether company name and its pan number and other

6.Check whether company name and its pan number and other details are provided in case of details are provided in case of  salary account

salary account

7.Check whether primary account number is provided in case of

7.Check whether primary account number is provided in case of secondary accounsecondary accountt 8.Check whether company details are provided in cases of company's current account 8.Check whether company details are provided in cases of company's current account 9.Check whether proofs for joint account is

9.Check whether proofs for joint account is provided in case of joint provided in case of joint accountaccount 10.Check whether you are able depo

10.Check whether you are able deposit an account in the name of either of sit an account in the name of either of the person in an jointthe person in an joint account.

account.

11. Check whether you are able withdraw an account in the name of either of the

11. Check whether you are able withdraw an account in the name of either of the person in anperson in an  joint account.

 joint account.

12. Check whether you are able to

12. Check whether you are able to maintain zero balance in salary accountmaintain zero balance in salary account

13.Check whether you are not able to maintain zero balance (or mini balance) in non-salary 13.Check whether you are not able to maintain zero balance (or mini balance) in non-salary

account.

account.

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

The Library Management System is an online application for

The Library Management System is an online application for assisting a librarian imanagingassisting a librarian imanaging book library in a

book library in a University. The system would provide basic set of University. The system would provide basic set of features to add/updatefeatures to add/update clients, add/update books, search for books, and manage check-in / checkout processes. Our clients, add/update books, search for books, and manage check-in / checkout processes. Our test group tested the s

test group tested the system based on the requirement specificationystem based on the requirement specification..

This test report is the result for

This test report is the result for testing in the LMS. It mainly focuses on two problemstesting in the LMS. It mainly focuses on two problems 1.

1. what we will testwhat we will test 2.

2. how we will test.how we will test.

3.

3. GUI testGUI test

Pass criteria: librarians could use this GUI to interface with

Pass criteria: librarians could use this GUI to interface with the backend library databasethe backend library database without any difficulties

without any difficulties 4.

4. Database testDatabase test

Pass criteria: Results of all basic and advanced operations are normal (refer to section 4) Pass criteria: Results of all basic and advanced operations are normal (refer to section 4) 5.

5. Basic function testBasic function test Add a student

Add a student

Each customer/studeEach customer/student should have following attrint should have following attributes: Student ID/SSN (unique), Name,butes: Student ID/SSN (unique), Name, Address and Phone number.

Address and Phone number.

The retrieved customer information by viewing customer detail

The retrieved customer information by viewing customer detail should contain the four at-should contain the four at-tributes.

tributes.

6.

6. Update/delete studentUpdate/delete student

The record would be selected using the student The record would be selected using the student IDID

Updates Updates can be macan be made on full. Ide on full. Items only: Natems only: Name, Addressme, Address, Phone n, Phone number umber The record The record can becan be deleted if there are no books issued by user. The updated values would be reflected if the same deleted if there are no books issued by user. The updated values would be reflected if the same customer's ID/SSN is called for.

customer's ID/SSN is called for.

7.

7. Check-in bookCheck-in book

Librarians can check in a book

Librarians can check in a book using its call numberusing its call number

The check-in can be initiated from The check-in can be initiated from a previous search operation where user has selected a a previous search operation where user has selected a setset of books.

of books.

The return date would automatically reflect the The return date would automatically reflect the current system date.current system date.

Any late fees would be computed as difference between due date and return date at rate of 10Any late fees would be computed as difference between due date and return date at rate of 10 cents a day.

cents a day.

Experiment 6 Experiment 6

Aim: Study of Any Testing Tool( WinRunner) Aim: Study of Any Testing Tool( WinRunner)

WinRunner is a program that is responsible for the automated testing of software.

WinRunner is a program that is responsible for the automated testing of software.

WinRunner is a Mercury Interactive‘s enterprise

WinRunner is a Mercury Interactive‘s enterprise functional testing tool for Microsoft windowsfunctional testing tool for Microsoft windows applications.

applications.

Importance of Automated Testing:

Importance of Automated Testing:

1.

1. Reduced testing timeReduced testing time 2.

2. Consistent test proceduresConsistent test procedures –  – ensure process repeatability and ensure process repeatability and resource independence.resource independence.

Eliminates errors of manual testing Eliminates errors of manual testing 3.

3. Reduces QA costReduces QA cost –  – Upfront cost of automated testing is easily recovered over the life-Upfront cost of automated testing is easily recovered over the life-time of the product

time of the product 4.

4. Improved testing productivityImproved testing productivity –  – test suites can be run earlier and more oftentest suites can be run earlier and more often 5.

5. Proof of adequate testingProof of adequate testing 6.

6. For doing Tedious work For doing Tedious work  –  – test team members can focus on test team members can focus on quality areas.quality areas.

WinRunner Uses:

WinRunner Uses:

1.

1. With WinRunner sophisticated automated tests can be created and run With WinRunner sophisticated automated tests can be created and run on an application.on an application.

2.

2. A series of wizards will be provided to the user, and tA series of wizards will be provided to the user, and these wizards can create tests in anhese wizards can create tests in an automated manner.

automated manner.

3.

3. Another impressive aspect of WinRunner is the Another impressive aspect of WinRunner is the ability to record various interactions, andability to record various interactions, and transform them into scripts. W

transform them into scripts. WinRunner is designed for testing graphical user interfaces.inRunner is designed for testing graphical user interfaces.

4.

4. When the user make an interaction with the GUI, this interaction can be recorded. Re-When the user make an interaction with the GUI, this interaction can be recorded. Re-cording the interactions allows to determine various bugs that need to be fixed.

cording the interactions allows to determine various bugs that need to be fixed.

5.

5. When the test is cWhen the test is completed, WinRunneompleted, WinRunner will provide r will provide with detailed information regwith detailed information regard- ard-ing the re

ing the results. It will shsults. It will show ow the errors thathe errors that were foundt were found, and it will , and it will also give also give importantimportant information about them. The good news about these tests

information about them. The good news about these tests is that tis that they can be reused manyhey can be reused many times.

times.

6.

6. WinRunner will test the computer program in a way that is verWinRunner will test the computer program in a way that is ver y similar to normal usery similar to normal user

6. WinRunner will test the computer program in a way that is verWinRunner will test the computer program in a way that is ver y similar to normal usery similar to normal user

Related documents