S2 20212022CSEB424 - 4313 Final Exam

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

COLLEGE OF COMPUTING AND INFORMATICS

PUTRAJAYA CAMPUS

FINAL EXAMINATION

SEMESTER 2 2021/2022

PROGRAMME : Bachelor of Computer Science (Software Engineering)


(Hons.)
Bachelor of Computer Science (Systems And
Networking) (Hons.)
Bachelor of Information Technology (Information
System) (Hons.)

SUBJECT CODE : CSEB424

SUBJECT : Software Testing

DATE : May 2022

DURATION : 2 Hours and 30 minutes

INSTRUCTIONS TO CANDIDATES:

1. The total marks for this exam is 100.


2. There are TWO (2) SECTIONS to this paper: Section A and Section B.
3. For Section A, answer using the OMR form. Tie the OMR form together with your
answer booklet.
4. For Section B, answer ALL questions in the answer booklet provided.

_______________________________________________________ __________
THIS QUESTION PAPER CONSISTS OF SEVENTEEN (17) PRINTED PAGES
INCLUDING THIS COVER PAGE

Page 1 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

SECTION A: MULTIPLE CHOICES (30 QUESTIONS, 30 MARKS)


Instruction: Please CHOOSE the BEST answer from the choices given.

1. What is the test basis?


A. The point during software development when testing should start.
B. The body of knowledge used for test analysis and design.
C. The source to determine the actual results from a set of tests.
D. The method used to systematically devise test conditions.

2. When the tester verifies the test basis while designing tests early in the lifecycle,
which common test objective is being achieved?
A. Gaining confidence.
B. Finding defects.
C. Preventing defects.
D. Providing information for decision making.

3. When following the fundamental test process, when should the test control
activity take place?
A. During the planning activities.
B. During the implementation and execution activities.
C. During the monitoring activities.
D. During all the activities.

4. Which of the following is a CORRECT statement?


A. A developer makes a mistake that causes a defect that may be seen as a
failure during dynamic testing.
B. A developer makes an error which results in a failure that may be seen
as a fault when the software is executed.
C. A developer has introduced a failure that results in a defect that may be
seen as a mistake during dynamic testing.
D. A developer makes a mistake that causes a bug that may be seen as a
defect when the software is executed.

Page 2 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

5. A new retail product was released to production by your company. Shortly after
the release, it was apparent that there were numerous problems with the point-
of-sale application. This resulted in several customer complaints and negative
postings on social media encouraging people to take their business to your
competitor. You have investigated the problems and have discovered that the
production point of sale equipment is a later model than the model used in
testing. The software functions correctly on the old version but fails on the later
model.

Given this scenario, what is the root cause and what is the effect?
A. The root cause is the old equipment and the effect is the new equipment.
B. The root cause is the customer complaints and the effect is the social
media postings.
C. The root cause is conducting the testing on the wrong version of the
equipment and the effect is the customer complaints and postings.
D. The root cause is the software failing on the later model and the effect is
the customer complaints.

6. Which of the following is a TRUE statement about exhaustive testing?


A. It is a form of stress testing.
B. It is not feasible except in the case of trivial software.
C. It is commonly done with test automation.
D. It is normally the responsibility of the developer during unit testing.

7. Which of the following is CORRECT regarding the test level at which


functional tests may be executed?
A. Unit and integration.
B. Integration and system.
C. System and acceptance.
D. All levels.

Page 3 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

8. Which of the following is a TRUE statement regarding the V-model lifecycle?


A. Testing involvement starts when the code is complete.
B. The test process is integrated with the development process.
C. The software is built in increments and each increment has activities for
requirements, design, build and test.
D. All activities for development and test are completed sequentially.

9. Usability testing is an example of which type of testing?


A. Functional
B. Non-functional
C. Structural
D. Change-related

10. What type of testing is normally conducted to verify that a product meets a
particular regulatory requirement?
A. Unit testing
B. Integration testing
C. System testing
D. Acceptance testing

11. You have been receiving daily builds from the developers. Even though they
are documenting the fixes they are including in each build, you are finding that
the fixes either aren’t in the build or are not working. What type of testing is
best suited for finding these issues?
A. Unit testing
B. System testing
C. Confirmation testing
D. Regression testing

Page 4 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

12. In a formal review, which role is normally responsible for documenting all the
open issues?
A. The facilitator
B. The author
C. The scribe
D. The manager

13. For a formal review, when are the entry and exit criteria defined in the process?
A. Planning
B. Review initiation
C. Individual review
D. Fixing and reporting

14. If the author of the code is leading a code review for other developers and
testers, what type of review is it?
A. An informal development review
B. A walkthrough
C. An inspection
D. An audit

15. You are participating in a role-based review session. Your assigned role is that
of a senior citizen. The product is an online banking application that is targeted
for use on smartphones. You are currently reviewing the product’s user interface
with a prototype that works on iPhones. Which of the following is an area that
you should review?
A. The speed of response from the banking backend.
B. The attractiveness of the application.
C. The size and clarity of the instruction text.
D. The reliability of the application when the connection is dropped.

