You are on page 1of 8

Product name: Desicision Statement Test Designed date: 11/21/2022

Test designed by: Pratiksha Jadhav Test Executed by: Pratiksha Jadhav
Module name: if() Test Executed date: 11/21/2022

Testcase ID Test Scenario Test case Pre-condition Test steps Test data Expected result Actual result Status
Verifying the if In if() pass a Use positive numbers. 1)Type a simple If(){} block should The if(){} block
decision statement. condition which is if() statement. a=10 execute. was only executed.
true and check the 2)Pass any true b=5
TC 01 results. condition in if(). (a>b) Pass
3)Execute the
code.

Verifying the if In if() pass a Use positive numbers. 1)Type a simple a=10 If(){} block should not Nothing happened,
decision statement. condition which is if() statement. b=5 execute. the if(){} block was
false, execute the 2)Pass any true (a<b) not executed.
TC 02 code and then check condition in if(). Pass
the results. 3)Execute the
code.

Verifying the if In if() pass any Use different 1)Type a simple Error should occure. Error like: " '>' not
decision statement. invalid condition, datatypes. if() statement. a="abc" supported in 'str'
execute the code and 2)Pass any true b=5 and 'int'. " came.
TC 03 then check the condition in if(). (a>b) Pass
results. 3)Execute the
code.

Verifying the if In if() pass no Use bug free compiler. 1)Type a simple lang:python if(){} should not Nothing happened,
decision statement. condition and then if() statement. execute. the if(){} block was
check the results or 2)Pass no not executed.
TC 04 output of the code. condition in if(). Pass
3)Execute the
code.

Verifying the if In if() use variables Use error free 1)Type a simple Error is expected. Error like: " 'a' is
decision statement. with no values and compiler. if() statement. a; not defined " came.
then execute the 2)Declare two b;
code. Use variables variables. (a>b)
TC 05 which are only 2)Pass any Pass
declared and not condition in if().
defined. 3)Execute the
code.
Product name: Desicision Statement Test Designed date: 11/21/2022
Test designed by: Mr Prathmesh Sawant Test Executed by: Mr Prathmesh Sawant
Module name: if-else Test Executed date: 11/21/2022

Testcase ID Test Scenario Test case Pre-condition Test steps Test data Expected result Actual result Status
Verifying the if - else In if-else statement, in Use positive numbers. 1)Type a simple if- lang:python If(){} block should The if(){} block was
decision statement if() pass a condition else statement. a=10 execute. only executed.
which is true and 2)Pass any true b=5
TCP01 check the results. condition in if(). (a>b) Pass
3)Execute the
code.

Verifying the if - else In if-else statement, in Use positive numbers. 1)Type a simple if- lang:python else{} block should be The else{} block was
decision statement if() pass a condition else statement. a=10 execute. executed instead of
which is false, execute 2)Pass any false b=5 if(){}
TCP02 the code and then condition in if(). (a<b) Pass
check the results. 3)Execute the
code.

Verifying the if - else In if-else statement, in Use different datatypes. 1)Type a simple if- lang:python Error should occure. Error like: " '>' not
decision statement if() pass any invalid else statement. a="abc" supported in 'str' and
condition, execute the 2)Pass any invalid b=5 'int'. " came.
TCP03 code and then check condition in if(). (a>b) Pass
the results. 3)Execute the
code.

Verifying the if - else In if-else statement, in Use bug free compiler. 1)Type a simple if- lang:python if(){} should not execute. The else{} block was
decision statement if() pass no condition else statement. executed instead of
and then check the 2)Pass no condition if(){}
TCP04 results or output of in if(). Pass
the code. 3)Execute the
code.

Verifying the if - else In if-else statement, in Use error free compiler. 1)Type a simple if- lang:python Error is expected. Error like: " 'a' is not
decision statement if() use variables with else statement. a; defined " came.
no values and then 2)Declare two b;
execute the code. Use variables. (a>b)
variables which are 2)Pass any
TCP05 only declared and not condition in if(). Pass
defined. 3)Execute the
code.
Product name: Desicision Statement Test Designed date: 11/21/2022

