In an organization, software testers always look for failures in the software product due to which they have an adversarial relationship with the software developers. Considering this scenario, identify the maximum process maturity level of this organization.
A __________ is a skeletal implementation of a software module, used to develop or test a component that calls the stub or depends on it. Fill in the blank with correct option.
Consider that there are two modules in a software program, namely ModuleA and ModuleB. ModuleA calls the method setup(String parameter1, String parameter2) in ModuleB. The data is passed through the parameters in the method. Which type of interface does this scenario represent?
Consider the following statement and fill in the blank(s) with the appropriate option. In a maximal chain, the interior vertices have an indegree of i)___ and outdegree of ii)___.
In a data flow graph, a path from vertex vi to vertex vj is a du-path for variable x if x is __________. Fill in the blank with the appropriate option.
Options :
6406535137557.✖ defined at vi, used at vj, and there exists a path to reach vj from vi
6406535137558.✔ defined at vi, used at vj, and there exists a def-clear path to reach vj from vi
6406535137559.✖ defined at vj, used at vi, and there exists a def-clear path to reach vj from vi
6406535137560.✖ defined at vj, used at vi, and there exists a path to reach vj from vi
Consider that there are k distinct du-pairs for a variable z on a data flow graph. Which of the following options is correct regarding the TRs for All-Uses Coverage for variable z on this graph?
Options :
6406535137561.✖ There are exactly k test requirements for All-Uses Coverage.
6406535137562.✖ There are at least k test requirements for All-Uses Coverage.
6406535137563.✖ There are k − 1 test requirements for All-Uses Coverage.
6406535137564.✔ There are at most k test requirements for All-Uses Coverage.
Consider the following Java code for LinAlg class, there are some faults in it. The method addVectors(int[] vec1, int[] vec2) needs to be tested using the JUnit test class TestVectorAddition.
public static class LinAlg
{
// Inputs: Two non-empty integer arrays.
// Effects: Performs addition of the vectors and returns the resultant vector.
// Assumptions: Throws IllegalArgumentException if addition is incompatible.
public static int[] addVectors(int[] vec1, int[] vec2) {
if(vec1.length != vec2.length) {
throw new IllegalArgumentException("Size of the vectors should be same.");
}
int[] result = new int[vec2.length];
for (int i = 0; i < vec2.length - 1; i++) {
result[i] = vec1[i] + vec2[i];
}
return result;
}
}
/* ----- Test Class ----- */
import static org.junit.Assert.*;
import org.junit.Test;
public class TestVectorAddition {
@Test
public void testCase1() {
int[] v1 = { 10, 20, 30, 40, 50 };
int[] v2 = { 30, -40, 20, -10, -50 };
int[] result = LinAlg.addVectors(v1, v2);
assertArrayEquals(result, new int[] {40, -20, 50, 30, 0});
}
@Test
public void testCase2() {
int[] v1 = { 2, 4, 6, 8 };
int[] v2 = { 40, -20, 10, -5 };
int[] result = LinAlg.addVectors(v1, v2);
assertArrayEquals(result, new int[] {42, -16, 16, 3});
}
@Test
public void testCase3() {
int[] v1 = { 1, 1, 1, 1, 0 };
int[] v2 = { 0, 0, 0, 0, 0 };
int[] result = LinAlg.addVectors(v1, v2);
assertArrayEquals(result, new int[] {1, 1, 1, 1, 0});
}
@Test
public void testCase4() {
int[] v1 = { 1, 0, 0, 0, 1 };
int[] v2 = { 1, 0, 0, 0, 1 };
int[] result = LinAlg.addVectors(v1, v2);
assertArrayEquals(result, new int[] {2, 0, 0, 0, 2});
}
}
Identify which of the test cases would be able to uncover the faults in the program.
Options :
6406535137573.✖testCase1()
6406535137574.✔testCase2()
6406535137575.✖testCase3()
6406535137576.✔testCase4()
Question Id : 6406531535623 | Comprehension | Question Numbers : (205 to 207)
Consider the following control flow graph (CFG), and answer the subsequent questions.
How many test requirements are there for All-Defs-Coverage for variable x?
Options :
6406535137589.✖ 1
6406535137590.✔ 2
6406535137591.✖ 3
6406535137592.✖ 4
Note: The source PDF (ST_Q1_SEP_25.pdf) is only 9 pages and ends here, at Question 208.
Questions 209 and 210 of this comprehension set are not present in the file, so they could not be reproduced.
Share a complete copy and I'll add them.