Page 5 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

16. You are testing a machine that scores exam papers and assigns grades. Based
on the score achieved the grades are as follows:

1-49= F, 50-59 = D-, 60-69 = D, 70-79 = C, 80-89 = B, 90-100=A

How many test cases will you need to achieve minimum test coverage if you
apply equivalence partitioning?
A. 6
B. 8
C. 10
D. 12

17. You are testing a thermostat for a heating/air conditioning system. You have
been given the following requirements:
• When the temperature is below 70 degrees, turn on the heating system
• When the temperature is above 75 degrees, turn on the air conditioning
system
• When the temperature is between 70 and 75 degrees, inclusive, turn on
the fan only
Which of the following is the minimum set of test temperature values to achieve
100% two-value boundary value analysis coverage?
A. 70, 75
B. 65, 72, 80
C. 69, 70, 75, 76
D. 70, 71, 74, 75, 76

Page 6 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

18. You have been given the following conditions and results from those condition
combinations. Given this information, using the decision table technique, what
is the minimum number of test cases you would need to test these conditions?

Conditions:
Valid cash
Valid credit card
Valid debit card
Valid pin
Bank accepts
Valid Selection
Item in Stock
Results:
Reject Cash
Reject Card
Error Message
Return Cash
Refund Card
Sell Item

A. 7
B. 13
C. 15
D. 18

Page 7 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

19. You have been given the following requirement:

A user must log in to the system with a valid username and password. If they
fail to enter the correct combination three times, they will receive an error and
will have to wait 10 minutes before trying again. The test terminates when the
user successfully logs in.

How many test cases are needed to provide 100% state transition coverage?
A. 1
B. 2
C. 4
D. 5

20. Which of the following is a good reason to use experience-based testing?


A. You can find defects that might be missed by more formal techniques.
B. You can test for defects that only experienced users would encounter.
C. You can target the developer’s efforts to the areas that users will be more
likely to use.
D. It is supported by strong tools and can be automated.

21. If you are using error guessing to target your testing, which type of testing are
you doing?
A. Specification-based
B. Structure-based
C. Experience-based
D. Reference-based

22. If you need to provide a report showing test case execution coverage of the
requirements, what do you need to track?
A. Traceability between the test cases and the requirements.
B. Coverage of the risk items by test case.
C. Traceability between the requirements and the risk items.
D. Coverage of the requirements by the test cases that have been designed.

Page 8 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

23. You are working in a team of testers who are all writing test cases. You have
noticed that there is a significant inconsistency with the length and amount of
detail in the different test cases. Where should the test case guidelines have been
documented?
A. The test plan
B. The test approach
C. The test case template
D. The project plan

24. You have received the following description section in a defect report:

The report was executed per the attached steps, but the data was incorrect. For
example, the information in column 1 was wrong. See the attached screenshot.
This report is critical to the users and they will be unable to do their jobs without
this information.

What is the biggest problem with this defect report?


A. The developer won’t know how important the problem is.
B. The developer won’t know how to repeat the test.
C. The developer won’t be able to see what the tester is saying is wrong.
D. The developer won’t know what the tester expected to see.

Page 9 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

25. You have been given the following set of test cases to run. You have been
instructed to run them in order by risk and to accomplish the testing as quickly
as possible to provide feedback to the developers as soon as possible.

Test Case ID Duration Risk Priority Dependency


1 30 mins Low 6
2 10 mins Medium None
3 45 mins High 1
4 30 mins High 2
5 10 mins Medium 4
6 15 mins Low 2

Given this information, what is the best order in which to run these tests?
A. 2, 4, 5, 6, 1, 3
B. 4, 3, 2, 5, 6, 1
C. 2, 5, 6, 4, 1, 3
D. 6, 1, 3, 2, 4, 5

26. Who is normally responsible for the creation and update of a test plan for a
project?
A. The project manager.
B. The test manager.
C. The tester.
D. The product owner.

27. Which of the following is an example of a good exit criterion from system
testing?
A. All tests should be completed.
B. The project budget should be spent.
C. All defects should be fixed.
D. All severity 1 defects must be resolved.

Page 10 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

28. Which of the following is project risk?


A. A module that performs incorrect calculations due to a defect in a
formula
B. A failed performance test.
C. An issue with the interface between the system under test and a
peripheral device.
D. A problem with the development manager which is resulting in his
rejecting all defect reports.

29. Why is it important to define usage guidelines for a new tool?


A. Because this is a proven success factor in tool deployment.
B. Because this will ensure the licensing restrictions are enforced.
C. Because management needs to understand the details of the tool usage.
D. Because this will provide the information needed for the cost/benefit
analysis.

30. Which of the following is an example of a tool that supports static testing?
A. A tool that assists with tracking the results of reviews.
B. A defect tracking tool.
C. A test automation tool.
D. A tool that helps design test cases for security test.

Page 11 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

