Tutorial 5 Unit Testing: 1 Description

You might also like

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

Tutorial 5 Unit testing

1 Description
In this tutorial, you will learn to learn to apply unit testing technique and the JUnit test API to test
stand-alone procedures.

2 Tasks
1. Work in pairs to complete the following tasks:
a) define the test cases for at least three procedures of the class Arrays. The source code of
this class is also provided in the attached zip file.
Note:
for each procedure, create a test driver class using one of the provided test driver
templates (available on the module's web page)
complete the design spec. for the test driver class. In particular, write the test cases that
you created directly in the @testcase clause of the test method. This is a new JavaDoc
tag that you need for test case definition.
b) implement the test driver classes that you designed in step 1
c) run the test drivers and debug the code, if necessary.
2. [Optional] Complete exercise 10.3 of the text book but leave the debugging requirement until
the next tutorial.
Note: this exercise requires testing an iterator abstraction.

3 Submission
Submit your report to the home work submission box of this tutorial on the FIT portal. Name the file as
follows: student-id_class_hwk5.zip, where student-id is your student id, class is the code of the class
that you attend.

Software Engineering

Page 1

Spring 2013

You might also like