Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Testing that uses program specifications, but does not use knowledge of the code itself is: Black-box testing White or glass box testing Structural testing

1)

Testing that uses program specifications, but does not use knowledge of the code itself is:

Black-box testing

White or glass box testing

Structural testing

Unit-level testing

3)

If we do not look at the software code when creating test cases, what can we refer to develop these test cases?

Companys Balance Sheet

Use Case Diagrams

User Stories

both b and c

4)

Which of the following is true about white and black-box testing technique:-

Branches, Individual Conditions and Specifications are used during white-box testing.

Specifications, Requirements, and Code Statements are used during black-box testing.

Specifications, Requirements, and Design are used during black-box testing.

Specifications, Requirements and Branches are used during white-box testing.

5)

The test cases derived from use cases

Are most useful in uncovering defects in the process flows during real world use of the system.

Are most useful in uncovering defects in the units of the software.

Are most useful in covering the correct use of the system in the process flows during real world use of the system.

Are most useful in uncovering the defects while integrating the software units.

6)

What can possibly be the disadvantage of black-box testing?

Chances of repeating tests that the programmer previously tested.

The test inputs needs to be from a large sample space.

It is difficult to identify all possible inputs in limited testing time. So writing test cases is slow and difficult.

All above

7)

Which level of testing validates the entire system to verify that all functional and quality requirements have been met?

Validation Testing

Integration Testing

Acceptance Testing

System Testing

8)

How can software defects in future projects best be prevented from reoccurring?

Creating documentation procedures and allocating resource contingencies

Asking programmers to perform thorough and independent testing

Combining levels of testing and mandating inspections of all documents

Documenting lessons learned and determining the root cause of problems

9)

Acceptance test cases are based on what?

Requirements

Design

Code

Branches

10)

During the software development process, at what point can the test process start?

When the code is complete.

When the design is complete.

When the software requirements have been approved.

When the first code module is ready for unit testing

1)

If a set of equivalence classes is complete, then, if we choose one test case from each class, our testing is complete. That is, we do not need to test anything else.

True

False

2)

What properties are required of a set of equivalence classes? Select all that are appropriate.

Dependent

Independent

Exhaustive

Thorough

Complete

3)

A set of equivalence classes is independent if there is no data element in the input space that is in more than one equivalence class.

True

False

4)

If a set of equivalence classes is not complete, then

We might accidently have some equivalence classes from which we have multiple tests.

There might be some important sets of inputs that we miss testing.

We might have some test cases that give wrong answers.

This set of equivalence classes is also not independent.

5)

If we are testing a method that has one integer parameter, then we can find good equivalence classes by using any set of equivalence classes as long as these classes are independent and complete. That is, we can ignore the function of the method in creating equivalence classes.

True

False

6)

One manufacturer sells its product for a certain price if you buy fewer than 100. However, if you buy 100 to 999, there is a discounted price per item. And if you purchase 1000 or more, there is an even larger discount. What is an appropriate set of equivalence classes for a method called totalCost that has one integer parameter to represent the number of items purchased and returns the total cost of those items?

-2, 0, 50, 100, 1000

{ items | 0 <= items < 100 }, { items | 100 <= items < 1000 }, {items | items >= 1000}

{ items | items < 0 }, { items | 0 <= items < 100 }, { items | 100 <= items < 1000 }, {items >= 1000}

{ items | items < 0 }, { items | 0 < items < 100 }, { items | 100 < items < 1000 }, { items > 1000}

7)

For the totalCost method described previously, what is wrong with this set of equivalence classes?

{ items | items < 0 }, { items | 0 < items < 100 }, { items | 100 < items < 1000 }, { items > 1000}

not complete

not independent

dependent

not exhaustive

8)

For the totalCost method described previously, what is wrong with this set of equivalence classes?

{ items | items <= 0 }, { items | 0 <= items <= 100 }, { items | 100 <= items <= 1000 }, { items >= 1000}

not complete

not independent

not exhaustive

incomplete

9)

For the totalCost method described previously, the price per item is $0.50. For 100 to 999 items, the price per item is $0.45; and for 1000 or more, the price per item is $0.40.

What are appropriate test cases if we use this set of equivalence classes?

{ items | items < 0 }, { items | 0 <= items < 100 }, { items | 100 <= items < 1000 }, { items >= 1000}

50,150, 1050

-5, 50,150, 1050

Input: 5 Output: 2.50

Input: 150 Output: 67.50

Input: 1050 Output: 420.00

Input: -5 Output: ERROR

Input: 5 Output: 2.50

Input: 150 Output: 67.50

Input: 1050 Output: 420.00

10)

If we test the totalCost method with the 4 test cases described in the previous questions and get correct answers from those test cases, then we can be sure that there are no errors in this method.

True

False

1)

Consider a method with the following specification.

String dayOfWeek( int day, String month, int year )

Pre-condition: day > 0; year > 0

Post-condition: return a string representing the day of the week (Sunday, Monday, ) for the date represented by this day, month, and year.

Which of the following is the most appropriate set of equivalence classes for the int parameter day? Note that, because of the pre-condition, we do not need to test for day <= 0. Lets forget about leap years for now.

