SWE 619 Assignments 12 and 13
Spring 2013
Goal:
Tools: Contracts, Security, Agile, Testing
You have a choice of possible assignments.
Choose one for assignment 12 and another (different one) for assignment 13.
In each case, the deliverable is a story.
Write a brief report,
and include enough evidence
(output, screen shots, etc.)
that the GTA can figure out that you actually completed the assignment.
-
Bring up the C# contracts mechanism in VisualStudio.
Translate one of Liskov's examples to C# and implement
the contracts with the Code Contracts mechanism.
-
For most of the semester, we have focused on
design considerations for constructing software
that does something we want it to do.
For this last assignment, I would like students
to appreciate just how vulnerable software is
to malicious parties intent on attacking their
software.
Students who find this assignment amusing might
wish to take SWE 781: Secure Software Design and Programming.
There are two attacks documented in Bloch's
Item 76: Write readObject()
methods defensively.
One is called BogusPeriod
,
and the other is called MutablePeriod
.
Implement either (your choice) of these attacks (basically involves
typing in code from Bloch) and verify that the attack takes place.
-
Download the Pex tool discussed in class and use it to generate some test
data in a .NET environment.
-
Do one of the following, depending on your current Agile expertise:
-
TDD Novice:
Work through a simple TDD example
one step at a time.
Don't skip anything.
Koskela, Chapter 2, has an excellent example.
Koskela is available online through the GMU's subscription
to the Safari service:
Direct Safari
Link
Off Campus Safari Link.
-
Continuous Integration Novice:
Download
Cruise Control
(somewhat dated)
or
Jenkins
and set up some toy Java project
for continuous integration.
For realism, you should set up version control as well.
One possibility is Subversion.
-
Regular JUnit User:
Download a mocking tool such as
EasyMock
and set up some interaction-based tests.
Koskela has examples.
-
Agile Developer:
Download and explore some Agile tool with which you are currently unfamiliar.
-
Convert an existing JUnit test set
to use either JUnit
Parameterized
(where, confusingly, methods don't have parameters)
or JUnit Theories
,
(where methods do have parameters).
Or do both.
If you wish to construct JUnit from scratch for this, that's fine too.