Test designed by: Mr Prathmesh Sawant Test Executed by: Mr Prathmesh Sawant
Module name: else if Test Executed date: 11/21/2022

Testcase ID Test Scenario Test case Pre-condition Test steps Test data Expected result Actual result Status
Verifying the else if Use a true condition Use positive numbers. 1)Type a simple lang:python If(){} block should The if(){} block was
decision statement. in if() statement and else-if statement. a=30 b=20 c=10 execute. only executed, no
execute the code. 2)Pass any true (a>b) further block was
TCP01 condition in if(). (a>c) executed. Pass
3)Execute the
code.

Verifying the else if Use a true condition Use positive numbers. 1)Type a simple lang:python elif(){} block should be The elif(){} block was
decision statement. in elif() statement and else-if statement. a=30 b=20 c=10 execute. executed only, if(){}
false condition in if() 2)Pass any true (a<b) block was not
and execute the code. condition in elif() (a>c) executed.
and false condition
TCP02 in if(). Pass
3)Execute the
code.

Verifying the else if In both if() and elif() Use error free compiler. 1)Type a simple lang:python Else block should The else{} block was
decision statement. pass false conditions. else-if statement. a=30 b=20 c=10 execute. executed only, if()
2)Pass false (a>b) and elif() was not
condition in if() (a>c) executed.
TCP03 and elif(). Pass
3)Execute the
code.

Verifying the else if In if() and elif() Use bug free compiler. 1)Type a simple lang:python Error is expected. Error like: " 'a' is not
decision statement. statement, pass any else-if program. a; b; c; defined " came.
condition with 2)Use un-defined (a>b)
variables having no values in if() and (a>c)
TCP04 values.Use variables elif(). Pass
which are declared 3)Execute the
only and not defined. code.

Verifying the else if In if-else statement, in Use error free compiler. 1)Type a simple lang:python Error is expected. Error like: " '>' not
decision statement. if() use variables with else-if program. a="sa" b=20 c=10 supported in 'str' and
diferent datatypes 2)Define any (a<b) 'int'. " came.
and execute the code. variable in string (a>c)
type.
2)Pass any
TCP05 condition in if() Pass
and elif().
3)Execute the
code.
Product name: Desicision Statement Test Designed date: 11/21/2022
Test designed by: Mr Prathmesh Sawant Test Executed by: Mr Prathmesh Sawant
Module name: if-else ladder Test Executed date: 11/21/2022

Testcase ID Test Scenario Test case Pre-condition Test steps Test data Expected result Actual result Status
Verifying the if - else In the nested if else Use python language. 1)Type a simple lang:python The if-if block should The if-if block/branch
ladder decision add a condition where nested if-else a=10,b=11 execute. was executed only.
statement the if() block which if ststement. if(a<b):
inside of another if() 2)pass a condition if(a<b):
will only execute.And which will execute else:
TCP01 then run the code and only if-if block else: Pass
check for results. 3)Execute the if(a<b):
program. else:

Verifying the if - else In the nested if else Use python language. 1)Type a simple lang:python The if-else block should The if-else
ladder decision add a condition where nested if-else a=10,b=11 execute. block/branch was
statement the if() block which if ststement. if(a<b): executed only.
inside of another 2)pass a condition if(a>b):
else{} will only which will execute else:
execute.And then run only if-else block else:
TCP02 the code and check 3)Execute the if(a<b): Pass
for results. program. else:

Verifying the if - else In the nested if else Use python language. 1)Type a simple lang:python The else-if block should The else-if
ladder decision add a condition where nested if-else a=10,b=11 execute. block/branch was
statement the else{} block which ststement. if(a>b): executed only.
if inside of another if() 2)pass a condition if(a<b):
will only execute.And which will execute else:
TCP03 then run the code and only else-if block else: Pass
check for results. 3)Execute the if(a<b):
program. else:

