Quiz
Software and Quality Testing exam 2016
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (40)
1In Search-Based Software Testing, which of the following statements is true?
- AThe branch distance is the fitness function to minimize for obtaining the test case that cover a
specific test target (e.g., branch in the code). - BThe single-point crossover is a genetic operator that randomly changes one input parameter in
a test case. - CThe approach level is the fitness function to minimize for obtaining the test case that cover a
specific test target (e.g., branch in the code). - DThe roulette wheel is a selection mechanism where test cases with better fitness function have
higher probability to be selected for reproduction.
- AThe branch distance is the fitness function to minimize for obtaining the test case that cover a
2What is random fuzzing?
- AObfuscating the source code so it is no longer readable.
- BRandomly picking paths in a state diagram and writing tests for that path.
- CAsking programmers at random to try to break your software.
- DTesting different random inputs until the system crashes.
3In Search-Based Software Testing, which of the following statements corresponds best to
the “No-Free Lunch Theorem”?- ARandom search always performs better than Genetic Algorithms.
- BGenetic Algorithms always perform better than random search.
- CGiven two search algorithms A1 and A2, if A1 performs better than A2 on a problem P1, there
will be another problem P2 on which A1 also performs better than A2. - DGiven two search algorithms A1 and A2, if A1 performs better than A2 on a problem P1, there
will be another problem P2 on which A2 performs better than A1.
4The laws of software evolution by Belady and Lehman can be paraphrased as:
- AThe mess in a software system will increase over time, unless you do something about it.
- BDue to evolution, chaos theory applies to software systems, which explains why a small change
can have drastic effects. - CThrough principled design, controlled software evolution is possible.
- DContinuing change is facilitated by a decrease in entropy.
5Which of the following is a valid reason to use assertions in your code?
- ATo conduct input validation.
- BTo handle errors in the program
- CTo speed up the program.
- DTo make debugging easier.
6A state object’s self-check method, as discussed in the article Beyond Page Objects, is aimed at:
- AChecking that the inputs entered on a web page meet the invariant of the page controllers.
- BChecking that the web application is in a given state.
- CChecking that the object meets its preconditions.
- DChecking that an event is triggered with the appropriate action.
7Consider the method from Figure 2 (page 6) . What is its cyclomatic (McCabe) complexity?
- A3
- B2
- C1
- D4
8Consider the following two code fragments:
Listing 1: Approach I
public boolean addToScoreBoard ( Player player , int rank ) {
assert player != null;
assert rank > 0;
// core algorithm comes here
}
Listing 2: Approach II
public boolean addToScoreBoard ( Player player , int rank ) {
if ( player != null) {
return false;
}
if ( rank <= 0) {
return false;
}
// core algorithm comes here
}- AApproach I is using a demanding style; Approach II is using a denying style.
- BApproach I is using a defensive style; Approach II is using a demanding style.
- CApproach I is using a denying style; Approach II is using a demanding style.
- DApproach I is using a demanding style; Approach II is using a defensive style
9What is the purpose of confirmation testing?
- ATo confirm that the detailed logic of a component conforms to its specification
- BTo confirm that no unexpected changes have been introduced or uncovered as a result of
changes made - CTo confirm the users’ confidence that the system will meet their business needs.
- DTo confirm that a defect has been fixed correctly.
10According to the study on line coverage of JUnit, the best use of code coverage is as:
- AA tool that ensures the percentage of lines executed by the full test suite is at least as high as a given threshold.
- BA tool to help managers assess developers test performance
- CA tool to assist in reviewing code changes.
- DA tool to show your superiors that you have tested all functionality
11In ISTQB terminology, which of the following is a test type?
- AAcceptance testing
- BSystem testing
- CFunctional testing
- DComponent testing
12Which of the following best describes integration testing?
- ATesting to verify that the test environment can be integrated with the product.
- BTesting performed to expose faults in the interfaces and in the interaction between integrated
components. - CIntegration of automated software test suites with the product.
- DTesting to verify that a component is ready for integration.
13Besides high coverage, an additional desirable characteristic of a test suite is that it has good diagnosability: If a particular test case fails, it should be easy to debug the system and find the component responsible for the failure.
Consider a test suite that focuses on (Cucumber) end to end testing at the cost of unit testing, thus adhering to the software testing ice-cream cone anti-pattern. Which of the following is true?- AThe test suite reaches high coverage yet poor diagnosability.
- BThe test suite reaches low coverage and poor diagnosability.
- CThe test suite reaches both high coverage and high diagnosability
- DThe test suite reaches low coverage yet high diagnosibility.
14Consider the class hierarchy of Figure 3. Wat are the LSP-compliant relationships between
C1 and C2? (See also Questions 22 and 19). https://www.dropbox.com/s/42u9ekj938mucx0/SQTExam16Fig3.PNG?dl=0- AC1 and C2 are LSP-compliant with each other
- BC2 is an LSP-compliant extension of C1.
- CC1 is an LSP-compliant extension of C2.
- DThere is no LSP-compliance relation between C1 and C2.
15Consider the following statements about traceability in relationship to Cucumber:
I: Cucumber helps business stakeholders to trace requirements to acceptance tests.
II: Cucumber helps testers to trace scenarios to test implementations.
III: Cucumber helps developers to trace implementation classes back to requirements via step definitions.
Which of the following holds:- AStatement II is false, but the others are true.
- BStatement I is false, but the others are true.
- CAll of the statements are true.
- DStatement III is false, but the others are true.
16What is exploratory testing?
- AThe testing carried out by a chartered engineer
- BConcurrent test design, test execution, test logging, and learning.
- CA systematic approach to identifying specific equivalent classes of input.
- DThe process of anticipating or guessing where defects might occur.
17During the OOP project (course TI1216), 80% branch test coverage was set as a minimum
requirement for the code written. This could lead to several problems, one of which was people using only
branch coverage to measure software quality. Which of the following terms from the article Getting what
you measure as discussed in class most accurately describes this problem?- AOne track metric.
- BMetrics galore.
- CTreating the metric.
- DMetric in a bubble.
18Which of the following is correct?
- AFinding a mistake requires executing a program.
- BMistakes, defects, and failures can all be found without executing the program.
- CFinding a failure requires executing a program.
- DFinding a defect requires executing a program
19Consider the class hierarchy of Figure 3. Which of the classes or interfaces discussed are
LSP-compliant implementations or extensions of I2? (See also Questions 22 and 14). https://www.dropbox.com/s/42u9ekj938mucx0/SQTExam16Fig3.PNG?dl=0- AC2, but not I1 and C1
- BNone of I1, C1, and C2.
- CI1, C1, and C2
- DC1, but not I1 and C2.
20Consider the state machine in Figure 1. How many one-way edges has the state machine
for which the super-state is expanded (do not count the start state indicator as a state transition)? https://www.dropbox.com/s/7j0zlreeab4ycdx/SQTExamFig1and2.PNG?dl=0 (look only at figure 1)- A8
- B7
- C10
- D5
21Consider the method from Figure 2 (page 6) . What is the minimum number of test cases
needed to achieve 100% statement coverage? https://www.dropbox.com/s/w4bfvq8a8w6ms8q/SQTExam16Fig2.PNG?dl=0- A1
- B3
- C2
- D4
22Consider the class hierarchy of Figure 3. Which of the classes or interfaces discussed are
LSP-compliant implementations or extensions of I1? (see also Questions 19 and 14) https://www.dropbox.com/s/42u9ekj938mucx0/SQTExam16Fig3.PNG?dl=0- AC1, but not I2 and C2.
- BNone of I2, C1, and C2.
- CC1, I2, and C2.
- DI2, but not C1 and C2.
23Assume assertion checking is enabled. When an assertion is false, which of the following
is guaranteed to happen?- AAn AssertionError is thrown
- BThe program crashes immediately
- CAssertion checking is switched off as the program’s state has become invalid.
- DThe user is informed that their input is invalid
24According to the BBC, the crash of the A400M Airbus airplane in Seville, Spain, May
2015, was caused by incorrectly installed engine control software.1
In particular, files known as “torque
calibration parameters” had been accidentally deleted during a software installation process ahead of the
plane’s first flight. Consequently, 3 out of 4 engines were frozen after lift-off, and did not respond to the
crew’s attempts to control the power setting.
Which of the following activities should Airbus pay most attention to, in order to prevent problems like
these in the future?- ACode review
- BUnit testing
- CConfiguration management.
- DPerformance testing.
25Which of the following claims is defended by Bertrand Meyer’s article entitled “Seven
Principles of Software Testing?”- ASoftware testing is the process used to assess the quality of computer software.
- BTo test a program is to try to make it fail.
- CTesting shows the absence of errors.
- DNone of the other claims is defended by Bertrand Meyer.
26For which of the following code fragments is the minimum number of paths needed to
achieve 100% statement coverage different from the minimum number of paths needed to achieve 100%
decision coverage?- Aint i = 0;
while (i < 10) {
i ++;
} - Bfor (int i = 0; i < 10; i ++) {
System . out . println (" This is the " + i + " th iteration " );
} - Cswitch ( invoice . status ) {
case " paid ":
return " Invoice has been paid ";
case " unpaid ":
return " Invoice has not been paid ";
default:
return " The status of this invoice is unknown ";
} - Dif ( invoice . paid ) {
invoice . addTransaction (new Transaction ( invoice . amount ));
}
- Aint i = 0;
27What should in general not be included in a git repository?
- AResource files.
- BBinary files.
- CConfiguration files such as pom.xml or checkstyle.xml.
- DThe .gitignore file
28Given an undecidable property P, static analyis can at best
- AFind some program elements for which P holds, but may miss others.
- BFind all program elements for which P holds.
- CNone of the other options: Undecidability relates to testing, not to static analysis.
- DDo nothing: it is impossible to detect program elements for which an undecidable property
holds statically.
29The typical way to use a mocking framework (such as Mockito) when testing a class C is:
- ATo mock selected methods in C
- BTo mock selected subclasses of C.
- CTo mock selected interfaces implemented by C.
- DTo mock selected classes C depends on.
30At a recent Test Automation Day conference, keynote speaker Belgers discussed testing
for security. The fundamental difference with regular testing he highlighted is that normal testing tries to
address use cases (seeking to exercise behavior that should be present), whereas testing for security aims
at addressing abuse cases (seeking to exercise behavior that should not be present).
Which coverage criteria for state machines are most suitable for testing abuse cases?- ASneak path coverage.
- BTransition coverage.
- CRoundtrip-path coverage.
- DState coverage
31From a security perspective, the recommended way of treating input values is that:
- AStatic analysis tools should be adopted to ensure inputs can be trusted.
- BInputs that can cause buffer overflows should be forbidden.
- CAll input values should be considered as “untrusted”
- DExplicit preconditions on input values will help to mitigate security problems.
32You run your application with assertion checking enabled. Unfortunately, it reports an
assertion failure signaling a class invariant violation in one of the libraries your application makes use of.
Which of the following statements best characterizes the best action to take:- AThis indicates an integration fault, and requires a redesign that involves the interface that is
offered by the library and used by your application - BThis indicates a problem in the library, and requires a fix in that library.
- CThis indicates that you invoke one of the methods of the library in the wrong way, and requires
a fix in your application. - DThis indicates a false alarm, and requires that you investigate whether you should add an
@SuppressWarnings annotation to your application.
- AThis indicates an integration fault, and requires a redesign that involves the interface that is
33Which of the following statements is true in the ISTQB test design process?
- ATest scripts implement test cases which are derived from test conditions
- BTest scripts form the test basis.
- CTest conditions are the outcome of test design
- DThe test conditions are the starting point for test analysis.
34Model-based testing requires a model that
- ACan be represented as a decision table.
- BIs at least as complex as the original artifact
- CCan be automatically generated from the source code
- DIs simpler than the artifact, yet preserves certain key properties.
35If you apply the one by one testing strategy to the condition x > 20∧y ≤ 200, what are the
off points for x and y?- Ax = 21 and y = 199.
- Bx = 19, and y = 201.
- Cx = 19, and y = 199.
- Dx = 21, and y = 201.
36According to the paper Beyond Page Objects, state-based behavior expressed in user stories
in the format proposed by Dan North can be turned into test cases in which way?- AEach acceptance scenario corresponds to one state transition
- BIn the As an ”X” I want ”Y” so that ”Z” narrative, ”X” corresponds to a state and ”Y” to an event.
- CEach narrative corresponds to one state transition.
- DEach then-clause in an acceptance scenario specifies an event that should be triggered.
37Consider the method from Figure 2 (page 6) . What is the minimum number of test cases
needed to achieve 100% decision coverage?- A2
- B1
- C4
- D3
38In functional testing, partitions are chosen such that failures are:
- ASparse in some partitions, but dense in others
- BEasily traced back to the functionality of the partition.
- CMostly on the boundaries of the partitions.
- DEvenly spread over all partitions.
39In the one-by-one testing strategy, a series of test cases is created each pairing a boundary
value with an in-point. What is the recommended strategy for selecting in-points?- AAvoid using typical in-points, focusing on a-typical ones instead.
- BVary the in points as much as possible.
- CUse an on or off point for the in points.
- DKeep the in points the same as much as possible.
40Which of the following statements on Search-Based Software Testing (SBST) is false:
- ATest cases involved in collateral coverage must be detected and stored.
- BIn SBST, meta-heuristics (e.g., Genetic Algorithms) are used to find optimal solutions since in most of the cases it is not possible to apply an exhaustive search.
- CIn SBST, traditional testing problems (e.g., test case generation) are re-formulated in search problem in order to apply search algorithms to solve them.
- DTest cases generated with Genetic Algorithms does not need to be manually inspected by developers since the assertions are not needed.
Information
- Description
- Computer Science Quiz on Software and Quality Testing exam 2016, created by Bas Musters on 04/07/2017.
- Author
- Bas Musters
- Language
- English
- Views
- 142
- Tags
- Rating
- No ratings yet Rate this quiz