Vous êtes sur la page 1sur 5

1.

What is correct for industrial software:


a. Developed with clearly set goal
b. It solves some concrete user problem
c. Presence of errors (although not recommended), is not critical
d. Documentation is not important
2. What is fault?
a. Consequence of error – program is missing something, or the function is there but it is
not working as expected
b. System is not able to perform requested function
c. Error in code
3. What is incident?
a. Symptom which user observes and becomes aware that there is a failure in the system
b. Bug in software found during testing
c. Wrong handling of the system from the user side
4. Testing is:
a. Process of executing software with test cases
b. Process of fixing bugs in application
c. Process of creating proper documentation for the system
5. Testing has following different goals:
a. Finding failures
b. Proving that software has no bugs
c. Demonstrating correct behavior
d. Debugging the program
6. Test cases are selected in the following way:
a. Randomly
b. Carefully designed
c. All input combinations should be tested
7. What is test oracle:
a. Predicting test results, completely independent of software under test, which is used for
validating the correct behavior of software
b. Used for fixing bugs
c. Used in the software debugging phase
8. Classification of the testing based on the approach:
a. Functional
b. Unit
c. Structural
d. Regression
9. Classification of the testing based on the level:
a. Unit
b. Structural
c. Architectural
d. Integration
e. System
f. Load
10. What is true for structural testing:
a. Another name is white box testing
b. It is based on documentation
c. Goal is to execute and activate all program structures and data structures in code
d. Goal is to check non functional requirements, such as performance, security…
11. Goal of integration testing is:
a. Verification of functionality, performances and robustness between integrated modules
b. Detailed testing of each unit
c. Testing of isolated unit of source code, or part of class
12. For creating unit tests in Java (NetBeans), we use the following framework:
a. NUnit
b. JUnit
c. Selenium
13. Boundary values testing is based on:
a. Selecting test cases on the boundaries, one test case for each boundary value
b. Selecting test cases from examining the code
c. Selecting one test case for each input class
14. If input has to be in the interval 1-100, correct boundary values tests are:
a. 1, 50, 100
b. 0, 1, 2, 99, 100, 101
c. 0, 2, 99, 101
15. What is correct for equivalence classes testing:
a. The domain of input values must be divided into disjunctive subsets
b. For tests take one value from each subset (one test per one equivalence class)
c. For each border take one test
d. Tests are derived from decision table
16. If the input program condition is defined by the range of approved values between 20 and 99,
correct equivalence classes are:
a. One legal, 20 ≤ number ≤ 99
b. One illegal, 20 ≤ number ≤ 99
c. Two illegal, (number < 20) and (number > 99)
d. Two illegal, (number ≤ 20) and (number > 100)
17. Equivalence classes are often combined with
a. Decision tables
b. Cause effect graphs
c. Boundary values
d. State testing
18. Cause-effect graph testing is based on:
a. Relation between program inputs and program outputs
b. States of the system
c. Finding correct equivalence classes and carefully selecting test on the boundaries
between the classes
19. What of the following are limitation between causes?
a. Masking
b. One and only one
c. Exclusive
d. Inclusive
e. Shifting
20. On the basis of the cause effect graph, we create:
a. Control flow graph
b. Decision table
c. Legal classes for inputs and outputs
d. Boundary values
21. Error guessing testing technique is based on:
a. Detailed analysis of specification
b. Detailed analysis of the code
c. Previous tester’s experience as well as on the intuition
22. Structural testing can be performed:
a. On all testing levels (unit, integration, system)
b. Only on unit level
c. Only on integration level
d. Only on system level
23. What is CFG?
a. Graph showing causes and their effects
b. Program representation in shape of graph, implicitly showing all paths of execution
c. Graph deducted from decision table
24. In white box testing, tests are defined based on:
a. Code
b. System specification
c. Detailed system design
d. System requirements
25. In statement coverage, goal is:
a. To make tests in such way that every statement is executed at least once
b. Every path to be executed at least once
c. Every decision to be covered both as true and as false
26. Decision coverage is based on:
a. Every elementary part of complex condition should take both true and false
b. Every different branch of conditional statement is executed at least once
c. Every combination of elementary conditions is tested
27. 100% path coverage guarantees:
a. Statement coverage only
b. Decision coverage only
c. Both statement coverage and decision coverage
d. Nothing from above
28. If control flow graph is given with G = (V, E), V is set of vertices (nodes), E is set of edges,
cyclomatic complexity CC for the given graph is calculated as:
a. CC = E – V + 2
b. CC = V – E + 2
c. CC = E – V + 1
29. In JUnit, checking if the expected value is equal to actual value is performed with:
a. assertEquals
b. verifyEquals
c. AssertEqual
30. In JUnit, checking of the value of some condition can be done with:
a. assertTrue (condition)
b. assertFalse (condition)
c. using expected parameter
31. In JUnit, when we use expected parameter, we expect:
a. Precisely defined exception
b. No exception
c. Any exception
32. At the beginning of the JUnit script, it is required to import:
a. import static org.junit.Assert.*;
b. import static org.junit.test.*;
c. import org.junit.*;
d. import org.junit.test.assert;
33. In JUnit, what is the goal of the following import: import static org.junit.Assert.*;
a. Asserts can be written without class prefix, they are static methods of the JUnit Assert
class
b. Provides visibility of the JUnit framework classes, such Test…
c. We cannot use asserts without it
34. Every separate test in JUnit script is written as:
a. Method
b. Class
c. Interface
d. Abstract class
e. Inner class
35. Every separate test in JUnit script must have prefix:
a. @Before
b. @After
c. @Assert
d. @Test
36. In JUnit, exception java.lang.AssertionError is thrown when:
a. Exception was thrown in executing code under test
b. If the expected and actual value are not same
c. There was exception which was expected, but was not thrown
37. In JUnit, when we want to temporary skip execution of some test, we use:
a. @Skip
b. @Ignore
c. @Override
d. @TearDown
38. Increase of the coverage percentage is achieved by:
a. systematic adding of tests
b. random adding of tests
c. further analysis of the system requirements
39. What is true for white box
a. Branch(decision) coverage guarantees path coverage
b. Branch(decision) coverage guarantees statement coverage
c. Statement coverage guarantees condition coverage
d. Condition coverage guarantees statement coverage
40. What is true for multiple condition coverage:
a. We design tests in such way that we test all possible combinations of elementary
conditions in decisions
b. Number of tests grows exponentially for number of conditions (2^n tests in case of n
conditions)
c. Often too expensive for implementation, practical only in case n is small
d. Always possible to be implemented, for any number n
e. We need to test just a subset of all possible combinations of elementary conditions
41. In path coverage, it is necessary to cover:
a. Basic set of paths
b. Set of linear dependent paths
c. Any subset of paths
42. In case source code does not have IF statements or FOR loops, cyclomatic complexity is:
a. 2
b. 1
c. 4
d. 0
43. Very useful in software testing due to two properties of cyclomatic complexity CC for the given
part of code:
a. CC is the upper limit of number of tests needed for complete decision (branch) coverage
b. CC is the lower limit (minimum) of number of paths through control flow graph
c. CC it the lower limit of the number of tests needed for complete statement coverage
d. CC is showing the number of equivalence classes needed for testing
44. Cyclomatic complexity of program can show:
a. level of psychological complexity of the program
b. number of methods in complete program
c. Level of difficulty to understand the code (by the another programmer)

Vous aimerez peut-être aussi