Verifying the if - else In the nested if else Use python language. 1)Type a simple lang:python The else-else block The else-else
ladder decision add a condition where nested if-else a=10,b=11 should execute. block/branch was
statement the else{} block which ststement. if(a>b): executed only.
if inside of another if() 2)pass a condition if(a<b):
will only execute.And which will execute else:
then run the code and only else-else block else:
TCP04 check for results. 3)Execute the if(a>b): Pass
program. else:
Product name: Control Statement Test Designed date: 11/21/2022

Test designed by: Pratiksha Jadhav Test Executed by: Pratiksha Jadhav
Module name: do-while Test Executed date: 11/21/2022

Testcase ID Test Scenario Test case Pre-condition Test steps Test data Expected result Actual result Status
Verifying the do-while Write a simple do- Use nodeJS as compiler 1)Type a do-simple lang:JavaScript The statements in do{} The do{} block was
control looping while loop, keep all while statement. let i=1 should execute. executing.
statement expressions correct 2)Set correct initial do{
like initilization counter, condition, ____
counter, condition, update counter. i++
TCP01 update counter. And 3)Execute the }while(i<5); Pass
then execute the program.
program.

Verifying the do-while Write a simple do- Use nodeJS as compiler 1)Type a do-simple lang:JavaScript The statements in do{} The do{} block was
control looping while loop, but while statement. let i=1 should execute. executing infinite
statement remove the update 2)Remove the do{ times with no break.
counter written in the update counter ____
do{} block and then to inside of do{} }while(i<5);
TCP02 execute the code and block. Pass
check the results. 3)Execute the
program.

Verifying the do-while Write a simple do- Use nodeJS as compiler 1)Type a do-simple lang:JavaScript The statements in do{} The do{} block was
control looping while loop, but set the while statement. let i=1 should execute. executing infinite
statement update counter 2)Set incorrect do{ times with no break.
wrong, written in the update counter ____
do{} block and then to inside of do{} i--
TCP03 execute the code and block. }while(i<5); Pass
check the results. 3)Execute the
program.

Verifying the do-while Firstly write a simple Use nodeJS as compiler 1)Type a do-simple lang:JavaScript Error is expected. Error like: " variable
control looping do-while loop, but set while statement. //let i=1 'I' is not initilized"
statement the initial counter 2)Remove the do{ came.
wrong, written initial counter ____
outside the do-while() outside of do-while i++
TCP04 and then to execute block. }while(i<5); Pass
the code and check 3)Execute the
the results. program.
Product name: Control Statement Test Designed date: 11/21/2022

Test designed by: Mr Prathmesh Sawant Test Executed by: Mr Prathmesh Sawant
Module name: for Test Executed date: 11/21/2022

Testcase ID Test Scenario Test case Pre-condition Test steps Test data Expected result Actual result Status
Verifying the for control In for() loop set all Use nodeJS compiler. 1)Type a simple for for(let i=0;i<5;i++){} Statements in the for(){} The for block was
looping statement three header loop. block should execute. executed.
expression correct 2)Set a initial
and then check the counter, condition,
execution of for loop update counter.
TCP01 and check results. 3)Execute the Pass
program.

Verifying the for control In the for loop use Use nodeJS compiler. 1)Type a simple for for(let i=-2;i<5;i++){} Statements in the for(){} The block was
looping statement negative value inintial loop. block should execute. executed even the
counter and then 2)Use negative negative values in
check the execution values in counter were used.
of loop. initilization
TCP02 counter. Pass
3)Execute the
program.

Verifying the for control In the for loop skip Use nodeJS compiler. 1)Type a simple for for(let i=0;i<5;){} Statements in the for The for block was
looping statement the third expression loop. block should execute. executed infinite
which is update 2)Skip the third time.
counter. Now expression, the
TCP03 ecxecute the code update counter. Pass
and check the result. 3)Execute the
program.

Verifying the for control In the for loop set a Use nodeJS compiler. 1)Type a simple for for(let i=0;i<5;i--){} Statements in the for The for block was
looping statement wrong update counter loop. block should execute. executed infinite
(i--) and then then 2)Set awrong time.
execute try to code update counet in
TCP04 and check the results. for loop. Pass
3)Execute the
program.

