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

  Designing flowchart for wholesale company

Design a flowchart to depict each situation. An individual from a wholesale company needs to prepare five copies of sales.

  Create a uml class diagram for a survey class

Create a UML Class Diagram for a Survey class - The Survey class will have a static class variable that stores the current respondent's ID. As respondents complete the survey, this value will be incremented by one.

  Identify at least two strengths for each model

Identify at least two strengths for each model. Identify at least two weaknesses for each model. Identify current trends in terms of life cycle modeling.

  Part a short-answer questionsanswer each question in one to

part a short-answer questionsanswer each question in one to two paragraphs.1. what are the major differences between

  Calculate the number of pounds of raw material

Calculate the number of pounds of raw material to be purchased in June.

  Muscles health club database requirements

Read the given business needs closely to determine the entities and relationships required to fulfill the requirements. The nouns in the paragraph will tell you the entities that will be required.

  Determine various project milestones that are within project

determine the various project milestones that are within the project. Describe the review process that will take place at each of these milestones.

  1 to enable students to select and justify the choice of

1. to enable students to select and justify the choice of appropriate inputoutput devices and communication styles for

  Develop user acceptance tests for the review

Develop User Acceptance Tests for the Review Content Query use case text description and create bug reports for any bugs you have identified in your executed tests.

  Developing domain model class diagrams

The stock levels of each item are changed by the system with each purchase. However these levels need to be manually updated by a clerk in certain cases such as shipments of items from manufacturers, refunds, exchanges, etc.

  Describe functional and nonfunctional requirements

Be typed, double spaced, using Times New Roman font (size 12), with one-inch margins on all sides; citations and references must follow APA or school-specific format. Check with your professor for any additional instructions.

  Risk management in tellers in four-digit numeric password

Tellers at each branch use a four-digit numeric password, and each teller's computer is transaction-coded to accept only its authorized transactions. Carry out a risk assessment.

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