R4RIN
Articles
Java 8
MCQS
Maven MCQ Quiz Hub
Maven Mcq Set 7
Choose a topic to test your knowledge and improve your Maven skills
1. For the following function, int example (int x, int y) { int z = 0; if ((x>0) && (y>0)) { z = x; } return z; } Which function call ensures condition coverage for this function?
example(1,1)
example(0,1)
example(1,1) and example(0,1)
example(1,0) and example(0,1)
2. A combination of function coverage and branch coverage is sometimes also called ______
Function coverage
Statement coverage
Decision coverage
Condition coverage
3. ______ criterion requires that every point of entry and exit in the program has been invoked at least once.
Function coverage
Statement coverage
Decision coverage
Condition coverage
4. For the following code if (a or b) and c then The condition/decision criteria will be satisfied by:
a=true, b=true, c=true and a=false, b=false, c=false
a=false, b=true, c=true
a=true, b=false, c=true
a=true, b=true, c=false
5. _____ criterion extends the decision criteria with specifications that each condition has to affect the decision outcome independently.
Redundant Condition/decision coverage
Transferred Condition/decision coverage
Modified Condition/decision coverage
Lossless Condition/decision coverage
6. _________ criterion requires that inside each decision, all combinations of conditions are tested.
Redundant Condition/decision coverage
Multiple condition coverage
Modified Condition/decision coverage
Lossless Condition/decision coverage
7. _______ requires that in a method taking parameters, all the common values for such parameters be considered.
Redundant Condition/decision coverage
Multiple condition coverage
Modified Condition/decision coverage
Parameter Value Coverage
8. ________ applications are often required to show that testing achieves 100% of some form of code coverage.
Non safe
Safety Critical
Critical
Lossless Condition/decision coverage
9. PVC stands for ______
Parameter Value Condition
Parameterised Values Check
Parameter Value Coverage
Path Value Check
10. _______ is a method of achieving complete branch coverage without achieving complete path coverage.
Basis Path Testing
Loss Testing
Universal Testing
Random Testing
11. ______ criteria checks whether each state in a finite-state machine been reached and explored.
Path coverage
Loop coverage
Entry/exit coverage
State coverage
12. ______ is a software analysis method used to identify structural units in code under test.
Linear code sequence and jump
State coverage
Lossless packs
Linear jumps
13. LCSAJ stands for ________
Loading Code standard as Jumps
Linear code sequence and jump
Loading code sequence and jump
Linear coverage sequence and jump
14. The JJ in JJ-path stands for ______
Just Jump
Jump-in-JUnit
Java-JUnit
Jump-to-Jump
15. In a narrower sense, LCSAJ is also called ______
JJ-Path
Code Coverage
System Code Analysis
Code Breakdown
16. _______ is the most common and least efficient debugging technique.
Brute force debugging
Backtracking
Cause elimination
Program slicing
17. An effective method for locating errors in small programs is to ___________ the incorrect results through the logic of the program until the point where the logic went astray is found.
Search
Backtrack
Slice
Eliminate
18. ______ involves the use of induction or deduction and introduces the concept of binary partitioning.
Brute force debugging
Backtracking
Cause elimination
Program slicing
19. __________ is the computation of the set of programs statements.
Brute force debugging
Backtracking
Backtracking
Program slicing
20. The point at which the program slice affects the values at some point of interest is ______
Slicing criterion
Program criterion
Sliced Parts criterion
Information flow control
21. Program slicing can be used in _______ to locate source of errors more easily.
Testing
Coding
Debugging
Checking
22. A profiler can look for _________ in an application.
Bottlenecks
Redundancies
Nodes
States
23. _____ tests are a superset of all other tests.
Unit
Integration
Loss
Acceptance
24. A ___________ is a test that exercises code by focusing on a single method.
Logic unit test
Integration unit test
Functional unit test
Acceptance unit test
25. In logic unit test, the boundaries of a given test can be controlled by using _____
Objects
Mock objects
Controllers
Modules
26. A _____is a test that focuses on the interaction between components in their real environment.
Logic unit test
Integration unit test
Functional unit test
Acceptance unit test
27. Code that accesses a database has tests that effectively _________ the database.
Ignore
Delete
Call
Define
28. A ______ is a test that extends the boundaries of integration unit testing to confirm a stimulus response.
Logic unit test
Integration unit test
Functional unit test
Acceptance unit test
29. _______ more dependent on an external environment than pure unit tests are.
Logic unit test
Integration unit test
Functional unit test
Acceptance unit test
30. _______ are put in scope because they’re often useful as part of the battery of tests run in development.
Logic unit test
Integration unit test
Functional unit tes
Acceptance unit test
31. Functional Unit tests don’t test a complete ____________ as expected by pure functional tests.
Workflow
Object
Class
Functions
32. The __________ test relies exclusively on the external system interface to verify its correctness.
White Box
Unit
Black Box
Lossless Condition/decision coverage
33. In black box testing, all that is needed to know in order to test the system properly is the system’s ________
Functional specification
Modularity
Redundancy
Class definition
34. White box testing provides better test _________ than black box testing.
Result
Coverage
Mechanism
Acceptance
35. ______ tests are more difficult to write and run.
White Box
Unit
Black Box
Lossless Condition/decision coverage
36. Black box tests can bring more ________ than white box tests.
Value
Coverage
Mechanism
Acceptance unit test
37. Using _____ testing, tests can be created that cover the public API of an application.
White Box
Unit
Black Box
Loss Testing
38. Higher test coverage is achieved by white box tests because of ____
Access to more methods
Better documentation
Faster tests
More accepted tests
39. ________ tests can control both the inputs to each method and the behaviour of secondary objects.
White Box
Unit
Black Box
Loss
40. White box unit tests can be written against ____________ package-private, and public methods.
Static
Private
Protected
void
41. _____ is a free Java tool that calculates the percentage of code accessed by tests.
Cobertura
JUnit
XUnit
Maven
42. Cobertura is based on _______
JUnit
XUnit
Maven
Jcoverage
43. In order to measure test coverage, Cobertura creates __________ of class files specified.
Instrumented copies
Objects
Mocks
Images
44. While using Cobertura from the command line, which parameter specifies the base directory?
−−datafile
−−destination
−−ignore
−−basedir
45. _______ is used to specify the name of the file to use for storing the metadata about the classes.
−−datafile
−−destination
−−ignore
−−basedir
46. _____ specifies the output directory for the instrumented classes.
−−datafile
−−destination
−−ignore
−−basedir
47. ______ specifies a regular expression to filter out certain lines of the source code.
−−datafile
−−destination
−−ignore
−−basedir
48. ______ is used to add extra classes and jar files to Cobertura.
−−datafile
−−destination
−−ignore
−−auxClasspath
49. The default value for the –datafile parameter is _____
cobertura.ser
cobertura.dat
datafile.ser
cobertura.log
50. To use cobertura, we need to include ____
cobertura.jar
junit.jar
hamcrest.jar
junitCobertura.jar
51. The Cobertura command to run while reporting is _____
cobertura-report.bat
cobertura-instrument.bat
cobertura-check.bat
cobertura-merge.bat
52. The ______ parameter is used to specify the type of report.
datafile
basedir
encoding
format
53. _____ parameter specifies the encoding used to read the source.
datafile
basedir
encoding
format
54. The source code directories are used to calculate the ____________ of each class.
Data size
Lines of code
Cyclomatic code complexity
Mutant score
55. The default value of the format parameter is _______
html
jar
java
dat
56. The Cobertura command to run while checking coverage is ______
cobertura-report.bat
cobertura-instrument.bat
cobertura-check.bat
cobertura-merge.bat
57. “cobertura-check.bat” is run ________ the JUnit tests to show which classes do not have adequate test coverage.
Before
After
Along with
Before and after
58. The ___________ parameter specifies the minimum acceptable branch coverage rate needed by each class during Cobetura coverage checking.
datafile
branch
line
regex
59. The ___________ parameter specifies the minimum acceptable line coverage rate needed by each class during Cobetura coverage checking.
datafile
branch
line
regex
60. The ___________ parameter specifies the minimum acceptable branch coverage rate needed by each package during Cobetura coverage checking.
datafile
packagebranch
line
regex
Submit