{ day | 0 < day <= 31 }, { day | day > 31 }

{ day | 0 < day <= 28 }, { day | 28 < day <= 30 }, { day | day == 31 }, { day | day > 31 }

{ day | day <= 0 }, { day | 0 < day <= 28 }, { day | 28 < day <= 30 }, { day | day == 31 }, { day | day > 31 }

{ day | 0 < day <= 365 }, { day | day > 365 }

2)

Which of the following is the most appropriate set of equivalence classes for the String parameter month in the dayOfWeek method? Again, lets disregard leap years for now.

{ January }, { February }, { March }, { April }, { May }, { June }, { July }, { August }, { September }, { October }, { November }, { December }

{ months with 30 days }, { months with 31 days }, { February }, { any other string that doesnt represent the name of a month }

{ 0 < month <= 12 }, { month > 12 }

{ month < 0 }, { 0 < month <= 12 }, { month > 12 }

3)

For this dayOfWeek method example, the choice of having 12 classes, one for each month is a valid choice (although we should add an error class.) Why is the choice below better?

{ months with 30 days }, { months with 31 days }, { February }, { any other string that doesnt represent the name of a month }

This choice allows for exhaustive testing.

In this choice the set of classes is complete, whereas the one with 12 classes is not (even if we add an error class).

In the one with 12 classes, the classes are not independent.

The point of equivalence class testing is to group together those inputs that have similar behaviors so that we can test more efficiently and retain effectiveness.

4)

For this dayOfWeek method example, lets consider equivalence classes for the int parameter for year. Because of the precondition, we do not need to test for values <= 0. And there is not really an upper limit (except that our computers have an largest integer.) So, lets ignore an upper limit. Which of the following is the most appropriate set of equivalence classes for the year?

{ year | year represents a leap year }, { year | year represents a year that is not a leap year }

{ year | year is an even number }, { year | year is an odd number }

{ 0 < year < current year }, { current year }, { year > current year }

5)

All three of the sets of equivalence class used as answer in the previous question, that is:

{ year | year represents a leap year }, { year | year represents a year that is not a leap year }

{ year | year is an even number }, { year | year is an odd number }

{ 0 < year < current year }, { current year }, { year > current year }

are valid choice in that they are complete and independent. However, the first one is much more appropriate for testing this dayOfWeek method.

True

False

6)

If we decide to include a consideration of leap year in our dayOfWeek method, is the following an appropriate set of equivalence classes?

{ day | 0 < day <= 28 }, { day | day == 29 }, { day | day == 30 }, { day | day == 31 }, { day | day > 31 }

Yes, this set is complete, the classes are independent, and it separately handles the values that are special in some way.

No, these are not complete

No, some of these overlap

No, these are neither complete nor independent.

7)

If we use the following equivalence classes for the dayOfWeek method, what is the minimum number of test cases that we will need?

{ day | 0 < day <= 28 }, { day | day == 29 }, { day | day == 30 }, { day | day == 31 }, { day | day > 31 }

{ months with 30 days }, { months with 31 days }, { February }, { any other string that doesnt represent the name of a month }

{ year | year represents a leap year }, { year | year represents a year that is not a leap year }

5 * 4 * 2 = 40

5 + 4 + 2 = 11

5 * 4 * 2 = 40 is not the minimum; it is the maximum

5 + 4 + 2 = 11 is not the minimum; it is the maximum

There is not sufficient information to give a minimum.

8)

Given the equivalence classes below, which of the following is a valid test case. [Select all that are approrpaite.]

{ day | 0 < day <= 28 }, { day | day == 29 }, { day | day == 30 }, { day | day == 31 }, { day | day > 31 }

{ months with 30 days }, { months with 31 days }, { February }, { any other string that doesnt represent the name of a month }

{ year | year represents a leap year }, { year | year represents a year that is not a leap year }

Input: 13, June, 1953 Output: Saturday

Input: 13, 06, 1953 Output: Saturday

Input: 13, 06, 1953 Output: 7

Input: 32, June, 2050 Output: Error

Input: 7, Wrong Month, 2017 Output: Error

9)

As mentioned in the practice quiz, there are often particular combinations of values from the equivalence classes for separate inputs that we may want to make sure that we test in addition to the 40 combinations that we would get from standard equivalence class testing. Which of the following are some of those special combinations of inputs? Select all that are appropriate.

February 29 in a leap year

February 29 in a year that is not a leap year. This is an error case

June 29 in a leap year another error case (Of course, it could be any other month except February.)

June 29 in a non-leap year error case.

April 31 in any year or any month with 30 days.

10)

Which of the following are true? [Select all that are true.]

If we test all combinations of inputs using one input from each equivalence class, we have done all of the testing that we need to do.

We can use knowledge of the functions of a method to create better equivalence classes.

In testing a method that is in an object-oriented program, we may need to include equivalence classes for some data members in addition to those for method parameters.

To simplify testing, we should avoid trying to capture the relationship between two or more inputs.

Test cases include both inputs and expected outputs.

Bottom of Form

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

Students also viewed these Databases questions

Question

Documentation of the appraisal activities

Answered: 1 week ago