You are on page 1of 4

Subject: SWT301 – SOFTWARE TESTING

1.

QN=1 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=2 Why is testing necessary?


a. To prove that the software has no faults
b. Because software is likely to have faults
c. Because testing is included in the project plan
d. To fill the time between delivery of the software and the release date

QN=3 Which knowledge is the most important for Black Box Testing?
a. Knowledge of functions of the program to be tested
b. Knowledge of programming language of the program to be tested
c. Knowledge of algorithm of the program to be tested
d. Knowledge of data variables of the program to be tested

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


a. Big – bang 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 What security testing belongs to?


a. Acceptance testing
b. System testing
c. Integration testing
d. Component testing

QN=7 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=8 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=9 What is the disadvantage of testing by development team?


a. Some independence
b. Technical depth
c. On friendly terms with “buddy” - less threatening
d. Technical view, not business view

QN=10 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)

2. Ứng dụng kỹ thuật EP để xây dựng bộ dữ liệu kiểm thử cho bài toán giải phương
trình bậc 2
3. Vẽ sơ đồ luồng điều khiển của đoạn mã ở câu QN=7.
Bài 2:

EP for input
D1= {<a, b, c> | a = b = c}
D2= {<a, b, c> | a = b, a # c}
D3= {<a, b, c> | a = c, a # b}
D4= {<a, b, c> | b = c, a # b}
D5= {<a, b, c> | a# b, a # c, b # c}
---Trường họp cho không phải là phương trình bậc 2:
D6= {<a, b, c> | a = 0, b = c}
D7= {<a, b, c> | a = 0, b # c}
D8= {<a, b, c> | a = 0, b = 0, c # 0}
D9= {<a, b, c> | a = b = c = 0}

ID a b c Expect output
D1 2 2 2 Phương trình vô nghiệm
D2 2 2 3 Phương trình vô nghiệm
D2 2 2 -3 Phương trình có 2 nghiệm
D2 2 2 1/2 Phương trình có nghiệm kép
D3 2 1 2 Phương trình vô nghiệm
D3 2 5 2 Phương trình có 2 nghiệm
D3 2 4 2 Phương trình có nghiệm kép
D4 2 5 5 Phương trình vô nghiệm
D4 -2 5 5 Phương trình có 2 nghiệm
D4 1,25 5 5 Phương trình có nghiệm kép
D5 1 2 3 Phương trình vô nghiệm
D5 1 -5 3 Phương trình có 2 nghiệm
D5 1/9 2 9 Phương trình có nghiệm kép
D6 0 5 5 Lỗi
D7 0 5 6 Lỗi
D8 0 0 7 Lỗi
D9 0 0 0 Lỗi
Bài 3:

Sơ đồ luồng điều khiển của đoạn mã ở câu QN=7:

You might also like