Sei sulla pagina 1di 10

1.

Reviews can be used to evaluate alternatives. Which of the following review types is most
suitable for evaluating technical solutions?

A Inspection
B Technical review
C Walkthrough
D Informal review

2.
The following method is given:

public boolean insert (Comparable c) {


Node parent = null;
Node child = root;
while (child != null) {
parent = child;
int cmp = c.compareTo (child.getElement());
if (cmp == 0) {
return false;
} else {
if (cmp < 0) {
child = child.getLeft ();
} else {
child = child.getRight ();
}
}
}
if (parent == null) {
root = new Node (c);
} else {
if (c.compareTo (parent.getElement ()) < 0) {
parent.setLeft (new Node (c));
} else {
parent.setRight (new Node (c));
}
}
return true;
}

(Take it as true that the “while loop” and the “if requests” thereafter are independent from each
other and matching test data are available)

What is the minimum number of test cases needed for 100% decision coverage?

A 2 test cases
B 3 test cases
C 4 test cases
D 5 test cases
3.
You are responsible for creating component test cases for a new application. You find the
following definition of a function to be developed:

FUNCTION CheckDiscount (FLOAT Amount,


NATURAL Discount): BOOLEAN;
// input parameter:
// -- Amount: value of purchased goods
// (0 < Amount)
// -- Discount: desired discount
// (0 <= Discount <= 100)
//
// return value:
// -- TRUE, if discount is discountis entitled,
// -- FALSE in other cases.

Which two of the following test design techniques are most suitable for testing this function?

A Pairwise testing
B Equivalence partitioning
C Branch testing / Branch coverage testing
D Boundary value analysis
E Condition testing

4.
The following program is given:
begin
a=3;
b=2*a;
c=b+100;
if (b > 4) then
if ((b > 8) OR (c > 120)) then
...
endif
else
...
endif
end

What value of cyclomatic complexity does this program have?

A 3
B 4
C 5
D 6
5.
Which of following statements about exit criteria (also called test completion criteria) and their
dependencies is correct?

A 100% condition coverage implies 100% statement coverage.


B 100% decision coverage implies 100% condition determination coverage
C 100% multiple condition coverage implies 100% statement coverage.
D 100% path coverage implies 100% multiple condition coverage.

6.
Which of the following statements about dynamic analysis tools is correct?

A Dynamic analysis tools are used to check the expected performance of the application.
B Dynamic analysis tools can give a support when debugging functional failures.
C Instrumentation is a typical example for dynamic analysis.
D Using a dynamic analysis tool makes sense only when non-functional requirements are
defined

7.
Your company is a supplier of software for old-age insurance. The customer requires multiple
condition testing to be executed. By reviewing the source code you find the following lines of
code:

...
IF ((Age >= 65) OR
((age = 64) AND (gender = 'f'))
) THEN
...
ENDIF
...

How many test case are necessary to achieve a 100% multiple condition coverage?

A 2 test cases
B 4 test cases
C 6 test cases
D 8 test cases

8.
Which two of the following pieces of source code contain data flow anomaly?

A
integer a, b, c;
a = 11;
a = a + 1;
c = 2 * a + b;
b = a + c;
B
integer a, b, c;
a = 17;
b = a + 1;
c = 2 * a + b;
b = a + c;
C
integer a, b, c;
a = 21;
b = 8 + a;
c = 2 * a + b * b;
b = a + c;
D
integer a, b, c;
a = -124;
b = a + 1;
b = 2 * 4a;
c = a + b;
E
integer a, b, c;
a = 73;
b = a + 1;
c = 2 * a + b;
a = b + c;

9.
You have to explain data flow analysis to your superior based on the following piece of program
code

BEGIN Max (a: INTEGER, b: INTEGER)


c: INTEGER
IF (a > b) THEN
c := a;
ELSE
c := b;
END IF
RETURN (c)
END

Which of the following answers contains all possible access sequences for the available data
objects?

A
Parameter a: drrdu and dru
Parameter b: dru and drru
Variable c: udru and udru

B
Parameter a: drru and dru
Parameter b: dru and drru
Variable c: udru and udru
C
Parameter a: drru and dru
Parameter b: dru and drru
Variable c: udu and udru

D
Parameter a: drru and dru
Parameter b: dru and ddrru
Variable c: udru and udru

10.
Which two of the following statements about defect based test design technique is correct?

A Defect based test design technique are applied for defect retesting
B Defect based test design technique is based on the experience about an existing version of
the test object.
C A disadvantage of defect based test design technique is that is no test run log is created
when using it.
D Defect based test design technique can be based on a hierarchical list of defect types (defect
taxonomy).

11.
The following control flow graph will be presented to you:
Which of the following statements about the number of minimal required test cases is correct?

A
100% statement coverage: 1 test case
100% branch coverage: 2 test cases
B
100% statement coverage: 2 test cases
100% decision coverage: 2 test cases
C
100% statement coverage: 2 test cases
100% branch coverage: 3 test cases
D
100% decision coverage: 3 test cases
100% branch coverage: 2 test cases

