İstanbul evden eve nakliyat Beylikd¨¹z¨¹ evden eve nakliyat Tuzla evden eve nakliyat
Tutorial-11 To calculate the value of a to the power b and Generate its Decision Table based Test Cases
Delicious Bookmark this on Delicious
software testing genius

Tutorial-11 To calculate the value of a to the power b and Generate its Decision Table based Test Cases

Welcome to “Software Testing Genius”. Subscribe to my RSS feed for latest content on Software Testing.

Tutorial-11: To calculate the value of (a to the power b) and Generate its Decision Table based Test Cases

Inputs for the Tutorial:
An expression ( ab ) with input as two integers a & b.

Objective of this Tutorial: There are two objectives of the tutorial like:

Objective –1:
To write a Program in C++ for the determining the value of expression ( ab ).


Objective –2: Decision Table Based testing for situations in which a number of combinations of actions shall be taken for different conditions. Four parts of decision table being covered shall be: Condition Stub, Action Stub, Condition Entries and Action Entries.

color=#000080>

Solution Part – 1: Program in C++

#include

#include

#include

void main()

c1rscr();

int a,b;

float c;

char ch;

I : cout<<TO P < b?n?; power the to `a CALCULATE>

cin>>;

c=pow(a,b);

cout<

cout<<"nWant to enter again?(y/n)

cin>>ch;

if((ch=='y')||(ch=='Y'))

goto I;

getch();

}

Solution Part – 2: Decision Table Based Test Cases

Test Case ID

a

b

Expected Output

1

2

3

+ve Result

2

-1

3

-ve Result

3

-2

-4

+ve Result

4

0

1

Result is 0

5

0

0

Domain Error

6

-1

-0.6

Result is 1

Decision Table is as under

Conditions

               

C1:a = 0,b = 0

T

             

C2:a = -ve, b = +ve

 

T

           

C3:a = +ve, b = -ve

     

T

       

C4:a = -ve, b = -ve

       

T

     

C5:a = +ve, b = +ve

         

T

   

C6:a = 0, b = integer

           

T

 

C7:b = 0, a = integer

             

T

C8:a = -ve, b = -ve odd

   

T

         

Actions

               

A1: Domain Error

X

             

A2: Negative Output

   

X

         

A3: Output = 1

             

X

A4: Positive Output

 

X

 

X

 

X

   

A5: Output = 0

           

X

 


Screenshot with different outputs is as under:



Many More Articles & Tutorials on Black Box Testing 

Largest Database of Sample Papers - 1000+ Unique Questions for ISTQB Foundation Exam

ISTQB Foundation Exam - Full Crash Course for Download

ISTQB Advanced CTAL Test Analysts Exam - Full Crash Course for Download


ISTQB Advanced CTAL Test Manager Exam - Full Crash Course for Download


What Successful Testers say about the Quality of this website

If you want to keep track of further articles on Software Testing,
I suggest you to subscribe my
RSS feed
.

You can also Subscribe by E-mail
and get All New articles delivered directly to your Inbox.

Get your Absolutely Free Copy of Several MS PowerPoint Presentations & E-Books related to ISTQB, HP Load Runner, IBM RFT, HP QTP & QC Certification Exams, prepared by Popular Writers & Trainers, by writing to: Software.testing.genius@gmail.com

Full Study Material for Popular Certification Exams:

Study Material - HP QTP & QC Certification Exam

Study Material - IBM RFT Certification Exam

Study Material - HP LoadRunner Certification Exams for All Modules

Study Material - ISTQB Certification Exam

Most Popular Topics in Demand:

Practical Roadmap to QTP Certification

Practical Roadmap to CSTE Certification

Consolidated Study Material - Testing & QA

Rehearsal of QTP in 1 Hr. -  Interview Questions

 

Comments :

comments ↓


Leave Your Comments: (*) Marked Fields are Mandatory

You can apply basic formatting to the text

Name *
 
Email Address *
 
Website
 
Speak your mind
characters
sex hikayeleri