Розбір тестових питань по четвертому розділу.
В цьому відео працюємо з тестами до 4 розділу.
00:00:23 Static test design techniques
00:01:08 Dynamic test design techniques
00:02:38 Працюємо з тестами
Всі питання з відео з правильними відповідями наводяться нижче.
Question 1
One of the fields on a form contains a text box which accepts alphabets in lower or upper case. Identify the invalid Equivalence class value.
- CLa01ss.
- cLASS.
- CLASS.
- Class.
Question 2
“Experience based” test design techniques, typically
- Use decision tables to generate the Boolean test conditions to be executed.
- Identify the structure of the system or software at the component, integration or system level.
- Use the skill, intuition and experience of the tester to derive the test cases, using error guessing and exploratory testing.
- Establish traceability from test conditions back to the specifications and requirements.
Question 3
A piece of software has been given for testing. What tests from the following will you perform?
1) Test the areas most critical to business processes
2) Test the areas where faults will be maximum
3) Test the easiest functionalities
- 1 is true, 2&3 are false.
- 1&2 are false, 3 is true
- 1,2 &3 are true.
- 1&2 are true and 3 is false.
Question 4
Which of the following is a white box testing design characteristic?
- To be based on specifications.
- To be based on an analysis of the test basis documentation.
- To be based on an analysis of the structure of the component or system.
- To include both functional and non-functional testing.
Question 5
Which of the following test design techniques is not a black box technique?
- Equivalence partitioning
- State transition testing
- Boundary value analysis
- Statement coverage
Question 6
A program validates a numeric field as follows: Values less than 10 are rejected, values between 10 and 21 are accepted, values greater than or equal to 22 are rejected. Which of the following input values cover all of the equivalence partitions?
- 10, 21, 22.
- 10, 11, 21.
- 3, 20, 21.
- 3, 10, 22.
Question 7
Consider the following statements:
(i.)100% statement coverage guarantees 100% branch coverage.
(ii.)100% branch coverage guarantees 100% statement coverage.
(iii.) 100% branch coverage guarantees 100% decision coverage.
(iv.)100% decision coverage guarantees 100% branch coverage.
(v.)100% statement coverage guarantees 100% decision coverage.
- i & v are True; ii, iii & iv are False.
- ii is True; i, iii, iv & v are False.
- ii, iii & iv are True; i & v are False.
- ii & iii are True; i, iv & v are False.
Question 8
Consider the following:
Pick up and read the newspaper.
Look at what is on television.
If there is a program that you are interested in watching then switch the television on and watch the program.
Otherwise.
Continue reading the newspaper.
If there is a crossword in the newspaper then try and complete the crossword. Define SC and DC.
- SC = 2 and DC = 2.
- SC = 2 and DC = 3.
- SC = 1 and DC = 3.
- SC = 1 and DC = 1.
Question 9
Considering the following pseudo-code, calculate the MINIMUM number of test cases for statement coverage, and the MINIMUM number of test cases for decision coverage respectively.
READ A READ B READ C
IF C>A THEN
IF C>B THEN
PRINT ‘C must be smaller than at least one number’
ELSE PRINT ‘Proceed to next stage’
ENDIF
ELSE PRINT ‘B can be smaller than C’
ENDIF
- 2, 4.
- 3, 2.
- 3, 3.
- 2, 3.
Question 10
Equivalence partitioning is:
- A black box testing technique appropriate to all levels of testing
- A black box testing technique used only by developers
- A white box testing technique appropriate for component testing
- A black box testing technique than can only be used during system testing
Question 11
What is static analysis?
- The decision between using white and black box test techniques.
- Executing software to validate the most common path through the code.
- A technique to find defects in software source code and software models, performed without executing code.
- It is a testing technique used during system testing.
Question 12
Features of White Box Testing Technique:
(i.) We use explicit knowledge of the internal workings of the item being tested to select the test data.
(ii.) Uses specific knowledge of programming code to examine outputs and assumes that the tester knows the path of logic in a unit or a program.
(iii.) Checking for the performance of the application
(iv.) Also checks for functionality.
- i, ii are true and iii and iv are false.
- ii ,iii is true and i,iv is false.
- iii is true and i,ii, iv are false.
- iii and iv are true and i,ii are false.
Question 13
Consider the following pseudo code:
Begin
Input X, Y
If X > Y
__Print (X, ‘is greater than’, Y)
Else
__Print (Y, is greater than or equal to’, X)
Endlf
End
What is the minimum number of test cases required to guarantee both 100% statement coverage and 100% decision coverage?
- Statement coverage = 3, Decision coverage = 3
- Statement coverage = 2, Decision coverage = 2
- Statement coverage = 1, Decision coverage = 2
- Statement coverage = 2, Decision coverage = 1
Question 14
For the code fragment given below, which answer correctly represents minimum tests required for statement and branch coverage respectively?
Discount rate=1;
Fare = 1000;
If ((person == “senior citizen”) and (“travel month = January”))
Bonuspoints = 100+Bonuspoints
If (class==”first”) discountRate = .5;
Fare = fare * discountRate;
- Statement Coverage = 2, Branch Coverage = 4
- Statement Coverage = 2, Branch Coverage = 2
- Statement Coverage = 1, Branch Coverage = 3
- Statement Coverage = 1, Branch Coverage = 2
Question 15
What is decision table testing?
- It’s a testing design technique based in the internal software structure.
- It’s a static test design technique.
- It’s a testing design technique to verify decisions.
- It’s a testing design technique based in the system requirements.
Question 16
Given the following code, which is true:
IF A > B
THEN C = A – B
ELSE C = A + B
ENDIF
Read D
IF C = D
Then Print “Error”
ENDIF
- 3 tests for statement coverage, 3 for branch coverage.
- 2 tests for statement coverage. 3 for branch coverage.
- 1 test for statement coverage, 3 for branch coverage.
- 2 tests for statement coverage, 2 for branch coverage.
Question 17
Given the following specification, which of the following values for age are in the SAME equivalence partition? If you are less than 18, you are too young to be insured. Between 18 and 30 inclusive, you will receive a 20% discount. Anyone over 30 is not eligible for a discount.
- 17, 18, 19.
- 17, 29, 31.
- 29, 30, 31.
- 18, 29, 30.
Question 18
Given the following:
Switch PC on
Start “outlook”
IF outlook appears THEN
Send an email
Close outlook
- 1 test for statement coverage, 2 for branch coverage.
- 1 test for statement coverage, 1 for branch coverage.
- 2 tests for statement coverage, 3 for branch coverage.
- 1 test for statement coverage. 3 for branch coverage.
Question 19
Equivalence Partitioning is best defined as:
- An technique that divides inputs into groups that are expected to exhibit similar behaviors.
- Applying to time-related data classes only.
- A form of white-box testing.
- A method to reduce test coverage.
Question 20
Which of the following best describes the Black-box technique?
- It uses decision coverage for completeness.
- It ensures all possible branches in the code are tested.
- It is based on the internal structure of the system.
- It can be done without reference to the internal structure of the component or system.
Question 21
What is a test condition?
- A statement of test objectives and test ideas on how to test.
- An item or event that could be verified by one or more test cases.
- The process of identifying differences between the actual results and the expected results for a test.
- All documents from which the requirements of a component or system can be inferred.
Question 22
In a flight reservation system, the number of available seats in each plane model is an input. A plane may have any positive number of available seats, up to the given capacity of the plane. Using Boundary Value analysis, a list of available – seat values were generated. Which of the following lists is correct?
- 0, 1, 2, capacity plus 1, a very large number.
- 0, 1, 10, 100, capacity, capacity plus one.
- 0, 1, capacity, capacity plus 1.
- 1, 2, capacity -1, capacity, capacity plus 1.
Question 23
Why are error guessing and exploratory testing good to do?
- They will ensure that all of the code or system is tested.
- They can be used most effectively when there are good specifications.
- They can find defects missed by specification based and structure-based techniques.
- They don’t require any training to be as effective as formal techniques.