SECTION B: APPLICATION (7 QUESTIONS, 70 MARKS)


Instruction: Please answer ALL the questions.

Question 1
Consider the following use case “The order of a premium class client” for an e-shop.

Page 12 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

(a) Create a test case that covers the main path scenario for this use case. The test
case should contain preconditions, test steps, and expected results after each.
test step. You may use the template given for the answer.

Test Case ID
Test Case Name
Precondition
Test Steps Action Expected Result

Post Condition

[13 marks]

(b) How many test cases are required to achieve the use case coverage for this use
case?
[2 marks]

Page 13 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

Question 2
The system for discount calculation takes as the input two values:
• NumberOfTransactions representing the total number of transactions for a
given client
• TotalAmountSpent representing the total amount spent by this client
during these transactions
Assume that each test case input is a pair (NumberOfTransactions,
TotalAmountSpent). Consider the code shown in Figure 1 describing the business
rules for this system.

1. IF NumberOfTransactions > 10 THEN


2. IF TotalAmountSpent > RM500 THEN
3. discount := 5%
ELSE
4. discount := 2%
ELSE
5. discount := 0%

Figure 1
(a) Design a test case that should result in admitting the 5% discount. Propose
suitable test data for the test case.
[4 marks]

(b) What is the statement coverage for the following test suite: (9, RM600), (10,
RM200)?
[2 marks]

(c) What is the decision coverage for the following test suite: (15, RM50), (20,
RM750)?
[2 marks]

(d) Design the set of test cases that achieves 100% statement coverage.
[6 marks]

(e) Based on your answer in (d), determine if additional test cases are needed to
achieve 100% decision coverage.
[1 mark]

Page 14 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

Question 3
You perform a checklist-based review of a requirement specification. The checklist is
as follows:

Checklist for Requirements Specification Reviews


C1: Do any requirements conflict with or duplicate other requirements?
C2: Is each requirement uniquely and correctly identified?
C3: Are all requirements actually requirements, not design or implementation
solutions?

The requirement specification under review looks as follows:

Functional Requirement 1 ID: FR1 Title: Download mobile application


Description: A user should be able to download the mobile application through
an application store. The application should be free to download.

Functional Requirement 2 ID: FR2 Title: User registration


Description: Given that a user has downloaded the mobile application, the user
should be able to register through the mobile application. The user must provide a
username, password, and e-mail address. The user data should be kept in the
MySQL relational database in a table “UserData” with columns “user_id,”
“username,” “password,” and “email,” where user_id is the primary key.

Functional Requirement 3 ID: FR3 Title: User logging


Description: Given that a user is registered, the user should be able to log in to
the application with his/her username and password.

Functional Requirement 4 ID: FR4 Title: User payment


Description: The user should be able to make a payment when the mobile
application completely downloads from the application store.

Based on the given checklist, identify and explain the violations for each of the
requirements.
[10 marks]

Page 15 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

Question 4
A software engineering group is developing a mission-critical software system that
guides a commercial rocket to its proper destination. This is a new product; the group
and its parent organization have never built such a product before. There is a debate
among the group as to whether inspection or walkthrough is the best way to evaluate
the quality of the code. The company standards are ambiguous as to which review type
should be used here. Which would you recommend, and give FOUR (4) reasons to
justify?
[10 marks]

Question 5
(a) Categorize the following statement either it is product or project risks:
i. An incorrect calculation of fees might shortchange the organization.
ii. A vendor might fail to deliver a system component on time.
iii. A defect might allow hackers to gain administrative privileges.
iv. A skills gap might occur in a new technology used in the system.
v. A defect-prioritization process might overload the development team.
[5 marks]

(b) Identify the following scenario whether it is an entry criterion or exit criteria.
i. The bug tracking system is in place and available for use by the testing
team
ii. The project team agrees that sufficient testing has been performed and
further testing is not likely to find more bugs
iii. No crash or unexpected process termination has occurred on the
software for the past four weeks
iv. The development team has completed component testing for all features,
and bug fixes are scheduled for the increment.
v. Less than 50 bugs are in open status.
[5 marks]

Page 16 of 17
CSEB424/ CSEB4313, Semester 2, 2021/2022

Question 6
Identify the suitable tool to be used for the following statements:
(a) Due to the complexity and high number of requirements, the tools are needed
for gathering, cataloguing, structured storage, administration, change
management and prioritizing requirements

(b) The tools allow traceability between the software product components, the
variants and the test ware.

(c) The tools will test the defences of a computer or a network, e.g. against
computer viruses or Denial of Service attacks.

(d) The tools collect information that can only be gathered when the program runs
such as storage use, pointer allocation, pointer arithmetic and memory leaks

(e) During the execution of white box testing, the tools will create statistics or
graphic illustrations for the different types of code coverage measurements.
[5 marks]

Question 7
Tools can be classified based on their usage either for testers or developers. List FIVE
(5) tools that are developed for developers.
[5 marks]

---End of Questions---

Page 17 of 17

You might also like