Identify a test case that does not execute the fault


Homework

• For each of the architectural styles described in the lecture (4 architecture styles), give an example of a real-world application whose software design might incorporate that style. Don't describe each architectural style. Just simply provide an example for each.

• What are the advantages and disadvantages of using the same standardized language or tools across applications in your organization?

• Explain the concept of an equivalence partition, provide an example, and discuss how this concept can be used in testing.

• How are faults and failures related to testing and debugging?

• What are three conditions to observesoftware failures?

• Consider the following program findLast, which contains a fault.

public int findLast (int[] x, int y)
{
//effects: If x == null throw NullPointerException
// else return the index of the last element
// in x that equals y.
// If no such element exists, return -1
for (int i = x.length-1; i> 0; i--)
{
if (x[i] == y)
{
return i;
}
}
return -1;
}
// test: x=[2, 3, 5]; y=2
// expected = 0

o Identify the fault

o Identify a test case that does not execute the fault. Also provide expected and actual outputs for the identified test case.

o Identify a test case that executes the fault, but does not result in an error state. Also provide expected and actual outputs for the identified test case.

o Identify a test case that satisfies all conditions that are required to observe software failure. Also provide expected and actual outputs for the identified test case.

Format your homework according to the following formatting requirements:

o The answer should be typed, using Times New Roman font (size 12), double spaced, with one-inch margins on all sides.

o The response also includes a cover page containing the title of the homework, the student's name, the course title, and the date. The cover page is not included in the required page length.

o Also include a reference page. The Citations and references must follow APA format. The reference page is not included in the required page length.

Solution Preview :

Prepared by a verified Expert
Programming Languages: Identify a test case that does not execute the fault
Reference No:- TGS03159887

Now Priced at $50 (50% Discount)

Recommended (95%)

Rated (4.7/5)