Quiz
Software Quality and Testing exam 2015
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)
1Which of the following claims is defended by Bertrand Meyer’s article entitled “Seven Principles
of Software Testing?”- ANone of these claims is defended by Bertrand Meyer
- BTesting shows the absence of errors
- CThe goal of testing is to uncover faults by triggering failures.
- DSoftware testing is the process used to assess the quality of computer software.
2Consider the state machine in Figure 1. How many one-way edges has the state machine for
which the super-state is expanded? https://www.dropbox.com/s/7j0zlreeab4ycdx/SQTExamFig1and2.PNG?dl=0- A8
- B5
- C6
- D7
3Which of the following statements is true in a class hierarchy that is compliant with the
Liskov Substitution Principle?- ASubclasses can be more demanding than their superclass.
- BA superclass can be more tolerant than its subclasses.
- CA superclass invariant need not hold in its subclasses.
- DA subclass must meet the invariant of its superclass.
4According to the ISTQB, what is a test condition?
- ASomething that can be tested.
- BA specific state of the software, e.g., before a test can be run.
- CAn input, expected outcome, precondition and postcondition.
- DThe steps to be taken to get the system to a given point.
5Consider the state machine in Figure 2. How many test cases are needed to achieve all
roundtrip path coverage? https://www.dropbox.com/s/7j0zlreeab4ycdx/SQTExamFig1and2.PNG?dl=0- A5
- B3
- C10
- D7
6Which if the following is not one of the three conditions necessary for a failure to be observed
as distinguished in the RIP (or PIE) model?- AThe infected state must propagate to cause some output of the program to be incorrect.
- BThe fault in the program must be exercised by one of the test cases.
- CThe state of the program must be incorrect
- DThe location(s) in the program that contain the fault must be reached.
7Which of the following statements about the relationship between statement coverage and
decision coverage is correct?- AIf adding a test case causes a non-zero increase of decision coverage, then adding that test case
will also cause a non-zero increase in statement coverage. - BA test suite’s decision coverage is always higher than its statement coverage.
- C100% statement coverage always means 100% decision coverage.
- D100% decision coverage always means 100% statement coverage.
- AIf adding a test case causes a non-zero increase of decision coverage, then adding that test case
8Consider the decision table from Figure 3 (as used in credit card processing). Which is the
smallest set of test cases giving 100% MC/DC coverage? https://www.dropbox.com/s/atyl7ek3pvz195h/SQTExamFig3.PNG?dl=0- ATwo test cases, which together ensure that each condition is once true and once false.
- BFour test cases, corresponding to rule 1 and three test cases in which only one condition is false
- CEight test cases, corresponding to 23
cases implied by the the three conditions - DThree test cases, corresponding directly to the truth values for Rules 1–3.
9Which of the following is a non-functional quality characteristic?
- AFeasibility
- BMaintenance.
- CUsability
- DRegression.
10Which of the following is true regarding equivalence partitioning and boundary value analysis?
- AThere is no need to do both techniques because every boundary is in some partition.
- BIt is recommended to choose partition values which are not boundary values.
- CBoth techniques are structured-based techniques.
- DThree-value boundary value analysis is more efficient than two-value boundary value analysis
with equivalence partitioning
11Which of the following test design techniques is most focused on validation and least on
verification?- ADecision table testing.
- BBoundary value analysis.
- CExploratory testing.
- DUnit testing.
12Immediately after launch, the US site healthcare.gov (also known as “ObamaCare”) was
plagued by problems. Which of the following test principles is most helpful when trying to explain these
problems?- AThe absence-of-errors fallacy
- BImportance of early testing.
- CTesting is context dependent.
- DPesticide paradox
13To derive test cases from a state machine, you can turn it into a state transition table. How
would you extend your test suite in order to test “sneak paths”?- AI add a test case for every cell in the transition table.
- BI add one test case for every transition.
- CI add an extra test case for every loop.
- DI add a test case for every empty cell.
14To test the method in Figure 4, what would be the best use of mock objects? https://www.dropbox.com/s/6we84xk3xg0ulqp/SQTMidtermFig1.PNG?dl=0
- AMock PictureReader to improve observability, and mock HandlerListener to improve controllability.
- BMock both PictureReader and HandlerListener to improve controllability as well as observability.
- CMock PictureReader to improve controllability, and mock HandlerListener to improve observability.
- DThe use of mocks is not helpful in this case.
15In Bertrand Meyer’s article Applying ”Design By Conctract” he explains how to handle
contracts when dealing with exceptions in a so-called rescue routine (which are similar to Java’s catchblocks).
Which of the following statements best describes Bertrand Meyer’s proposal?- AThe rescue routine can assume the preconditions hold.
- BThe rescue routine should restore the invariant.
- CThe rescue routine can assume the invariant to hold
- DThe rescue routine should ensure the postcondition.
16The primary use of a pull request is:
- ATo request a review so that the changes in a branch once approved can be merged.
- BTo trigger an automated build.
- CTo request a fork of a remote repository.
- DTo request help with a technical problem.
17What is a key characteristic of structure-based testing techniques?
- AThey use a formal or informal model of the software or component.
- BThey are used both to measure coverage and to design tests to increase coverage.
- CThey are mainly used to assess the structure of a specification.
- DThey are based on the skills and experience of the tester.
18The main implication of the pesticide paradox is that
- AWe need variation in testing.
- BTesters and developers should be independent
- CA passing test suite gives a false sense of confidence.
- DToo much testing is not cost-effective.
19Non-functional testing includes:
- ATesting a system feature using only the software required for that function.
- BGaining user approval for the system.
- CTesting to see where the system does not function correctly.
- DTesting the quality attributes of the system including reliability and usability.
20A JUnit test class P is implemented with the Parameterized test runner. It is parameterized
by x, y, and outcome, and comes with an array of 6 values annotated with the @Parameter annotation.
The class contains two test cases t1 and t2, both annotated with @Test. t1 uses the parameters; t2 does
not use the parameters. When running test class P, how many test cases are executed?- A2
- B36
- C12
- D7
21Test-Driven Development (TDD) as discussed in class distinguishes an inner and outer
feedback loop. What is their role?- AThe outer loop addresses functional (acceptance) testing, and the inner loop unit testing.
- BThe outer loop addresses non-functional requirements, where as the inner loop addresses functional
requirements. - CThe outer loop addresses unit testing, and the inner loop addresses refactoring.
- DThe outer loop addresses unit testing, and the inner loop functional (acceptance) testing
22Model-based testing requires a model that
- ACan be automatically generated from the source code.
- BIs simpler than the artifact, yet preserves certain key properties.
- CCan be represented as a decision table.
- DIs at least as complex as the original artifact.
23Givin the following ON and OFF points for x:
• ON: 75
• OFF: 74
What condition corresponds to these points?- Ax < 74
- Bx > 74
- Cx ≥ 75
- Dx ≤ 75
24Which of the following statements is true?
- ADeliberate technical debt can be necessary in order to meet external deadlines
- BTechnical debt can be and should be avoided at all cost
- CRefactoring is a common cause of technical debt
- DA smell is a problem in the code that must be fixed
25Outsourcing as used at financial institutions (such as Munich RE as discussed in class) can
be understood in terms of the V-Model. Which statement covers this best?- AAcceptance testing can only be done by the financial institution itself
- BThe financial institution is primarily concerned with activities that are in the left leg of the
V-model. - CEvery arrow from left to right in the V-model should correspond to a subcontractor relationship.
- DThe development subcontractor needs to do no testing.
26Consider the method from Figure 5 and its test code in Figure 6. Which of the following
statements about the statement coverage of the compactDiff method is true? (See also Question 32)
https://www.dropbox.com/s/rr9g2yzv0sborrl/SQTExamFig5.PNG?dl=0
https://www.dropbox.com/s/f0fhms69olv6r1d/SQTExamFig6.PNG?dl=0- ATC1 and TC4 together yield 100% statement coverage, but not by themselves
- BThe four test cases TC1-TC4 are not sufficient to yield 100% statement coverage: Some of the
other 8 test cases are needed for that - CTC4 alone yields 100% statement coverage
- DTC1 alone yields 100% statement coverage
27The security vulnerability called gotofail in Apple’s TLS/SSL implementation is an example
of:- AA fault that could have been easily caught by automated test input generation using genetic
algorithms - BA code formatting problem that could have been automatically fixed by using tools for correcting
indentation - CA problem of non-reachable code that could have been easily caught through analysis of the
control flow graph - DA boundary value problem that could have been easily caught by the on/off domain testing
strategy
- AA fault that could have been easily caught by automated test input generation using genetic
28Which of these is a functional test?
- AChecking the on-line bookings screen information and the database contents against the information
on the letter to the customers - BChecking how easy the system is to use
- CMeasuring response time on an on-line booking system
- DChecking the effect of high volumes of traffic in a call-center system.
- AChecking the on-line bookings screen information and the database contents against the information
29A regression test:
- AIs obtained through linear regression analysis between the coverage and the number of defects
found. - BWill always be automated.
- CWill check unchanged areas of the software to see if they have been affected
- DWill check changed areas of the software to see if they have been affected
- AIs obtained through linear regression analysis between the coverage and the number of defects
30Oracles can be strong (verifying concrete values) or weak (partial oracles, conducting a reasonableness
check or self check) verifying generic properties. Automated test input generation techniques
typically:- AMake use of strong oracles, as this leads to the best test results at the least cost.
- BMake use of weak oracles, as this permits testing many different inputs at low cost
- CMake use of weak oracles, as this reduces the number of false alarms.
- DMake use of strong oracles, as this gives most confidence
31A state object’s self-check method, as discussed in the article Beyond Page Objects is aimed at:
- AValidating that the inputs entered on a web page meet the invariant of the page controllers.
- BChecking that the object meets its preconditions
- CChecking that triggering an event leads to the correct next state.
- DVerifying that the web application is in a given state.
32Consider the method from Figure 5 and its test code in Figure 6. Which of the following
statements about the decision coverage of the compactDiff method is true? (See also Question 26)
https://www.dropbox.com/s/rr9g2yzv0sborrl/SQTExamFig5.PNG?dl=0
https://www.dropbox.com/s/f0fhms69olv6r1d/SQTExamFig6.PNG?dl=0- ATC4 alone yields 100% decision coverage.
- BTC2 and TC3 together yield 100% decision coverage.
- CThe four test cases TC1–TC4 are not sufficient to yield 100% decision coverage: Some of the
other 8 test cases are needed for that. - DTC1 and TC4 are not sufficient to yield 100% decision coverage.
33Which statement best characterizes the two legs of the V-model? The V-model contains:
- ATest conditions at its left leg, and test outcomes at its right leg.
- BVerification activities at its left leg, and validation activities at its right leg
- CTest levels at its left leg, and test types at its right leg.
- DSystem decomposition at its left leg, and test levels at its right leg.
34Consider a domain matrix with N conditions for variable x and M conditions for variable y.
Which of the following claims is correct?- AThe number of test cases required by the one by one strategy is N ∗ M.
- BIf the value for one variable is an off point, the value for the other variable must be an on point.
- CThe number of test cases required by the one by one strategy is N + M.
- DThe number of on points in the derived test suite is equal to the number of conditions.
35Is it possible to write a program that can check any other Java program and ensure that it
never prints “Stop Censorship Now”?- ANo, this cannot be done as this would require solving the halting problem.
- BNo, this cannot be done because of the combinatorial explosion problem.
- CYes, this is trivial, just search for the requested string.
- DYes, this can be done, because even if the string would be encrypted, the program would also
have to contain the encryption keys.
36A decision table is a software model in which a response is determined based on Boolean
conditions over a number of input variables. For which of the following cases is a decision table most
suitable?- AWhen the Boolean expressions formed by the conditions are mutually exclusive.
- BWhen the response depends on prior inputs or output of the system under test.
- CWhen all inputs are from finite domains such as integer ranges or enumerations
- DWhen the response depends on the order in which inputs are evaluated.
37The best use of code coverage is as:
- AA tool to show your superiors that you have tested all functionality properly.
- BA tool to assist in reviewing code changes.
- CA metric that ensures a minimum level of testing for the entire code base
- DA tool to help managers assess developers test performance
38Which of the following statements concerning modern code reviews as discussed in the
lectures is true?- AMost code changes resulting from code reviews fix defects spotted during review
- BSuccessful code reviews lead to software changes
- CMost code changes resulting from code review improve functionality.
- DMost code changes resulting from code reviews improve maintainability
39What is the key element maven provides to support software development?
- ASource code version control.
- BA suite of useful external libraries maintained by the Apache Software Foundation
- CExtended compilation warnings to help you improve the code
- DA fully reproducible build and test procedure.
40You 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 a problem in the library, and requires a fix in that library
- BThis indicates a spurious warning, and requires that you investigate whether you should add an
@SuppressWarnings annotation to your application. - 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 an integration fault, and requires a redesign that involves the interface that is
offered by the library and used by your application.
Information
- Description
- Computer Science Quiz on Software Quality and Testing exam 2015, created by Bas Musters on 03/07/2017.
- Author
- Bas Musters
- Language
- English
- Views
- 115
- Tags
- Rating
- No ratings yet Rate this quiz