Briefly discuss the relationship between integration testing

Assignment Help Software Engineering
Reference no: EM131943643

PART 1: Short Answers

1. Briefly discuss the relationship between integration testing, unit testing and system test.

2. Code Analysis: int Calculate (int x, int y) {
int total=0; if (x>30) {
total=(x*40+y*50)*.95;
}
else
total=x+y;

for (int i=0;i<Y;i++) { total+=y*5;
}
return total;
}

a. Draw the control flow graph for this code.

b. What are the test cases to achieve statement coverage for this code?

c. What additional test cases (if any) are required for branch coverage?

d. Is it possible to test all paths through this module?

3. A car insurance company "Simplicity" provides insurance cover for motor vehicles. When a customer applies for a quote on insurance, the agent requests the following information:
1. Vehicle year of registration and make (e.g. Toyota, 2001)
2. Age of the driver
The system outputs a quote for insurance.

Use EP to do testing analysis and find the necessary test cases (15 marks)

PART 2: Long answers

1. Testing a Stack class (25 marks)

Here is Java code for a simple Stack class provided:

class Stack
{
int number; // number of items in the stack
int limit; // limit on number of items in the stack int increment; // incremental number to be added int array[ ]; // stack contents

Stack(int limit)
{
this.limit = limit; // set instance variable to argument value increment = limit; // use increment for limit
array = new int[limit]; // create array
number = 0; // stack contains no items initially
}

void ensure() // make sure push is possible
{
if( number >= limit )
{
int newArray[] = new int[limit+increment]; // create new array for( int i = 0; i < limit; i++ )
{
newArray[i] = array[i]; // copy elements in stack
}
array = newArray; // replace array with new one limit += increment; // augment the limit
}
}

void push(int x)
{
ensure();
array[number++] = x; // put element at position number and increment
}

int pop()
{
return array[--number]; // decrement number and take element
}

boolean empty()
{
return number == 0; // see if number is 0
}

public static void main(String arg[])
{
int limit = new Integer(arg[0]).intValue(); Stack s = new stack(limit);
for( int i = 0; i < limit; i++ )
{
s.push(i);
}
while( !s.empty() )
{
System.out.println(s.pop());
}
}
}

How would you test this class?
Hint: I am looking for as complete and detailed an answer as you can give in the time available. I am looking for both a discussion of overall strategies (how will you approach the task) as well as a small number of specific test cases.

3. OO programming might provide an easy way for testing. Please explain it with examples (15 marks).

PART 3: Multiple Choice

1. Black-box Testing attempts to find errors in which of the following categories
a. Incorrect or missing functions
b. Interface errors
c. Performance errors
d. All of the above

2. Condition coverage that executes possible combinations of condition outcomes of each decision is called as .
a. Black box Testing
b. White box Testing
c. Integration Testing
d. Acceptance Testing

3. Testing all possible paths through a module is:
a. The strongest whitebox coverage criteria
b. The strongest blackbox coverage criteria
c. Not possible to achieve if the module has loops
d. Both a and c are correct

4. Which is NOT true - The black box tester:
a. should be able to understand a functional specification or requirements document
b. should be able to understand the source code
c. is highly motivated to find faults
d. is creative to find the system's weaknesses

5. Unreachable code would best be found using: code inspections
code review
a coverage tool
a static analysis tool

6. Statement Coverage will not check for the following:
a) Missing Statements
b) Unused Branches
c) Dead Cod
d) Unused Statement

7. Verification is:
a) Checking that we are building the right system
b) Checking that we are building the system right
c) Making sure that it is what the user really wants
d) Performed by an independent test team

8. Which testing phase tests individual software modules combined together as a group?
a) Module testing
b) Integration testing
c) White Box testing
d) Software testing

9. A shopping website gives discount based on prices of total purchased items. Suppose customer purchases are below 2000 rs. then no discount,for purchases till 20000, it gives 10% discount and above 20000 it gives 15% discount. Which of the following sets of values lie in 3 different equivalence classes?

a) 1800,2000,8000
b) 2001,10000,20002
c) 1800, 2003,58,000
d) 100,1800,20001

10. A theme park charges entry fee based on age group. For children below 3 it charges nothing, for 3-10 it charges 500/-, for 10-18 it charges 800/-,then for 18-60 it charges 1000 and above 60 it charges 500 again. Using boundary value analysis, what will be the values to test if person pays 500 rs entry fee?

a) 0,2,3
b) 2,3,10,11,59,60,100,101
c) 2,3,10,11,59,60,100,101
d) 59,60,100,101

Verified Expert

The solution file is prepared in ms word which has three parts. Part one explained about the data flow diagram for given program, explained about statement coverage test cases. part two is explained about the stack class test cases. Part 3 has multiple questions which are answered.

Reference no: EM131943643

Questions Cloud

Relationship between elasticity and total revenue : Does understanding the Relationship Between Elasticity and Total Revenue help you understand why some goods go on sale and others don't?
What steps could you take to address the challenge : Health information managers / professionals have a variety of different roles that they are responsible for with regard to record keeping.
Estimate the firm short-run production function : Using OLS, estimate the firm's short-run production function. Comment on the strength of the regression results.
Identify the characteristics of jit systems : Identify topics you did not understand or successfully implement and, if possible, suggest how to improve the course material on those topics.
Briefly discuss the relationship between integration testing : COSC4107 Human Computer Interaction - Briefly discuss the relationship between integration testing and What are the test cases to achieve statement coverage
Imports and the marginal tax rate : Then calculate the revised slope of the AE curve and the multiplier when you know that the imports and the marginal tax rate will reduce the slope
Describe a positive impact spanish had on indigenous people : Describe a minimum of one specific positive and one negative impact the Spanish and Portuguese had on the indigenous people of Central and South America.
What is your current max possible throughput : What is your current Max Possible throughput - how many customers can you serve with your current capacity?
Your nationalities-the capital-the liability. : If you want to establish company with your friends in UAE, your nationalities. the capital (share)., the liability.

Reviews

len1943643

4/16/2018 3:01:09 AM

please read the exam attached and solve it. I need to have it on Monday please make sure that there is 0% plagiarism and submit on time this exam worth 60% of my final grade so please solve it as it is your grades. thank you

Write a Review

Software Engineering Questions & Answers

  Research report on software design

Write a Research Report on software design and answer diffrent type of questions related to design. Report contain diffrent basic questions related to software design.

  A case study in c to java conversion and extensibility

A Case Study in C to Java Conversion and Extensibility

  Create a structural model

Structural modeling is a different view of the same system that you analyzed from a functional perspective. This model shows how data is organized within the system.

  Write an report on a significant software security

Write an report on a significant software security

  Development of a small software system

Analysis, design and development of a small software system.

  Systems analysis and design requirements

Systems Analysis and Design requirements

  Create a complete limited entry decision table

Create a complete limited entry decision table

  Explain flow boundaries map

Explain flow boundaries map the dfd into a software architecture using transform mapping.

  Frame diagrams

Prepare a frame diagram for the software systems.

  Identified systems and elements of the sap system

Identify computing devices, which could be used to support Your Improved Process

  Design a wireframe prototype

Design a wireframe prototype to meet the needs of the personas and requirements.

  Explain the characteristics of visual studio 2005

Explain the characteristics of Visual Studio 2005.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd