CpSc372
Introduction to Software
Engineering
Assignment 7
Unit Testing
Goal: Gain experience in selecting, implementing, and
analyzing tests.
Description: Testing beginning with the smallest
possible units results in higher quality of the completed product. Developing
and executing these tests is a time sink for developers. Semi-automated test tools assist the developer.
The dotUnit tool provides the means for rapid development and execution of
tests.
Procedure:
- Download
the DotUnit
zip file. Install DotUnit.
- Download
the classes
under test. Unzip
- The
download includes a .Net project file. Open the project in Visual Studio
.NET. Update the project to have a reference to the DotUnit dll. Do this
by removing the current reference to DotUnit and then add in a reference
to the new location.
- Select
tests to be executed.
- Write
and compile these tests.
- Use
the Windows Explorer to go into the directory where you installed DotUnit.
Go into bin/DeBug. There you will find DotUnit.exe. Double click on this
and it will run. When it runs you can select which test class for it to
use. Choose the one you just compiled. The test class that you compile is
not an executable. There is nothing wrong with the installation of Visual
Studio or of DotUnit. You must begin execution with DotUnit not with
VelocityTest.
- Observe
the results and analyze the results.
- Add
tests based on the previous results.
- Write-up
the results.
Turn-in: The test classes you write or expand. Each
test should have a comment that explains why this particular test was selected
for execution. An analysis of suspected problems.
Due: 4 pm Wednesday March 12th in the dept office
Points 2 points
Team: 2 person team assignment
Evaluation: Comprehensiveness of test coverage,
clarity of justification for test selection.