You are on page 1of 3

Subject: SWT301 – SOFTWARE TESTING

1.

QN=1 What is the Cyclomatic complexity used for?


a. For computing the number of test cases
b. For computing the number of paths
c. For computing the number of conditions
d. For computing the number of branches

QN=2 What is the Cyclomatic complexity of the following code?


IF (card is a valid card) THEN
display “Enter PIN number”
IF (PIN is valid) THEN
select transaction
ELSE (otherwise)
display “PIN invalid”
ELSE (otherwise)
reject card
END
a. 2
b. 3
c. 4
d. 5

QN=3 How many test cases for 100% branch coverage of the following code?
READ A
IF A > 0 THEN
IF A = 21 THEN
display “Key”
ENDIF
ENDIF
a. 5
b. 4
c. 3
d. 2

QN=4 Which technique is usually used in system testing?


a. Black box technique
b. Bottom – up technique
c. Top – down technique
d. White box technique

QN=5 What is the static technique?


a. Is a technique that does not execute code
b. Is a technique that uses a cause – effect graph
c. Is a technique usually used in system testing
d. Is a technique that usually uses incremental approach

QN=6 How many symbolic test scripts for variable card in the following
code?
READ card
IF (card is a valid card) THEN
display “Enter PIN number”
IF (PIN is valid) THEN
select transaction
ELSE (otherwise)
display “PIN invalid”
ELSE (otherwise)
reject card
END
a. 1
b. 2
c. 3
d. 4

QN=7 What is the advantage of testing by developers?


a. Know the code best
b. Difficult to destroy own work
c. Subjective assessment
d. Tendency to see expected results

QN=8 Which of the following statements is false?


a. Component testing is usually done by programmers
b. Integration testing in the small is usually done by developers
c. System testing is usually done by independent test team
d. Acceptance testing is usually done by users (clients)

QN=9 Which knowledge is the most important for White Box Testing?
a. Knowledge of behaviours of the program to be tested
b. Knowledge of user requirements
c. Knowledge of functions of the program to be tested
d. Knowledge of internal architecture of the program to be tested

QN=10 You need to enter data for a text box. The valid data is 10 to 25
characters long. Which of the following test cases are suitable for
boundary analysis method?
a. 6 characters; 7 characters; 13 characters; 19 characters; 20 characters
b. 5 characters; 10 characters; 18 characters; 25 characters; 35 characters;
c. 0 characters; 9 characters; 10 characters; 25 characters; 26 characters;
d. 0 characters; 6 characters; 10 characters; 25 characters; 35 characters

2. Hãy thiết kế các ca kiểm thử all-c-uses cho các biến trong đoạn mã sau

You might also like