ProTest22 2021

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

Subject: SWT301 – SOFTWARE TESTING

1.

QN=1 What is a bug?


a. A state of the software, caused by an error
b. A human action that produces an incorrect result
c. A deviation of the software from its expected delivery or service
d. A manifestation of an error in software

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 The right order of testing is:


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

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 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=7 What is the Cyclomatic complexity of the following code?


Read A
Read B
IF A < 0 THEN
Print “A negative”
ELSE
Print “A positive”
ENDIF
IF B < 0 THEN
Print “B negative”
ELSE
Print “B positive”
ENDIF
a. 2
b. 3
c. 4
d. 5

QN=8 What is the advantage of testing by programmers?


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 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. Ứng dụng kỹ thuật cause – effect graph để 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 cho đoạn mã ở câu QN = 7.
Bài 2:
Cause - Effect Diagram:

Decision table:

1 2 3 4 5 6 7 8 9 10
C1: a != 0 F F F T T T T T T T
C2: b != 0 F F T - - - - - - -
C3: c != 0 F T - - - - - - - -
C4: Delta = 0 - - - T F F T T F F
C5: Delta > 0 - - - F T F T F T F
C6: Delta < 0? - - - F F T - T T F
Number of 8 8 16 4 4 4 8 4 4 4
rules
A1: no X x
solution
A2: countless X
solutions
A3: one x
solution
A4: double X
solution
A5: two x
solutions
A6: not x x x x
available

Test case:

ID A B C Expected Output
1 0 0 0 Vô số nghiệm
2 0 0 5 Vô nghiệm
3 0 5 2 X=-2/5
4 1 2 1 Nghiệm kép x=-1
5 1 2 -3 2 nghiệm x=1,
x=-3
6 1 2 3 Vô nghiệm

Bài 3:

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

You might also like