Verifying the for control In the for loop use Use nodeJS compiler. 1)Type a simple for for(let i=0;i>5;i++){} Statements in the for The condition was
looping statement specify a wrong loop. block shouldn't execute. wrong so the block
condition and then try 2)Set a wong didn't executed.
to execute the code condition in the
TCP05 and check the for() loop. Pass
results/output. 3)Execute the
program.
Product name: Control Statement Test Designed date: 11/21/2022
Test designed by: Mr Prathmesh Sawant Test Executed by: Mr Prathmesh Sawant
Module name: switch case Test Executed date: 11/21/2022

Testcase ID Test Scenario Test case Pre-condition Test steps Test data Expected result Actual result Status
Verifying the switch Write a simple switch Use nodeJS as compiler 1)Type a simple lang:nodeJS The respective case 1 The switch->case 1
decision making program without any switch statement. let i=1; should execute with no was executed.
statement symntax errors and 2)Write different switch(i){ errors.
execute it. cases. case 1:____
3)Pass value in case 2:____
TCP01 switch(). } Pass
4)Execute the
program.

Verifying the switch In switch() statement Use nodeJS as compiler 1)Type a simple lang:nodeJS No case should execute. Nothing happened,
decision making pass a value which is switch statement. let i=10; the switch() was not
statement not written in any of 2)Pass invalid value switch(i){ executed.
cases _: and then in switch. case 1:____
TCP02 execute the code and 3)Execute the case 2:____ Pass
check the results. code. }

Verifying the switch In switch() statement Use nodeJS as compiler 1)Type a simple lang:nodeJS The default case should The default case was
decision making add a default case and switch statement let i=10; execute. only executed.
statement then pass a value with default case switch(i){
which is not written in present in it. case 1:____
any of cases _: and 2)Pass invalid value case 2:____
TCP03 then execute the in switch. default:____ Pass
code and check the 3)Execute the }
results. code.

Verifying the switch In switch() statement Use nodeJS as compiler 1)Type a simple lang:nodeJS All cases should execute. Every case block was
decision making remove the 'break;' switch statement let i=1; executing.
statement statement from every without any break; switch(i){
case _: block and then statement. case 1:____
execute the code and 2)Pass a valid value case 2:____
check the results. in switch. }
TCP04 3)Execute the Pass
code.
Product name: Control Statement Test Designed date: 11/21/2022
Test designed by: Mr Prathmesh Sawant Test Executed by: Mr Prathmesh Sawant
Module name: while Test Executed date: 11/21/2022

Testcase ID Test Scenario Test case Pre-condition Test steps Test data Expected result Actual result Status
Verifying the while Write a simple while Use python as compiler 1)Type a simple lang:python The statements in The while{} block was
control looping loop, keep all while statement. i=1 while{} should execute. executing.
statement expressions correct 2)Set correct initial while i<5:
like initilization counter, condition, ____
counter, condition, update counter. i++
TCP01 update counter. And 3)Execute the Pass
then execute the program.
program.

Verifying the while Write a simple while Use python as compiler 1)Type a simple lang:python The statements in The while{} block was
control looping loop, but remove the while statement. i=1 while{} should execute. executing infinite
statement update counter 2)Remove the while i<5: times with no break.
written in the while{} update counter ____
block and then to inside of while{} #i++
TCP02 execute the code and block. Pass
check the results. 3)Execute the
program.

Verifying the while Write a simple while Use python as compiler 1)Type a simple lang:python The statements in The while{} block was
control looping loop, but set the while statement. i=1 while{} should execute. executing infinite
statement update counter 2)Set incorrect while i<5: times with no break.
wrong, written in the update counter ____
while{} block and then inside of while{} i--
TCP03 to execute the code block. Pass
and check the results. 3)Execute the
program.

Verifying the while Firstly write a simple Use python as compiler 1)Type a simple lang:python Error is expected. Error like: " 'i' is not
control looping while-while loop, but while statement. #i=1 defined " came.
statement set the initial counter 2)Remove the while i<5:
wrong, written initial counter ____
outside the while() outside of while i++
and then to execute block.
TCP04 the code and check 3)Execute the Pass
the results. program.

You might also like