12.
During a code review you find following function:

int searchForSubString(const char *buf,


const char *subString)
{
int i=0;
int j=0;
bool done=false;
int ret_val=-1;
while(buf[i] && !done){
if(buf[i]==subString[0]){
j=1;
while(subString[j] && !done){
if(buf[i+j] != subString[j]){
done=true;
}
j++;
}
} /* endif */
if(subString[j]==0){
done=true;
}
i++;
}
if(subString[j]==0){
ret_val=i+j;
}
return (ret_val);
}

What value is the nesting level of this function?


A 3
B 4
C 5
D 6
13.
Which of following test case design is an example for using error attacking?

A Executing a calculation with 100 valid data sets, then measuring its processing time with normal and
maximal load. In order to get an expressive value test should be repeated 3 times.

B Beta testing with at least 24 representative users. During that each user should execute a calculation
with 100 valid data sets at least once.

C Executing a calculation with 100 valid data sets. During that operating system should not respond to
„Open file“ function (it remains hanged up) when invoking it at Xth time (X can be configured).

D Executing a calculation with 100 valid data sets. Then a spot check of the results is done. At least 12
output data should be checked.

14.
Which two of following statements about test tool introduction are correct?

A When selecting a test tool always an external provider should be involved in order to minimize risk.

B For test tool selection a list of available tools of corresponding category will be created.

C A successful introduction of test tools normally leads to an increasing productivity in a short term.

D Introduction costs of a new tool consist merely of selection and purchase costs.

E Tool introduction is often associated with high investment costs and risks and therefore a thorough
preparation (selection) and implementation is necessary (pilot project, information, training, etc.)

15.
You will be requested to give test analyst support for a project that has quality problems. When studying
test plan, you find that on component test level only structure-based tests are executed. Which of
following statements describe related problems most appropriately?

A Test cases that are developed by using structure-based test design techniques – depending on the code
to be tested – are mostly very complex.

B Test cases that are developed by using structure-based test design techniques require special tools for
execution. That implies additional effort.

C Test cases that are developed by using structure-based test design techniques should be updated at
each code change.
D Test cases that are developed by using structure-based test design techniques do not make possible to
find functional failures.

16.
According to the requirements of an application data should be protected against data loss. This
requirement will be fulfilled by a backup process and an online mirroring of the database. Additionally
each transaction will be recorded. Which of following test case designs is most appropriate for testing the
requirement described above?

A By a logical bomb (simulated for the test) data will be corrupted, then backup will be loaded and
subsequently transactions executed. Expected: intact database, no known data loss (e.g. each records of
last 3 hours)

B By a logical bomb (simulated for the test) data will be corrupted, then backup will be loaded back.
Expected: intact database, no known data loss (e.g. each records of last 3 hours)

C By a logical bomb (simulated for the test) data will be corrupted, then backup will be loaded back and
if necessary it will be synchronized with mirror database. Expected: intact database, no known data loss
(e.g. each records of last 3 hours)

D By a logical bomb (simulated for the test) data will be corrupted, then data of mirrored database will
be loaded back. Expected: intact database, no known data loss (e.g. each records of last 3 hours)

17.
When investigating a software architecture following graph has been created:
Which of following statements contains a correct conclusion about displayed call graph?

A This is a small call graph of an application. In practice such call graphs can be much wider, deeper and
more extensive.

B Based on the high number of nodes in the call graph no consequence can be drawn.

C This call graphs is too big, complex and therefore not testable. A redesign should be considered.

D Dept and width of the call graph can be considered as acceptable. However there are several layer-
overlapping calls exist that implies that either architecture is immature architecture, or lots of subsequent
changes have been done.

18.
A new analysis tool should fulfill following non-functional requirements:

An analysis should take more than 32ms.


There should be series of 24,000 analyses being processed uninterruptedly.
Tool should be provided on three platforms.

Which three of following software quality attributes, or part attributes according to ISO 9126 are relevant
for this new product?

A Reliability
B Recoverability
C Portability
D Maintainability
E Interoperability
D Usability
F Time behaviour

19.
To test a function more or less test cases could be necessary depending on the required degree of
coverage. Which two of following statements regarding 100% coverage values are correct?

A There are 14 test cases required for statement coverage, 15 test cases for branch coverage.

B There are 12 test cases required for multiple condition coverage (also to condition determination
coverage), 15 test cases for statement coverage.

C There are 19485 test cases required for path coverage, 443 test cases for statement coverage, 442 test
cases for branch coverage.

D There are 35 test cases required for both branch and statement coverage
E There are 36 test cases required for branch coverage, 24 test cases for multiple condition coverage
(also to condition determination coverage).

20.
During a project a big discussion started about test automation. Which two of following statements are
correct?

A Automation of test execution does not have any benefit during the project in some cases since test
object changes several times.

B Test automation is very expensive and it pays only in case of bigger projects.

C Test automation enables to give up systematic test design techniques.

D Principally test automation is less expensive than manual testing

E Test automation can be required by the test process in some cases (e.g. to measure coverage values)

Potrebbero piacerti anche